rethinking record bucket interface
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 16 Mar 2008 08:51:04 +0000 (08:51 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 16 Mar 2008 08:51:04 +0000 (08:51 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9051 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/record_buckets.js
Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul

index 3c5b5ef..cc8c5bd 100644 (file)
@@ -8,6 +8,8 @@ cat.record_buckets = function (params) {
        JSAN.use('util.date');
        JSAN.use('OpenILS.data'); this.data = new OpenILS.data(); this.data.init({'via':'stash'});
        this.first_pause = true;
+    var x = document.getElementById("record_buckets_tabbox");
+    if (x) x.selectedIndex = 2;
 };
 
 cat.record_buckets.pick_file = function (defaultFileName) {
@@ -409,6 +411,15 @@ cat.record_buckets.prototype = {
                                                                var robj = obj.network.simple_request('BUCKET_DELETE',[ses(),'biblio',bucket]);
                                                                if (typeof robj == 'object') throw robj;
                                                                alert("Action completed.");
+                                                               var x = document.getElementById('info_box');
+                                x.setAttribute('hidden','true');
+                                obj.controller.view.cmd_record_buckets_delete_bucket.setAttribute('disabled','true');
+                                obj.controller.view.cmd_record_buckets_refresh.setAttribute('disabled','true');
+                                obj.controller.view.record_buckets_export_records.disabled = true;
+                                obj.controller.view.cmd_merge_records.setAttribute('disabled','true');
+                                obj.controller.view.cmd_delete_records.setAttribute('disabled','true');
+                                obj.controller.view.cmd_sel_opac.setAttribute('disabled','true');
+                                obj.controller.view.record_buckets_list_actions.disabled = true;
                                                                obj.controller.render('record_buckets_menulist_placeholder');
                                                                setTimeout(
                                                                        function() {
index 7d925bb..d5ee250 100644 (file)
 </box>
 
 <vbox id="cmvb1" flex="1">
-       <groupbox flex="1">
-               <caption label="Pending Records" />
-               <hbox id="pending_buckets_top_ui" />
-               <tree id="pending_records_list" flex="1" enableColumnDrag="true"/>
-               <hbox id="pending_buckets_bottom_ui" />
-       </groupbox>
-       <splitter><grippy /></splitter>
-       <groupbox flex="2">
-               <caption label="Bucket View" />
-               <hbox id="record_buckets_top_ui" />
-               <hbox id="info_box" />
-               <tree id="records_in_bucket_list" flex="1" enableColumnDrag="true"/>
-               <hbox id="record_buckets_bottom_ui" />
-       </groupbox>
+    <tabbox id="record_buckets_tabbox" flex="1" persist="selectedIndex">
+        <tabs>
+            <tab id="record_query_tab" label="Record Query" accesskey="Q"/>
+            <tab id="pending_records_tab" label="Pending Records" accesskey="P"/>
+            <tab id="bucket_view_tab" label="Bucket View" accesskey="V" />
+        </tabs>
+        <tabpanels flex="1">
+            <tabpanel id="record_query_panel">
+            </tabpanel>
+            <tabpanel id="pending_records_panel">
+                <groupbox flex="1">
+                    <caption label="Pending Records" />
+                    <hbox id="pending_buckets_top_ui" />
+                    <tree id="pending_records_list" flex="1" enableColumnDrag="true"/>
+                    <hbox id="pending_buckets_bottom_ui" />
+                </groupbox>
+            </tabpanel>
+            <tabpanel id="bucket_view_panel">
+                <vbox flex="1">
+                    <hbox>
+                        <hbox id="record_buckets_menulist_placeholder" />
+                        <button id="record_buckets_action_list" label="Bucket Actions" type="menu" allowevents="true">
+                            <menupopup id="record_buckets_action_list_popup">
+                                <menuitem command="cmd_record_buckets_new_bucket" label="New Bucket"/>
+                                <menuitem command="cmd_record_buckets_delete_bucket" label="Delete Bucket"/>
+                                <menuitem command="cmd_record_buckets_refresh" label="Refresh"/>
+                            </menupopup>
+                        </button>
+                    </hbox>
+                    <groupbox flex="1">
+                        <caption>
+                            <hbox id="info_box" />
+                        </caption>
+                        <hbox id="record_buckets_top_ui" />
+                        <tree id="records_in_bucket_list" flex="1" enableColumnDrag="true"/>
+                        <hbox id="record_buckets_bottom_ui" />
+                    </groupbox>
+                </vbox>
+            </tabpanel>
+        </tabpanels>
+    </tabbox>
 </vbox>
 
 <hbox id="pending_buckets_bottom_ui">
         </menupopup>
     </button>
        <spacer flex="1"/>
-       <button command="cmd_record_buckets_add" label="Add All" accesskey="A" image="/xul/server/skin/media/images/down_arrow.gif"/>
-       <button command="cmd_record_buckets_sel_add" label="Add Selected" accesskey="" image="/xul/server/skin/media/images/down_arrow.gif"/>
+       <button command="cmd_record_buckets_add" label="Add All to current Bucket" accesskey="A" image="/xul/server/skin/media/images/right_arrow.png"/>
+       <button command="cmd_record_buckets_sel_add" label="Add Selected to current Bucket" accesskey="" image="/xul/server/skin/media/images/right_arrow.png"/>
 </hbox>
 
 <hbox id="record_buckets_top_ui">
-       <hbox id="record_buckets_menulist_placeholder" />
-       <button id="record_buckets_action_list" label="Bucket Actions" type="menu" allowevents="true">
-        <menupopup id="record_buckets_action_list_popup">
-            <menuitem command="cmd_record_buckets_new_bucket" label="New Bucket"/>
-            <menuitem command="cmd_record_buckets_delete_bucket" label="Delete Bucket"/>
-            <menuitem command="cmd_record_buckets_refresh" label="Refresh"/>
-        </menupopup>
-    </button>
-       <spacer flex="1"/>
        <button command="cmd_record_buckets_delete_item" label="Remove Selected from Bucket" disabled="true" image="/xul/server/skin/media/images/icon_delete.gif"/>
-       <button command="cmd_pending_buckets_to_record_buckets" label="Add Selected to Bucket" disabled="true" image="/xul/server/skin/media/images/up_arrow.gif"/>
+       <button command="cmd_pending_buckets_to_record_buckets" label="Add Selected to Pending Records" disabled="true" image="/xul/server/skin/media/images/left_arrow.png"/>
 </hbox>
 
 <hbox id="info_box" hidden="true" style="font-size: large;">