[open-ils-commits] r13753 - in branches/rel_1_6/Open-ILS/web: js/dojo/openils opac/skin/default/js (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Jul 28 09:40:18 EDT 2009
Author: dbs
Date: 2009-07-28 09:40:16 -0400 (Tue, 28 Jul 2009)
New Revision: 13753
Modified:
branches/rel_1_6/Open-ILS/web/js/dojo/openils/PermaCrud.js
branches/rel_1_6/Open-ILS/web/opac/skin/default/js/rdetail.js
Log:
Backport r13749 from trunk: Attempt to avoid clashes with browsers that treat 'delete' as a reserved JavaScript keyword
Modified: branches/rel_1_6/Open-ILS/web/js/dojo/openils/PermaCrud.js
===================================================================
--- branches/rel_1_6/Open-ILS/web/js/dojo/openils/PermaCrud.js 2009-07-28 12:37:41 UTC (rev 13752)
+++ branches/rel_1_6/Open-ILS/web/js/dojo/openils/PermaCrud.js 2009-07-28 13:40:16 UTC (rev 13753)
@@ -296,6 +296,14 @@
this._CUD( 'delete', list, opts );
},
+ /*
+ * 'delete' is a reserved keyword in JavaScript and can't be used
+ * in browsers like IE or Chrome, so we define a safe synonym
+ */
+ eliminate: function ( list, opts ) {
+ this._CUD( 'delete', list, opts );
+ },
+
apply : function ( list, opts ) {
this._auto_CUD( list, opts );
},
Modified: branches/rel_1_6/Open-ILS/web/opac/skin/default/js/rdetail.js
===================================================================
--- branches/rel_1_6/Open-ILS/web/opac/skin/default/js/rdetail.js 2009-07-28 12:37:41 UTC (rev 13752)
+++ branches/rel_1_6/Open-ILS/web/opac/skin/default/js/rdetail.js 2009-07-28 13:40:16 UTC (rev 13753)
@@ -305,7 +305,7 @@
var pcrud = new openils.PermaCrud({"authtoken": G.user.session});
var mfhd_rec = pcrud.retrieve("sre", holdings.id());
if (mfhd_rec) {
- pcrud.delete(mfhd_rec);
+ pcrud.eliminate(mfhd_rec);
alert(dojo.string.substitute(opac_strings.DELETED_MFHD_RECORD, [holdings.id()]));
}
}, label:opac_strings.DELETE_MFHD}).placeAt(mfhd_edit, "last");
More information about the open-ils-commits
mailing list