[open-ils-commits] r17277 - in trunk/Open-ILS/web: js/dojo/openils/opac/nls opac/skin/default/js (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Aug 19 23:47:49 EDT 2010
Author: dbs
Date: 2010-08-19 23:47:46 -0400 (Thu, 19 Aug 2010)
New Revision: 17277
Modified:
trunk/Open-ILS/web/js/dojo/openils/opac/nls/opac.js
trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
Log:
Add a speedbump to the MFHD delete workflow
Modified: trunk/Open-ILS/web/js/dojo/openils/opac/nls/opac.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/opac/nls/opac.js 2010-08-20 03:35:59 UTC (rev 17276)
+++ trunk/Open-ILS/web/js/dojo/openils/opac/nls/opac.js 2010-08-20 03:47:46 UTC (rev 17277)
@@ -14,6 +14,7 @@
"CREATE_MFHD": "Add MFHD Record",
"CREATED_MFHD_RECORD": "Created MFHD record for ${0}",
"DELETE_MFHD": "Delete Record",
+ "DELETE_MFHD_CONFIRM": "Are you sure you want to delete this serial record?",
"DELETED_MFHD_RECORD": "Deleted MFHD record ${0}",
"EDIT_MFHD_RECORD": "Edit Record",
"EDIT_MFHD_MENU": "Edit Holdings",
Modified: trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/rdetail.js 2010-08-20 03:35:59 UTC (rev 17276)
+++ trunk/Open-ILS/web/opac/skin/default/js/rdetail.js 2010-08-20 03:47:46 UTC (rev 17277)
@@ -353,6 +353,10 @@
var mfhd_edit = new dijit.Menu({});
new dijit.MenuItem({onClick: function(){loadMarcEditor(holdings.sre_id())}, label:opac_strings.EDIT_MFHD_RECORD}).placeAt(mfhd_edit, "first");
new dijit.MenuItem({onClick:function(){
+ // Avoid accidental deletion of MFHD records
+ if (!confirm(opac_strings.DELETE_MFHD_CONFIRM)) {
+ return;
+ }
var pcrud = new openils.PermaCrud({"authtoken": G.user.session});
var mfhd_rec = pcrud.retrieve("sre", holdings.sre_id());
if (mfhd_rec) {
More information about the open-ils-commits
mailing list