[open-ils-commits] r15186 - in trunk/Open-ILS: web/opac/locale/en-US xul/staff_client/chrome/content/main xul/staff_client/server/cat xul/staff_client/server/circ xul/staff_client/server/patron (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Dec 17 13:41:30 EST 2009


Author: phasefx
Date: 2009-12-17 13:41:26 -0500 (Thu, 17 Dec 2009)
New Revision: 15186

Modified:
   trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
   trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
   trunk/Open-ILS/xul/staff_client/server/cat/copy_summary.xul
   trunk/Open-ILS/xul/staff_client/server/cat/util.js
   trunk/Open-ILS/xul/staff_client/server/circ/circ_summary.xul
   trunk/Open-ILS/xul/staff_client/server/circ/copy_details.xul
   trunk/Open-ILS/xul/staff_client/server/circ/util.js
   trunk/Open-ILS/xul/staff_client/server/patron/bill2.js
   trunk/Open-ILS/xul/staff_client/server/patron/bill_details.js
   trunk/Open-ILS/xul/staff_client/server/patron/bills.js
   trunk/Open-ILS/xul/staff_client/server/patron/display.js
Log:
bill Full Details and Show Last Few Circs uses the old item details pane.  This cleans up that pane a bit (list actions and sticky view) and gives it a Show in OPAC button.



Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2009-12-17 18:17:59 UTC (rev 15185)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2009-12-17 18:41:26 UTC (rev 15186)
@@ -2310,9 +2310,9 @@
 <!ENTITY staff.cat.copy_summary.age_protect.label "Age Protect:">
 <!ENTITY staff.cat.copy_summary.total_circs.label "Total Circulations:">
 <!ENTITY staff.cat.copy_summary.alternate_view.label "Alternate View">
-<!ENTITY staff.cat.copy_summary.save_columns.label "Save Columns">
-<!ENTITY staff.cat.copy_summary.sel_clip.label "Copy to Clipboard">
-<!ENTITY staff.cat.copy_summary.print_export.label "Print Export">
+<!ENTITY staff.cat.copy_summary.alternate_view.accesskey "">
+<!ENTITY staff.cat.copy_summary.show_in_opac.label "Show in Catalog">
+<!ENTITY staff.cat.copy_summary.show_in_opac.accesskey "S">
 <!ENTITY staff.cat.marcedit.options.label "Options">
 <!ENTITY staff.cat.marcedit.stackSubfields.label "Stack subfields">
 <!ENTITY staff.cat.marcedit.stackSubfields.accesskey "s">

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js	2009-12-17 18:17:59 UTC (rev 15185)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js	2009-12-17 18:41:26 UTC (rev 15186)
@@ -179,6 +179,7 @@
     'FM_BOOKING_CREATE_BRT_AND_BRSRC' : { 'app' : 'open-ils.booking', 'method' : 'open-ils.booking.create_brt_and_brsrc_from_copies' },
     'FM_BRE_RETRIEVE_VIA_ID' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.cat.biblio.record.metadata.retrieve', 'secure' : false },
     'FM_BRE_RETRIEVE_VIA_ID.authoritative' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.cat.biblio.record.metadata.retrieve.authoritative', 'secure' : false },
+    'FM_BRE_ID_VIA_BARCODE' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.bib_id.by_barcode', 'secure' : false },
     'FM_BRE_ID_SEARCH_VIA_BARCODE' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.biblio.find_by_barcode', 'secure' : false },
     '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 },

Modified: trunk/Open-ILS/xul/staff_client/server/cat/copy_summary.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/copy_summary.xul	2009-12-17 18:17:59 UTC (rev 15185)
+++ trunk/Open-ILS/xul/staff_client/server/cat/copy_summary.xul	2009-12-17 18:41:26 UTC (rev 15186)
@@ -21,7 +21,7 @@
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 
 <window id="cat_copy_summary_win" 
-    onload="try { my_init(); font_helper(); persist_helper(); } catch(E) { alert(E); }"
+    onload="try { font_helper(); persist_helper(); my_init(); } catch(E) { alert(E); }"
     xmlns:html="http://www.w3.org/1999/xhtml"
     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
@@ -85,7 +85,9 @@
                         'map_row_to_columns' : circ.util.std_map_row_to_columns(),
                     }
                 );
-    
+                $('list_actions').appendChild( g.list.render_list_actions() );
+                g.list.set_list_actions();
+ 
                 function acp_callback(req) {
                     try {
                         var copy = req.getResultObject();
@@ -121,6 +123,10 @@
                                     $w('copy_summary_callnumber',cn.label());    
                                 }
                                 g.list.append({'row':{'my':{'acp':copy,'acn':cn}}});
+                                g.barcode = copy.barcode(); g.doc_id = cn.record();
+                                if (g.doc_id > -1) {
+                                    $('show_in_opac').hidden = false;
+                                }
                             } catch(E) {
                                 g.error.standard_unexpected_error_alert('retrieving volume',E);
                             }
@@ -156,7 +162,9 @@
                     }
                 });
 
-                toggle_deck(); toggle_deck(); /* quick hack */
+                if ( $('alternate_view').checked ) {
+                    toggle_deck();
+                }
 
             } catch(E) {
                 try { g.error.standard_unexpected_error_alert('copy_summary.xul',E); } catch(F) { alert(E + '\n' + F); }
@@ -167,12 +175,8 @@
             try {
                 if ($('item_deck').selectedIndex == 0) {
                     $('item_deck').selectedIndex = 1; /* change to grid */
-                    $('save_columns').hidden = true;
-                    $('sel_clip').hidden = true;
                 } else {
                     $('item_deck').selectedIndex = 0; /* change to tree */
-                    $('save_columns').hidden = false;
-                    $('sel_clip').hidden = false;
                 }
             } catch(E) {
             }
@@ -233,10 +237,12 @@
             </grid>
         </deck>
         <hbox>
-            <button label="&staff.cat.copy_summary.alternate_view.label;" oncommand="toggle_deck()"/>
-            <button id="save_columns" label="&staff.cat.copy_summary.save_columns.label;" oncommand="try { g.list.save_columns(); } catch(E) { alert(E); }"/>
-            <button id="sel_clip" label="&staff.cat.copy_summary.sel_clip.label;" oncommand="try { g.list.node.view.selection.selectAll(); g.list.clipboard(); } catch(E) { alert(E); }"/>
-            <button id="print_export" label="&staff.cat.copy_summary.print_export.label;" oncommand="try { g.list.on_all_fleshed = function() { JSAN.use('util.print'); var p = new util.print(); p.simple( g.list.dump_csv(), { 'content_type' : 'text/plain' } ); setTimeout( function() { g.list.on_all_fleshed = null; }, 0); }; g.list.full_retrieve(); } catch(E) { alert(E); }"/>
+            <hbox id="list_actions"/>
+            <button id="show_in_opac" hidden="true" label="&staff.cat.copy_summary.show_in_opac.label;" accesskey="&staff.cat.copy_summary.show_in_opac.accesskey;"
+                oncommand="JSAN.use('cat.util'); cat.util.show_in_opac([{barcode:g.barcode,doc_id:g.doc_id}]);"/>
+            <checkbox id="alternate_view" label="&staff.cat.copy_summary.alternate_view.label;" accesskey="&staff.cat.copy_summary.alternate_view.accesskey;" 
+                oils_persist="checked" oils_persist_no_poke="true"
+                oncommand="toggle_deck()"/>
         </hbox>
     </groupbox>
 

Modified: trunk/Open-ILS/xul/staff_client/server/cat/util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/util.js	2009-12-17 18:17:59 UTC (rev 15185)
+++ trunk/Open-ILS/xul/staff_client/server/cat/util.js	2009-12-17 18:41:26 UTC (rev 15186)
@@ -178,13 +178,18 @@
 
 cat.util.show_in_opac = function(selection_list) {
     JSAN.use('util.error'); var error = new util.error();
+    JSAN.use('util.network'); var network = new util.network();
     var doc_id; var seen = {};
     try {
         for (var i = 0; i < selection_list.length; i++) {
             doc_id = selection_list[i].doc_id;
             if (!doc_id) {
-                alert($("catStrings").getFormattedString('staff.cat.util.show_in_opac.unknown_barcode', [selection_list[i].barcode]));
-                continue;
+                var barcode = selection_list[i].barcode;
+                doc_id = network.simple_request('FM_BRE_ID_VIA_BARCODE',[barcode]);
+                if (typeof doc_id.ils_event != 'undefined' || doc_id == -1) {
+                    alert($("catStrings").getFormattedString('staff.cat.util.show_in_opac.unknown_barcode', [barcode]));
+                    continue;
+                }
             }
             if (doc_id == -1 ) {
                 continue; /* pre-cat */

Modified: trunk/Open-ILS/xul/staff_client/server/circ/circ_summary.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/circ_summary.xul	2009-12-17 18:17:59 UTC (rev 15185)
+++ trunk/Open-ILS/xul/staff_client/server/circ/circ_summary.xul	2009-12-17 18:41:26 UTC (rev 15186)
@@ -69,7 +69,7 @@
                 var mid = document.createElement('iframe'); mv.appendChild(mid);
                 mid.setAttribute('src',urls.XUL_COPY_SUMMARY);
                 mid.setAttribute('flex','1');
-                get_contentWindow(mid).xulG = { 'copy_id' : g.copy.id() };
+                get_contentWindow(mid).xulG = { 'copy_id' : g.copy.id(), 'new_tab' : xulG.new_tab, 'url_prefix' : xulG.url_prefix };
 
                 show_circs();
 

Modified: trunk/Open-ILS/xul/staff_client/server/circ/copy_details.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/copy_details.xul	2009-12-17 18:17:59 UTC (rev 15185)
+++ trunk/Open-ILS/xul/staff_client/server/circ/copy_details.xul	2009-12-17 18:41:26 UTC (rev 15186)
@@ -94,7 +94,7 @@
                 var item_summary = document.createElement('iframe'); ib.appendChild(item_summary);
                 item_summary.setAttribute('src',urls.XUL_COPY_SUMMARY);
                 item_summary.setAttribute('flex','1');
-                get_contentWindow(item_summary).xulG = { 'copy' : g.copy, 'callnumber' : g.callnumber };
+                get_contentWindow(item_summary).xulG = { 'copy' : g.copy, 'callnumber' : g.callnumber, 'new_tab' : xulG.new_tab, 'url_prefix' : xulG.url_prefix };
 
                 $('r_last').disabled = true;
                 if (g.circ) {

Modified: trunk/Open-ILS/xul/staff_client/server/circ/util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/util.js	2009-12-17 18:17:59 UTC (rev 15185)
+++ trunk/Open-ILS/xul/staff_client/server/circ/util.js	2009-12-17 18:41:26 UTC (rev 15186)
@@ -65,7 +65,7 @@
 
     try {
         var url = xulG.url_prefix( urls.XUL_COPY_DETAILS ); // + '?copy_id=' + copy_id;
-        var my_xulG = obj.win.open( url, 'show_copy_details', 'chrome,resizable,modal', { 'copy_id' : copy_id } );
+        var my_xulG = obj.win.open( url, 'show_copy_details', 'chrome,resizable,modal', { 'copy_id' : copy_id, 'new_tab' : xulG.new_tab, 'url_prefix' : xulG.url_prefix } );
 
         if (typeof my_xulG.retrieve_these_patrons == 'undefined') return;
         var patrons = my_xulG.retrieve_these_patrons;
@@ -137,7 +137,7 @@
         try {
             if (typeof selection_list[i].copy_id == 'undefined' || selection_list[i].copy_id == null) continue;
             var url = xulG.url_prefix( urls.XUL_CIRC_SUMMARY ); // + '?copy_id=' + selection_list[i].copy_id + '&count=' + count;
-            var my_xulG = obj.win.open( url, 'show_last_few_circs', 'chrome,resizable,modal', { 'copy_id' : selection_list[i].copy_id } );
+            var my_xulG = obj.win.open( url, 'show_last_few_circs', 'chrome,resizable,modal', { 'copy_id' : selection_list[i].copy_id, 'new_tab' : xulG.new_tab, 'url_prefix': xulG.url_prefix } );
 
             if (typeof my_xulG.retrieve_these_patrons == 'undefined') continue;
             var patrons = my_xulG.retrieve_these_patrons;

Modified: trunk/Open-ILS/xul/staff_client/server/patron/bill2.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bill2.js	2009-12-17 18:17:59 UTC (rev 15185)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bill2.js	2009-12-17 18:41:26 UTC (rev 15186)
@@ -595,6 +595,8 @@
                     refresh(); 
                     if (typeof window.xulG == 'object' && typeof window.xulG.refresh == 'function') window.xulG.refresh();
                 }, 
+                'new_tab' : xulG.new_tab,
+                'url_prefix' : xulG.url_prefix
             }
         );
     }

Modified: trunk/Open-ILS/xul/staff_client/server/patron/bill_details.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bill_details.js	2009-12-17 18:17:59 UTC (rev 15185)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bill_details.js	2009-12-17 18:41:26 UTC (rev 15186)
@@ -91,7 +91,7 @@
                 var copy_summary = document.createElement('iframe'); csb.appendChild(copy_summary);
                 copy_summary.setAttribute('src',urls.XUL_COPY_SUMMARY); // + '?copy_id=' + r_circ.target_copy());
                 copy_summary.setAttribute('flex','1');
-                get_contentWindow(copy_summary).xulG = { 'copy_id' : r_circ.target_copy() };
+                get_contentWindow(copy_summary).xulG = { 'copy_id' : r_circ.target_copy(), 'new_tab' : xulG.new_tab, 'url_prefix' : xulG.url_prefix };
 
                 g.network.simple_request(
                     'MODS_SLIM_RECORD_RETRIEVE_VIA_COPY.authoritative',

Modified: trunk/Open-ILS/xul/staff_client/server/patron/bills.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bills.js	2009-12-17 18:17:59 UTC (rev 15185)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bills.js	2009-12-17 18:41:26 UTC (rev 15186)
@@ -958,6 +958,8 @@
                                                 'patron_id' : obj.patron_id,
                                                 'mbts_id' : my.mobts.id(),
                                                 'refresh' : function() { obj.refresh(); },
+                                                'new_tab' : xulG.new_tab,
+                                                'url_prefix' : xulG.url_prefix
                                             }
                                         );
                                     },

Modified: trunk/Open-ILS/xul/staff_client/server/patron/display.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/display.js	2009-12-17 18:17:59 UTC (rev 15185)
+++ trunk/Open-ILS/xul/staff_client/server/patron/display.js	2009-12-17 18:41:26 UTC (rev 15186)
@@ -426,6 +426,7 @@
                                     'display_window' : window,
                                     'patron_id' : obj.patron.id(),
                                     'url_prefix' : xulG.url_prefix,
+                                    'new_tab' : xulG.new_tab,
                                     'on_money_change' : function(b) {
                                         netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                                         obj.summary_window.refresh();



More information about the open-ils-commits mailing list