hide parts of the volume/copy creator and item attribute editor when wrapped in unifi...
authorJason Etheridge <jason@esilibrary.com>
Sun, 20 Feb 2011 08:08:58 +0000 (03:08 -0500)
committerJason Etheridge <jason@esilibrary.com>
Wed, 2 Mar 2011 15:20:57 +0000 (10:20 -0500)
Open-ILS/xul/staff_client/server/cat/copy_editor.js
Open-ILS/xul/staff_client/server/cat/copy_editor.xul
Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js
Open-ILS/xul/staff_client/server/cat/volume_copy_creator.xul

index 7ea3948..e0edef1 100644 (file)
@@ -24,6 +24,10 @@ function my_init() {
         JSAN.use('OpenILS.data'); g.data = new OpenILS.data(); g.data.init({'via':'stash'});
         JSAN.use('util.network'); g.network = new util.network();
 
+        if (xulG.unified_interface) {
+            $('non_unified_buttons').hidden = true;
+        }
+
         g.docid = xul_param('docid',{'modal_xulG':true});
         g.handle_update = xul_param('handle_update',{'modal_xulG':true});
 
index a456da4..100617f 100644 (file)
         <hbox id="nav">
             <spacer flex="1"/>
             <button id="copy_notes" label="&staff.cat.copy_editor.copy_notes.label;" accesskey="&staff.cat.copy_editor.copy_notes.accesskey;" oncommand="g.copy_notes();"/>
-            <button id="save" label="&staff.cat.copy_editor.save.label;" hidden="true" accesskey="&staff.cat.copy_editor.save.accesskey;" oncommand="g.stash_and_close();"/>
-            <button id="cancel" label="&staff.cat.copy_editor.cancel.label;" accesskey="&staff.cat.copy_editor.cancel.accesskey;" oncommand="JSAN.use('util.widgets'); util.widgets.dispatch('close',window);"/>
+            <hbox id="non_unified_buttons">
+                <button id="save" label="&staff.cat.copy_editor.save.label;" hidden="true" accesskey="&staff.cat.copy_editor.save.accesskey;" oncommand="g.stash_and_close();"/>
+                <button id="cancel" label="&staff.cat.copy_editor.cancel.label;" accesskey="&staff.cat.copy_editor.cancel.accesskey;" oncommand="JSAN.use('util.widgets'); util.widgets.dispatch('close',window);"/>
+            </hbox>
         </hbox>
 
         <spacer/>
index e82366a..0f5a40e 100644 (file)
@@ -21,6 +21,10 @@ function my_init() {
 
         g.refresh = xul_param('onrefresh');
 
+        if (xulG.unified_interface) {
+            $('non_unified_buttons').hidden = true;
+        }
+
         /***********************************************************************************************************/
         /* Am I adding just copies or copies and volumes?  Or am I rebarcoding existing copies? */
 
@@ -224,8 +228,10 @@ g.render_callnumber_copy_count_entry = function(row,ou_id,count) {
             ou_id
         );
 
-        document.getElementById("EditThenCreate").disabled = false;
-        document.getElementById("CreateWithDefaults").disabled = false;
+        if (! xulG.unified_interface) {
+            document.getElementById("EditThenCreate").disabled = false;
+            document.getElementById("CreateWithDefaults").disabled = false;
+        }
     }
 
     function handle_change_call_number_column_textbox(ev) {
@@ -312,8 +318,10 @@ g.render_callnumber_copy_count_entry = function(row,ou_id,count) {
 g.render_barcode_entry = function(node,callnumber,count,ou_id) {
     try {
         function ready_to_create(ev) {
-            document.getElementById("EditThenCreate").disabled = false;
-            document.getElementById("CreateWithDefaults").disabled = false;
+            if (! xulG.unified_interface) {
+                document.getElementById("EditThenCreate").disabled = false;
+                document.getElementById("CreateWithDefaults").disabled = false;
+            }
         }
 
         JSAN.use('util.barcode'); 
index 0c50587..0a2ddb4 100644 (file)
@@ -56,7 +56,7 @@
             </rows>
         </grid>
     </groupbox>
-    <hbox style="border-bottom: solid black thin">
+    <hbox id="non_unified_buttons" style="border-bottom: solid black thin">
         <spacer flex="1" />
         <button id="CreateWithDefaults" disabled="true" oncommand="g.stash_and_close('noedit');"/>
         <button id="EditThenCreate" disabled="true" oncommand="g.stash_and_close('edit');"/>