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

Open-ILS/xul/staff_client/server/circ/in_house_use.js
Open-ILS/xul/staff_client/server/circ/in_house_use.xul

index da0e6b4..3c1c463 100644 (file)
@@ -36,7 +36,7 @@ circ.in_house_use.prototype = {
                                'map_row_to_columns' : circ.util.std_map_row_to_columns(),
                                'on_select' : function() {
                                        var sel = obj.list.retrieve_selection();
-                                       document.getElementById('clip_button').disabled = sel.length < 1;
+                                       document.getElementById('sel_clip').disabled = sel.length < 1;
                                }
                        }
                );
@@ -48,7 +48,10 @@ circ.in_house_use.prototype = {
                                        'save_columns' : [ [ 'command' ], function() { obj.list.save_columns(); } ],
                                        'sel_clip' : [
                                                ['command'],
-                                               function() { obj.list.clipboard(); }
+                                               function() { 
+                                                       obj.list.clipboard(); 
+                                                       obj.controller.view.in_house_use_barcode_entry_textbox.focus();
+                                               }
                                        ],
                                        'in_house_use_menu_placeholder' : [
                                                ['render'],
@@ -162,23 +165,19 @@ circ.in_house_use.prototype = {
                                                        obj.list.print(p);
                                                }
                                        ],
-                                       'cmd_in_house_use_export' : [
-                                               ['command'],
-                                               function() {
-                                                       obj.list.dump_csv_to_clipboard();
-                                               }
-                                       ],
+                                       'cmd_csv_to_clipboard' : [ ['command'], function() { 
+                        obj.list.dump_csv_to_clipboard(); 
+                        obj.controller.view.in_house_use_barcode_entry_textbox.focus();
+                    } ],
+                                       'cmd_csv_to_printer' : [ ['command'], function() { 
+                        obj.list.dump_csv_to_printer(); 
+                        obj.controller.view.in_house_use_barcode_entry_textbox.focus();
+                    } ],
+                                       'cmd_csv_to_file' : [ ['command'], function() { 
+                        obj.list.dump_csv_to_file( { 'defaultFileName' : 'checked_in.txt' } ); 
+                        obj.controller.view.in_house_use_barcode_entry_textbox.focus();
+                    } ]
 
-                                       'cmd_in_house_use_reprint' : [
-                                               ['command'],
-                                               function() {
-                                               }
-                                       ],
-                                       'cmd_in_house_use_done' : [
-                                               ['command'],
-                                               function() {
-                                               }
-                                       ]
                                }
                        }
                );
index 7ea88fd..8f1fccd 100644 (file)
 
        <commandset id="in_house_use_cmds">
                <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_in_house_use_submit_barcode" />
                <command id="cmd_in_house_use_print" />
-               <command id="cmd_in_house_use_export" />
-               <command id="cmd_in_house_use_reprint" />
-               <command id="cmd_in_house_use_done" />
                <command id="save_columns" />
        </commandset>
 
        <tree id="in_house_use_list" flex="1" enableColumnDrag="true" />
 
        <hbox id="in_house_use_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="in_house_use_print" 
                        label="&staff.circ.in_house_use.print.label;" 
                        command="cmd_in_house_use_print"
                        accesskey=""/>
-               <button id="in_house_use_export" 
-                       label="&staff.circ.in_house_use.export.label;"
-                       command="cmd_in_house_use_export"
-                       accesskey=""/>
                <checkbox id="trim_list" label="&staff.circ.in_house_use.trim_list.label;" checked="true" persist="checked"/> 
                <checkbox id="strict_barcode" label="&staff.circ.in_house_use.strict_barcode.label;" checked="false" persist="checked"/> 
                <spacer id="pcii3s" flex="1"/>
-               <button id="clip_button" disabled="true" command="sel_clip" label="&staff.circ.in_house_use.sel_clip.label;" />
-               <button id="save_cols_btn" command="save_columns" label="&staff.circ.in_house_use.save_cols_btn.label;" />
        </hbox>
 
 </groupbox>