[open-ils-commits] r20287 - in trunk/Open-ILS: src/sql/Pg src/sql/Pg/upgrade web/opac/locale/en-US xul/staff_client/chrome/content/cat xul/staff_client/chrome/content/main xul/staff_client/server/cat xul/staff_client/server/circ (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Apr 22 14:09:43 EDT 2011


Author: phasefx
Date: 2011-04-22 14:09:39 -0400 (Fri, 22 Apr 2011)
New Revision: 20287

Added:
   trunk/Open-ILS/src/sql/Pg/upgrade/0524.data.toggle_unified_volume_copy_editor.sql
Modified:
   trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
   trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
   trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
   trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
   trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
   trunk/Open-ILS/xul/staff_client/server/cat/bib_brief.js
   trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.js
   trunk/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js
   trunk/Open-ILS/xul/staff_client/server/circ/copy_status.js
Log:
org unit setting for making unified Volume/Item interface optional.  fix the volume interface in its standalone incarnation, and tweak the label for editing items in holdings maintenance


Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql	2011-04-22 15:56:53 UTC (rev 20286)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql	2011-04-22 18:09:39 UTC (rev 20287)
@@ -57,7 +57,7 @@
     install_date    TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
 );
 
-INSERT INTO config.upgrade_log (version) VALUES ('0523'); -- dbs
+INSERT INTO config.upgrade_log (version) VALUES ('0524'); -- phasefx
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,

Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql	2011-04-22 15:56:53 UTC (rev 20286)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql	2011-04-22 18:09:39 UTC (rev 20287)
@@ -7984,3 +7984,13 @@
   oils_i18n_gettext( 'cat.default_copy_status_normal', 'Default status when a copy is created using the normal volume/copy creator interface.', 'coust', 'description'),
   'link', 'ccs'
 );
+
+-- 0524.data.toggle_unified_volume_copy_editor.sql
+
+INSERT into config.org_unit_setting_type
+( name, label, description, datatype ) VALUES
+( 'ui.unified_volume_copy_editor',
+  oils_i18n_gettext( 'ui.unified_volume_copy_editor', 'GUI: Unified Volume/Item Creator/Editor', 'coust', 'label'),
+  oils_i18n_gettext( 'ui.unified_volume_copy_editor', 'If true combines the Volume/Copy Creator and Item Attribute Editor in some instances.', 'coust', 'description'),
+  'bool'
+);

Added: trunk/Open-ILS/src/sql/Pg/upgrade/0524.data.toggle_unified_volume_copy_editor.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0524.data.toggle_unified_volume_copy_editor.sql	                        (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0524.data.toggle_unified_volume_copy_editor.sql	2011-04-22 18:09:39 UTC (rev 20287)
@@ -0,0 +1,13 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0524'); -- phasefx
+
+INSERT into config.org_unit_setting_type
+( name, label, description, datatype ) VALUES
+( 'ui.unified_volume_copy_editor',
+  oils_i18n_gettext( 'ui.unified_volume_copy_editor', 'GUI: Unified Volume/Item Creator/Editor', 'coust', 'label'),
+  oils_i18n_gettext( 'ui.unified_volume_copy_editor', 'If true combines the Volume/Copy Creator and Item Attribute Editor in some instances.', 'coust', 'description'),
+  'bool'
+);
+
+COMMIT;

Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2011-04-22 15:56:53 UTC (rev 20286)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2011-04-22 18:09:39 UTC (rev 20287)
@@ -2517,7 +2517,7 @@
 <!ENTITY staff.cat.copy_browser.actions.cmd_create_brt.accesskey "K">
 <!ENTITY staff.cat.copy_browser.actions.sel_patron.label "Show Last Few Circulations">
 <!ENTITY staff.cat.copy_browser.actions.sel_patron.accesskey "L">
-<!ENTITY staff.cat.copy_browser.actions.cmd_edit_items.label "Edit Item Attributes / Call Numbers / Replace Barcodes">
+<!ENTITY staff.cat.copy_browser.actions.cmd_edit_items.label "Edit Items">
 <!ENTITY staff.cat.copy_browser.actions.cmd_edit_items.accesskey "E">
 <!ENTITY staff.cat.copy_browser.actions.cmd_transfer_items.label "Transfer Items to Previously Marked Volume">
 <!ENTITY staff.cat.copy_browser.actions.cmd_transfer_items.accesskey "T">

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js	2011-04-22 15:56:53 UTC (rev 20286)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js	2011-04-22 18:09:39 UTC (rev 20287)
@@ -861,8 +861,15 @@
 
         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 url;
+        var unified_interface = String( g.data.hash.aous['ui.unified_volume_copy_editor'] ) == 'true';
+        if (unified_interface) {
+            var horizontal_interface = String( g.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
+            url = window.xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
+        } else {
+            url = window.xulG.url_prefix( urls.XUL_VOLUME_COPY_CREATOR_ORIGINAL );
+        }
+
         var w = xulG.new_tab(
             url,
             { 'tab_name' : title },

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js	2011-04-22 15:56:53 UTC (rev 20286)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js	2011-04-22 18:09:39 UTC (rev 20287)
@@ -1928,8 +1928,14 @@
     },
     '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 url;
+        var unified_interface = String( obj.data.hash.aous['ui.unified_volume_copy_editor'] ) == 'true';
+        if (unified_interface) {
+            var horizontal_interface = String( obj.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
+            url = obj.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
+        } else {
+            url = obj.url_prefix( urls.XUL_VOLUME_COPY_CREATOR_ORIGINAL );
+        }
         var w = obj.new_tab(
             url,
             { 'tab_name' : document.getElementById('offlineStrings').getString('staff.cat.create_or_rebarcode_items') },

Modified: trunk/Open-ILS/xul/staff_client/server/cat/bib_brief.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/bib_brief.js	2011-04-22 15:56:53 UTC (rev 20286)
+++ trunk/Open-ILS/xul/staff_client/server/cat/bib_brief.js	2011-04-22 18:09:39 UTC (rev 20287)
@@ -147,8 +147,14 @@
 
         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 url;
+        var unified_interface = String( g.data.hash.aous['ui.unified_volume_copy_editor'] ) == 'true';
+        if (unified_interface) {
+            var horizontal_interface = String( g.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
+            url = window.xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
+        } else {
+            url = window.xulG.url_prefix( urls.XUL_VOLUME_COPY_CREATOR_ORIGINAL );
+        }
         var w = xulG.new_tab(
             url,
             { 'tab_name' : title },

Modified: trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.js	2011-04-22 15:56:53 UTC (rev 20286)
+++ trunk/Open-ILS/xul/staff_client/server/cat/copy_browser.js	2011-04-22 18:09:39 UTC (rev 20287)
@@ -299,8 +299,15 @@
 
                                     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 url;
+                                    var unified_interface = String( obj.data.hash.aous['ui.unified_volume_copy_editor'] ) == 'true';
+                                    if (unified_interface) {
+                                        var horizontal_interface = String( obj.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
+                                        url = xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
+                                    } else {
+                                        url = xulG.url_prefix( urls.XUL_VOLUME_COPY_CREATOR_ORIGINAL );
+                                    }
+
                                     var w = xulG.new_tab(
                                         url,
                                         { 'tab_name' : title },
@@ -348,6 +355,12 @@
                             ['command'],
                             function() {
                                 try {
+                                    var unified_interface = String( obj.data.hash.aous['ui.unified_volume_copy_editor'] ) == 'true';
+                                    if (!unified_interface) {
+                                        obj.controller.control_map['old_cmd_edit_items'][1]();
+                                        return;
+                                    }
+
                                     JSAN.use('util.functional');
 
                                     var list = util.functional.filter_list(

Modified: trunk/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js	2011-04-22 15:56:53 UTC (rev 20286)
+++ trunk/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js	2011-04-22 18:09:39 UTC (rev 20287)
@@ -1084,7 +1084,6 @@
             copies = xulG.copies;
         } else {
             copies = g.gather_copies();
-            copies = blob.copies;
         }
 
         var dont_close = false;

Modified: trunk/Open-ILS/xul/staff_client/server/circ/copy_status.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/copy_status.js	2011-04-22 15:56:53 UTC (rev 20286)
+++ trunk/Open-ILS/xul/staff_client/server/circ/copy_status.js	2011-04-22 18:09:39 UTC (rev 20287)
@@ -544,8 +544,15 @@
     
                                     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 url;
+                                    var unified_interface = String( obj.data.hash.aous['ui.unified_volume_copy_editor'] ) == 'true';
+                                    if (unified_interface) {
+                                        var horizontal_interface = String( obj.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
+                                        url = window.xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
+                                    } else {
+                                        url = window.xulG.url_prefix( urls.XUL_VOLUME_COPY_CREATOR_ORIGINAL );
+                                    }
+
                                     var w = xulG.new_tab(
                                         url,
                                         { 'tab_name' : title },
@@ -696,8 +703,15 @@
 
                                     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 url;
+                                    var unified_interface = String( obj.data.hash.aous['ui.unified_volume_copy_editor'] ) == 'true';
+                                    if (unified_interface) {
+                                        var horizontal_interface = String( obj.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
+                                        url = window.xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
+                                    } else {
+                                        url = window.xulG.url_prefix( urls.XUL_VOLUME_COPY_CREATOR_ORIGINAL );
+                                    }
+
                                     var w = xulG.new_tab(
                                         url,
                                         { 'tab_name' : title },



More information about the open-ils-commits mailing list