[open-ils-commits] r15290 - in trunk/Open-ILS/xul/staff_client/chrome: content/cat locale/en-US (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Jan 8 16:30:15 EST 2010


Author: phasefx
Date: 2010-01-08 16:30:10 -0500 (Fri, 08 Jan 2010)
New Revision: 15290

Modified:
   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/locale/en-US/offline.properties
Log:
quicker entry point for Add Volumes action, by virtue of assuming Workstation Library

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js	2010-01-08 21:13:56 UTC (rev 15289)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js	2010-01-08 21:30:10 UTC (rev 15290)
@@ -436,4 +436,39 @@
     }
 }
 
+function add_volumes() {
+    try {
+        var edit = 0;
+        try {
+            edit = g.network.request(
+                api.PERM_MULTI_ORG_CHECK.app,
+                api.PERM_MULTI_ORG_CHECK.method,
+                [ 
+                    ses(), 
+                    ses('staff_id'), 
+                    [ ses('ws_ou') ],
+                    [ 'CREATE_VOLUME', 'CREATE_COPY' ]
+                ]
+            ).length == 0 ? 1 : 0;
+        } catch(E) {
+            g.error.sdump('D_ERROR','batch permission check: ' + E);
+        }
 
+        if (edit==0) {
+            alert(document.getElementById('offlineStrings').getString('staff.circ.copy_status.add_volumes.perm_failure'));
+            return; // no read-only view for this interface
+        }
+
+        var title = document.getElementById('offlineStrings').getFormattedString('staff.circ.copy_status.add_volumes.title', [docid]);
+
+        JSAN.use('util.window'); var win = new util.window();
+        var w = win.open(
+            window.xulG.url_prefix(urls.XUL_VOLUME_COPY_CREATOR),
+            title,
+            'chrome,resizable',
+            { 'doc_id' : docid, 'ou_ids' : [ ses('ws_ou') ] }
+        );
+    } catch(E) {
+        alert('Error in chrome/content/cat/opac.js, add_volumes(): ' + E);
+    }
+}

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul	2010-01-08 21:13:56 UTC (rev 15289)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul	2010-01-08 21:30:10 UTC (rev 15290)
@@ -55,6 +55,8 @@
                 <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.copy_browser.holdings_maintenance.cmd_add_volumes.label;" accesskey="&staff.cat.copy_browser.holdings_maintenance.cmd_add_volumes.accesskey;" id="add_volumes" oncommand="add_volumes();"/>
+                <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();"/>
                 <menuseparator/>

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	2010-01-08 21:13:56 UTC (rev 15289)
+++ trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties	2010-01-08 21:30:10 UTC (rev 15290)
@@ -248,3 +248,5 @@
 staff.cat.util.copy_editor.batch_view=Batch View
 staff.cat.util.copy_editor.edit=Edit
 staff.cat.util.copy_editor.view=View
+staff.circ.copy_status.add_volumes.perm_failure=You do not have permission to add volumes to the workstation library.
+staff.circ.copy_status.add_volumes.title=Add Volume/Item for Record # %1$s



More information about the open-ils-commits mailing list