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

Open-ILS/xul/staff_client/server/patron/holds.js
Open-ILS/xul/staff_client/server/patron/holds.xul
Open-ILS/xul/staff_client/server/patron/holds_overlay.xul

index 1374eff..19677eb 100644 (file)
@@ -215,16 +215,9 @@ patron.holds.prototype = {
                                                        }
                                                }
                                        ],
-                                       'cmd_holds_export' : [
-                                               ['command'],
-                                               function() {
-                                                       try {
-                                                               obj.list.dump_csv_to_clipboard();
-                                                       } catch(E) {
-                                                               obj.error.standard_unexpected_error_alert('export 1',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' : 'holds.txt' } ); } ],
 
                                        'cmd_show_notifications' : [
                                                ['command'],
index 9b7f25c..7ec7c4e 100644 (file)
                <command id="sel_copy_details" disabled="true"/>
                <command id="sel_patron" disabled="true"/>
                <command id="sel_clip" />
+        <command id="cmd_csv_to_clipboard" />
+               <command id="cmd_csv_to_printer" />
+               <command id="cmd_csv_to_file" />
+
                <command id="cmd_holds_print" />
-               <command id="cmd_holds_export" />
                <command id="cmd_show_catalog" />
                <command id="cmd_retrieve_patron" />
                <command id="cmd_show_notifications" />
index e3f26bf..321262b 100644 (file)
 </hbox>
 
 <hbox id="holds_bottom_ui" flex="1">
-       <spacer flex="1"/>
+    <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;" />
+            <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="holds_print" label="Print" command="cmd_holds_print" accesskey="P" />
-       <button id="holds_export" 
-               label="&staff.patron.holds_overlay.holds_export.label;"
-               command="cmd_holds_export"
-               accesskey=""/>
+       <spacer flex="1"/>
 </hbox>
 
 </overlay>