toward standardizing some list actions
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 22 Sep 2008 03:51:01 +0000 (03:51 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 22 Sep 2008 03:51:01 +0000 (03:51 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10669 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/xul/staff_client/server/circ/copy_status.js
Open-ILS/xul/staff_client/server/circ/copy_status.xul
Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul

index 16461cc..10018c8 100644 (file)
 <!ENTITY staff.patron.items_overlay.show_noncats.label "Show Non-Cataloged Circulations in List Above">
 <!ENTITY staff.patron.items_overlay.show_noncats.accesskey "N">
 <!ENTITY staff.patron.items_overlay.items_export.label "Export">
+<!ENTITY staff.generic.list_actions.label "List Actions">
+<!ENTITY staff.generic.list_actions.accesskey "L">
+<!ENTITY staff.generic.list_actions.sel_clip.label "Copy to Clipboard">
+<!ENTITY staff.generic.list_actions.sel_clip.accesskey "C">
+<!ENTITY staff.generic.list_actions.csv_to_printer.label "Print List CSV">
+<!ENTITY staff.generic.list_actions.csv_to_printer.accesskey "P">
+<!ENTITY staff.generic.list_actions.csv_to_clipboard.label "Copy List CSV to Clipboard">
+<!ENTITY staff.generic.list_actions.csv_to_clipboard.accesskey "C">
+<!ENTITY staff.generic.list_actions.csv_to_file.label "Save List CSV to File">
+<!ENTITY staff.generic.list_actions.csv_to_file.accesskey "F">
+<!ENTITY staff.generic.list_actions.save_columns.label "Save List Configuration">
+<!ENTITY staff.generic.list_actions.save_columns.accesskey "S">
 <!ENTITY ev.staff.patron.ue_xhtml.ev_user_editor.label "Evergreen User Editor">
 <!ENTITY ev.staff.patron.ue_xhtml.welcome.label "Welcome ">
 <!ENTITY ev.staff.patron.ue_xhtml.view_errors.label "View Errors">
index a8cfa56..69dd353 100644 (file)
@@ -328,38 +328,9 @@ circ.copy_status.prototype = {
                                                        }
                                                }
                                        ],
-                                       'cmd_copy_status_export' : [
-                                               ['command'],
-                                               function() {
-                                                       try {
-                                                               obj.list.dump_csv_to_clipboard();
-                                                       } catch(E) {
-                                                               obj.error.standard_unexpected_error_alert('export',E); 
-                                                       }
-                                               }
-                                       ],
-                                       'cmd_copy_status_print_export' : [
-                                               ['command'],
-                                               function() {
-                                                       try {
-                                                               obj.list.on_all_fleshed =
-                                                                       function() {
-                                                                               try {
-                                                                                       dump( obj.list.dump_csv() + '\n' );
-                                                                                       //copy_to_clipboard(obj.list.dump_csv());
-                                                                                       JSAN.use('util.print'); var print = new util.print();
-                                                                                       print.simple(obj.list.dump_csv(),{'content_type':'text/plain'});
-                                                                                       setTimeout(function(){ obj.list.on_all_fleshed = null; },0);
-                                                                               } catch(E) {
-                                                                                       obj.error.standard_unexpected_error_alert('export',E); 
-                                                                               }
-                                                                       };
-                                                               obj.list.full_retrieve();
-                                                       } catch(E) {
-                                                               obj.error.standard_unexpected_error_alert('export',E); 
-                                                       }
-                                               }
-                                       ],
+                                       'cmd_csv_to_clipboard' : [ ['command'], function() { obj.list.dump_csv_to_clipboard(); } ],
+                                       'cmd_csv_to_printer' : [ ['command'], function() { obj.list.dump_csv_to_printer(); } ],
+                                       'cmd_csv_to_file' : [ ['command'], function() { obj.list.dump_csv_to_file( { 'defaultFileName' : 'item_status.txt' } ); } ],
 
                                        'cmd_add_items' : [
                                                ['command'],
index 872f6ef..c99818d 100644 (file)
                <command id="cmd_copy_status_submit_barcode" />
                <command id="cmd_copy_status_upload_file" />
                <command id="cmd_copy_status_print" />
-               <command id="cmd_copy_status_export" />
-               <command id="cmd_copy_status_print_export" />
-               <command id="cmd_copy_status_reprint" />
-               <command id="cmd_copy_status_done" />
+               <command id="cmd_csv_to_clipboard" />
+               <command id="cmd_csv_to_printer" />
+               <command id="cmd_csv_to_file" />
                <command id="save_columns" />
                <command id="sel_copy_details" disabled="true"/>
                <command id="sel_mark_items_damaged" disabled="true"/>
index ae46bf4..5ba8b01 100644 (file)
 </hbox>
 
 <hbox id="copy_status_bottom_ui">
+    <button id="list_actions" oncommand="this.firstChild.showPopup();"
+        label="&staff.generic.list_actions.label;" 
+        accesskey="&staff.generic.list_actions.accesskey;" 
+        type="menu" allowevents="true">
+        <menupopup id="list_actions_popup">
+               <menuitem command="sel_clip" label="&staff.generic.list_actions.sel_clip.label;" accesskey="&staff.generic.list_actions.sel_clip.accesskey;" disabled="true" />
+           <menuitem command="cmd_csv_to_printer" label="&staff.generic.list_actions.csv_to_printer.label;" accesskey="&staff.generic.list_actions.csv_to_printer.accesskey;" />
+               <menuitem command="cmd_csv_to_clipboard" label="&staff.generic.list_actions.csv_to_clipboard.label;" accesskey="&staff.generic.list_actions.csv_to_clipboard.accesskey;" />
+               <menuitem command="cmd_csv_to_file" label="&staff.generic.list_actions.csv_to_file.label;" accesskey="&staff.generic.list_actions.csv_to_file.accesskey;" />
+               <menuitem command="save_columns" label="&staff.generic.list_actions.save_columns.label;" accesskey="&staff.generic.list_actions.save_columns.accesskey;" />
+        </menupopup>
+    </button>
+
        <button id="copy_status_print" label="&staff.circ.copy_status_overlay.copy_status_print.label;" command="cmd_copy_status_print" accesskey="&staff.circ.copy_status_overlay.copy_status_print.accesskey;"/>
-       <button id="copy_status_export" label="&staff.circ.copy_status_overlay.copy_status_export.label;" command="cmd_copy_status_export" accesskey="&staff.circ.copy_status_overlay.copy_status_export.accesskey;"/>
-       <button id="copy_status_print_export" label="&staff.circ.copy_status_overlay.copy_status_print_export.label;" command="cmd_copy_status_print_export" accesskey="&staff.circ.copy_status_overlay.copy_status_print_export.accesskey;"/>
-       <checkbox id="trim_list" label="&staff.circ.copy_status_overlay.trim_list.label;" checked="true" persist="checked" oncommand="try{this.setAttribute('checked',this.checked);}catch(E){alert(E);}" /> 
+    <checkbox id="trim_list" label="&staff.circ.copy_status_overlay.trim_list.label;" checked="true" persist="checked" oncommand="try{this.setAttribute('checked',this.checked);}catch(E){alert(E);}" />
        <checkbox id="strict_barcode" label="&staff.circ.copy_status_overlay.strict_barcode.label;" checked="false" persist="checked" oncommand="try{this.setAttribute('checked',this.checked);}catch(E){alert(E);}" /> 
        <spacer flex="1"/>
 </hbox>