[open-ils-commits] r9805 - in trunk/Open-ILS: web/opac/locale/en-US xul/staff_client/chrome/content/cat xul/staff_client/chrome/content/main xul/staff_client/chrome/locale/en-US

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Jun 9 17:30:23 EDT 2008


Author: phasefx
Date: 2008-06-09 17:30:18 -0400 (Mon, 09 Jun 2008)
New Revision: 9805

Modified:
   trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
   trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
   trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul
   trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
   trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
Log:
undelete for bib records.  This is local chrome, so need to deploy a new staff client to see this functionality

Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2008-06-09 21:21:01 UTC (rev 9804)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2008-06-09 21:30:18 UTC (rev 9805)
@@ -236,6 +236,8 @@
 <!ENTITY staff.cat.opac.mark_for_overlay.label "Mark for Overlay">
 <!ENTITY staff.cat.opac.delete_record.accesskey "D">
 <!ENTITY staff.cat.opac.delete_record.label "Delete Record">
+<!ENTITY staff.cat.opac.undelete_record.accesskey "U">
+<!ENTITY staff.cat.opac.undelete_record.label "Undelete Record">
 <!ENTITY staff.cat.opac.menu.accesskey "A">
 <!ENTITY staff.cat.opac.menu.label "Actions for this Record">
 <!ENTITY staff.cat.opac.opac_view.accesskey "O">

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js	2008-06-09 21:21:01 UTC (rev 9804)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js	2008-06-09 21:30:18 UTC (rev 9805)
@@ -248,6 +248,25 @@
 	}
 }
 
+function undelete_record() {
+    if (g.error.yns_alert(
+		document.getElementById('offlineStrings').getFormattedString('cat.opac.undelete_record.confirm', [docid]),
+		document.getElementById('offlineStrings').getString('cat.opac.undelete_record'),
+		document.getElementById('offlineStrings').getString('cat.opac.undelete'),
+		document.getElementById('offlineStrings').getString('cat.opac.cancel'),
+		null,
+		document.getElementById('offlineStrings').getString('cat.opac.record_undeleted.confirm')) == 0) {
+
+        var robj = g.network.simple_request('FM_BRE_UNDELETE',[ses(),docid]);
+        if (typeof robj.ilsevent != 'undefined') {
+			alert(document.getElementById('offlineStrings').getFormattedString('cat.opac.record_undeleted.error',  [docid, robj.textcode, robj.desc]) + '\n');
+        } else {
+			alert(document.getElementById('offlineStrings').getString('cat.opac.record_undeleted'));
+			refresh_display(docid,true);
+        }
+    }
+}
+
 function refresh_display(id,reset) {
 	try { 
 		while(top_pane.node.lastChild) top_pane.node.removeChild( top_pane.node.lastChild );

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul	2008-06-09 21:21:01 UTC (rev 9804)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul	2008-06-09 21:30:18 UTC (rev 9805)
@@ -53,6 +53,7 @@
 				<menuitem label="&staff.cat.opac.add_bucket.label;" accesskey="&staff.cat.opac.add_bucket.accesskey;" id="add_bucket" oncommand="add_to_bucket();"/>
 				<menuitem label="&staff.cat.opac.mark_for_overlay.label;" accesskey="&staff.cat.opac.mark_for_overlay.accesskey;" id="mark_for_overlay" oncommand="mark_for_overlay();"/>
 				<menuitem label="&staff.cat.opac.delete_record.label;" accesskey="&staff.cat.opac.delete_record.accesskey;" id="delete_record" oncommand="delete_record();"/>
+				<menuitem label="&staff.cat.opac.undelete_record.label;" accesskey="&staff.cat.opac.undelete_record.accesskey;" id="undelete_record" oncommand="undelete_record();"/>
 				<menuseparator/>
 				<menuitem label="&staff.cat.opac.bib_in_new_tab.label;" id="bib_in_new_tab" oncommand="bib_in_new_tab();"/>
 				<menuitem label="&staff.cat.opac.remove_me.label;" id="remove_me" oncommand="remove_me();"/>

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js	2008-06-09 21:21:01 UTC (rev 9804)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js	2008-06-09 21:30:18 UTC (rev 9805)
@@ -137,6 +137,7 @@
     'FM_BRE_ID_SEARCH_VIA_MULTICLASS_QUERY' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.biblio.multiclass.query.staff' },
 	'FM_BRE_ID_SEARCH_VIA_TCN' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.biblio.tcn', 'secure' : false },
 	'FM_BRE_DELETE' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.cat.biblio.record_entry.delete', 'secure' : false },
+	'FM_BRE_UNDELETE' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.cat.biblio.record_entry.undelete', 'secure' : false },
 	'FM_BRN_FROM_MARCXML' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.z3950.marcxml_to_brn', 'secure' : false },
 	'FM_CCS_RETRIEVE' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.config.copy_status.retrieve.all', 'secure' : false },
 	'FM_CIRC_DETAILS' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.fleshed.retrieve' },

Modified: trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties	2008-06-09 21:21:01 UTC (rev 9804)
+++ trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties	2008-06-09 21:30:18 UTC (rev 9805)
@@ -18,9 +18,14 @@
 cat.opac.delete_record.confirm=Are you sure you want to delete title record #%1$s from the catalog?
 cat.opac.delete_record=Delete Record
 cat.opac.delete=Delete
+cat.opac.undelete_record.confirm=Are you sure you want to undelete title record #%1$s from the catalog?
+cat.opac.undelete_record=Undelete Record
+cat.opac.undelete=Undelete
 cat.opac.cancel=Cancel
 cat.opac.record_deleted=Record deleted.
 cat.opac.record_deleted.confirm=Check here to confirm this action.
+cat.opac.record_undeleted=Record undeleted.
+cat.opac.record_undeleted.confirm=Check here to confirm this action.
 # variables: document ID, error code, error description
 cat.opac.record_delete.error=Error deleting record #%1$s : %2$s : %3$s
 cat.save_record=Save Record



More information about the open-ils-commits mailing list