[open-ils-commits] r13749 - in trunk/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 01:05:41 EDT 2009
Author: dbs
Date: 2009-07-28 01:05:37 -0400 (Tue, 28 Jul 2009)
New Revision: 13749
Modified:
trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js
trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
Log:
Attempt to avoid clashes with browsers that treat 'delete' as a reserved keyword
Modified: trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js 2009-07-27 19:39:16 UTC (rev 13748)
+++ trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js 2009-07-28 05:05:37 UTC (rev 13749)
@@ -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: trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/rdetail.js 2009-07-27 19:39:16 UTC (rev 13748)
+++ trunk/Open-ILS/web/opac/skin/default/js/rdetail.js 2009-07-28 05:05:37 UTC (rev 13749)
@@ -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