rough cut a horizontal variant of the unified volume/copy editor. still need some...
authorJason Etheridge <jason@esilibrary.com>
Tue, 22 Mar 2011 21:42:56 +0000 (17:42 -0400)
committerJason Etheridge <jason@esilibrary.com>
Tue, 22 Mar 2011 21:42:56 +0000 (17:42 -0400)
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/renumber_me.data.org-setting-ui.cat.volume_copy_editor.horizontal.sql [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/cat/opac.js
Open-ILS/xul/staff_client/chrome/content/main/constants.js
Open-ILS/xul/staff_client/chrome/content/main/menu.js
Open-ILS/xul/staff_client/server/cat/bib_brief.js
Open-ILS/xul/staff_client/server/cat/copy_browser.js
Open-ILS/xul/staff_client/server/cat/volume_copy_editor_horiz.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/server/circ/copy_status.js

index 7c40679..5a32b09 100644 (file)
@@ -7943,3 +7943,17 @@ INSERT INTO action_trigger.environment (event_def, path) VALUES
     (37, 'circ_lib.billing_address')
 ;
 
+-- "renumber_me.data.org-setting-ui.cat.volume_copy_editor.horizontal.sql"
+
+INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES (
+    'ui.cat.volume_copy_editor.horizontal',
+    oils_i18n_gettext(
+        'ui.cat.volume_copy_editor.horizontal',
+        'GUI: Horizontal layout for Volume/Copy Creator/Editor.',
+        'coust', 'label'),
+    oils_i18n_gettext(
+        'ui.cat.volume_copy_editor.horizontal',
+        'The main entry point for this interface is in Holdings Maintenance, Actions for Selected Rows, Edit Item Attributes / Call Numbers / Replace Barcodes.  This setting changes the top and bottom panes for that interface into left and right panes.',
+        'coust', 'description'),
+    'bool'
+);
diff --git a/Open-ILS/src/sql/Pg/upgrade/renumber_me.data.org-setting-ui.cat.volume_copy_editor.horizontal.sql b/Open-ILS/src/sql/Pg/upgrade/renumber_me.data.org-setting-ui.cat.volume_copy_editor.horizontal.sql
new file mode 100644 (file)
index 0000000..87d8fa2
--- /dev/null
@@ -0,0 +1,18 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('renumber_me'); -- phasefx
+
+INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES (
+    'ui.cat.volume_copy_editor.horizontal',
+    oils_i18n_gettext(
+        'ui.cat.volume_copy_editor.horizontal',
+        'GUI: Horizontal layout for Volume/Copy Creator/Editor.',
+        'coust', 'label'),
+    oils_i18n_gettext(
+        'ui.cat.volume_copy_editor.horizontal',
+        'The main entry point for this interface is in Holdings Maintenance, Actions for Selected Rows, Edit Item Attributes / Call Numbers / Replace Barcodes.  This setting changes the top and bottom panes for that interface into left and right panes.',
+        'coust', 'description'),
+    'bool'
+);
+
+COMMIT;
index 2208114..7c64f92 100644 (file)
@@ -831,8 +831,10 @@ function add_volumes() {
 
         var title = document.getElementById('offlineStrings').getFormattedString('staff.circ.copy_status.add_volumes.title', [docid]);
 
+        var horizontal_interface = String( g.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
+        var url = window.xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
         var w = xulG.new_tab(
-            window.xulG.url_prefix(urls.XUL_VOLUME_COPY_CREATOR),
+            url,
             { 'tab_name' : title },
             { 'doc_id' : docid, 'ou_ids' : [ ses('ws_ou') ] }
         );
index dd80116..802592d 100644 (file)
@@ -475,6 +475,7 @@ var urls = {
     'XUL_VERIFY_CREDENTIALS' : '/xul/server/main/verify_credentials.xul',
     'XUL_VOLUME_BUCKETS' : '/xul/server/cat/volume_buckets.xul',
     'XUL_VOLUME_COPY_CREATOR' : '/xul/server/cat/volume_copy_editor.xul',
+    'XUL_VOLUME_COPY_CREATOR_HORIZONTAL' : '/xul/server/cat/volume_copy_editor_horiz.xul',
     'XUL_VOLUME_COPY_CREATOR_ORIGINAL' : '/xul/server/cat/volume_copy_creator.xul',
     'XUL_VOLUME_EDITOR' : '/xul/server/cat/volume_editor.xul',
     'XUL_WORK_LOG' : '/xul/server/admin/work_log.xul',
index 28356de..9a219a8 100644 (file)
@@ -1592,8 +1592,10 @@ main.menu.prototype = {
     },
     'volume_item_creator' : function(params) {
         var obj = this;
+        var horizontal_interface = String( obj.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
+        var url = obj.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
         var w = obj.new_tab(
-            obj.url_prefix(urls.XUL_VOLUME_COPY_CREATOR),
+            url,
             { 'tab_name' : document.getElementById('offlineStrings').getString('staff.cat.create_or_rebarcode_items') },
             params
         );
index f2328a4..db87e5b 100644 (file)
@@ -9,13 +9,13 @@ function my_init() {
         JSAN.use('util.error'); g.error = new util.error();
         g.error.sdump('D_TRACE','my_init() for cat_bib_brief.xul');
 
-        JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
+        JSAN.use('OpenILS.data'); g.data = new OpenILS.data(); g.data.init({'via':'stash'});
 
         docid = xul_param('docid');
 
         var key = location.pathname + location.search + location.hash;
-        if (!docid && typeof data.modal_xulG_stack != 'undefined' && typeof data.modal_xulG_stack[key] != 'undefined') {
-            var xulG = data.modal_xulG_stack[key][ data.modal_xulG_stack[key].length - 1 ];
+        if (!docid && typeof g.data.modal_xulG_stack != 'undefined' && typeof g.data.modal_xulG_stack[key] != 'undefined') {
+            var xulG = g.data.modal_xulG_stack[key][ g.data.modal_xulG_stack[key].length - 1 ];
             if (typeof xulG == 'object') {
                 docid = xulG.docid;
             }
@@ -28,7 +28,7 @@ function my_init() {
 
         if (docid > -1) {
 
-            data.last_record = docid; data.stash('last_record');
+            g.data.last_record = docid; g.data.stash('last_record');
 
             g.network.simple_request(
                 'MODS_SLIM_RECORD_RETRIEVE.authoritative',
@@ -147,8 +147,10 @@ function add_volumes() {
 
         var title = document.getElementById('offlineStrings').getFormattedString('staff.circ.copy_status.add_volumes.title', [docid]);
 
+        var horizontal_interface = String( g.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
+        var url = window.xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
         var w = xulG.new_tab(
-            window.xulG.url_prefix(urls.XUL_VOLUME_COPY_CREATOR),
+            url,
             { 'tab_name' : title },
             { 'doc_id' : docid, 'ou_ids' : [ ses('ws_ou') ] }
         );
index a7963de..e962dfd 100644 (file)
@@ -288,8 +288,10 @@ cat.copy_browser.prototype = {
 
                                     var title = document.getElementById('catStrings').getString('staff.cat.copy_browser.add_item.title');
 
+                                    var horizontal_interface = String( obj.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
+                                    var url = window.xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
                                     var w = xulG.new_tab(
-                                        window.xulG.url_prefix(urls.XUL_VOLUME_COPY_CREATOR),
+                                        url,
                                         { 'tab_name' : title },
                                         {
                                             'doc_id' : obj.docid, 
@@ -536,8 +538,10 @@ cat.copy_browser.prototype = {
 
                                     var title = document.getElementById('catStrings').getString('staff.cat.copy_browser.add_volume.title');
 
+                                    var horizontal_interface = String( obj.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
+                                    var url = window.xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
                                     var w = xulG.new_tab(
-                                        window.xulG.url_prefix(urls.XUL_VOLUME_COPY_CREATOR),
+                                        url,
                                         { 'tab_name' : title },
                                         { 'doc_id' : obj.docid, 'ou_ids' : list, 'onrefresh' : function() { obj.refresh_list(); } }
                                     );
diff --git a/Open-ILS/xul/staff_client/server/cat/volume_copy_editor_horiz.xul b/Open-ILS/xul/staff_client/server/cat/volume_copy_editor_horiz.xul
new file mode 100644 (file)
index 0000000..df1b459
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!-- Application: Evergreen Staff Client -->
+<!-- Screen: Unified Call Number / Item Editor/Creator -->
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- STYLESHEETS -->
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?>
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- LOCALIZATION -->
+<!DOCTYPE window PUBLIC "" ""[
+    <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
+]>
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- OVERLAYS -->
+<?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
+
+<window id="volume_item_win"
+    onload="try { my_init(); font_helper(); persist_helper(); } catch(E) { alert(E); }"
+    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+    <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+    <!-- BEHAVIOR -->
+    <script type="text/javascript">
+        var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true;
+    </script>
+    <scripts id="openils_util_scripts"/>
+
+    <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
+    <script type="text/javascript" src="volume_copy_editor.js"/>
+
+    <hbox flex="1">
+        <vbox id="top_pane" flex="1" oils_persist="width">
+            <hbox id="template_bar_holder"/>
+            <browser id="volume_pane" flex="1" />
+        </vbox>
+        <splitter
+            collapse="after"
+            resizeafter="flex"
+            resizebefore="flex"
+            oils_persist="state hidden"
+            oils_persist_peers="top_pane bottom_pane">
+            <grippy/>
+        </splitter>
+        <vbox id="bottom_pane" flex="1" oils_persist="width">
+            <browser id="item_pane" flex="1" />
+            <hbox id="bottom_bar"/>
+        </vbox>
+    </hbox>
+
+</window>
+
index 62a56a3..632e77d 100644 (file)
@@ -532,8 +532,10 @@ circ.copy_status.prototype = {
     
                                     var title = document.getElementById('circStrings').getFormattedString('staff.circ.copy_status.add_items.title', [r]);
     
+                                    var horizontal_interface = String( obj.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
+                                    var url = window.xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
                                     var w = xulG.new_tab(
-                                        window.xulG.url_prefix(urls.XUL_VOLUME_COPY_CREATOR),
+                                        url,
                                         { 'tab_name' : title },
                                         { 'doc_id' : r, 'ou_ids' : list, 'copy_shortcut' : copy_shortcut[r] }
                                     );
@@ -682,8 +684,10 @@ circ.copy_status.prototype = {
 
                                     var title = document.getElementById('circStrings').getFormattedString('staff.circ.copy_status.add_volumes.title', [r]);
 
+                                    var horizontal_interface = String( obj.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
+                                    var url = window.xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
                                     var w = xulG.new_tab(
-                                        window.xulG.url_prefix(urls.XUL_VOLUME_COPY_CREATOR),
+                                        url,
                                         { 'tab_name' : title },
                                         { 'doc_id' : r, 'ou_ids' : list }
                                     );