css hooks so we can hide class, affix, and part columns in volume creator/editor...
authorJason Etheridge <jason@esilibrary.com>
Fri, 20 May 2011 07:33:52 +0000 (03:33 -0400)
committerJason Etheridge <jason@esilibrary.com>
Fri, 20 May 2011 14:52:28 +0000 (10:52 -0400)
Signed-off-by: Jason Etheridge <jason@esilibrary.com>

Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js
Open-ILS/xul/staff_client/server/cat/volume_copy_creator.xul
Open-ILS/xul/staff_client/server/cat/volume_editor.js
Open-ILS/xul/staff_client/server/cat/volume_editor.xul
Open-ILS/xul/staff_client/server/skin/cat.css

index 1aea205..7bc79c1 100644 (file)
@@ -297,15 +297,18 @@ g.render_callnumber_copy_count_entry = function(row,ou_id,count) {
     var x = document.createElement('label'); r.appendChild(x);
         x.setAttribute('value', $("catStrings").getString('staff.cat.volume_copy_creator.render_callnumber_copy_count_entry.classification'));
         x.setAttribute('style','font-weight: bold');
+        x.setAttribute('class','cn_class');
     x = document.createElement('label'); r.appendChild(x);
         x.setAttribute('value', $("catStrings").getString('staff.cat.volume_copy_creator.render_callnumber_copy_count_entry.prefix'));
         x.setAttribute('style','font-weight: bold');
+        x.setAttribute('class','cn_prefix');
     x = document.createElement('label'); r.appendChild(x);
         x.setAttribute('value', $("catStrings").getString('staff.cat.volume_copy_creator.render_callnumber_copy_count_entry.call_nums'));
         x.setAttribute('style','font-weight: bold');
     x = document.createElement('label'); r.appendChild(x);
         x.setAttribute('value', $("catStrings").getString('staff.cat.volume_copy_creator.render_callnumber_copy_count_entry.suffix'));
         x.setAttribute('style','font-weight: bold');
+        x.setAttribute('class','cn_suffix');
     x = document.createElement('label'); r.appendChild(x);
         x.setAttribute('value',$("catStrings").getString('staff.cat.volume_copy_creator.render_callnumber_copy_count_entry.num_of_copies'));
         x.setAttribute('style','font-weight: bold');
@@ -401,10 +404,12 @@ g.render_callnumber_copy_count_entry = function(row,ou_id,count) {
 
             /**** CLASSIFICATION COLUMN ****/
             var classification_column_box = document.createElement('vbox');
+            classification_column_box.setAttribute('class','cn_class');
             r.appendChild(classification_column_box);
 
             /**** PREFIX COLUMN ****/
             var prefix_column_box = document.createElement('vbox');
+            prefix_column_box.setAttribute('class','cn_prefix');
             r.appendChild(prefix_column_box);
 
             /**** CALLNUMBER COLUMN ****/
@@ -464,6 +469,7 @@ g.render_callnumber_copy_count_entry = function(row,ou_id,count) {
 
             /**** SUFFIX COLUMN ****/
             var suffix_column_box = document.createElement('vbox');
+            suffix_column_box.setAttribute('class','cn_suffix');
             r.appendChild(suffix_column_box);
                 var suffix_column_menulist = g.render_suffix_menu(call_number_column_textbox);
                 suffix_column_menulist.addEventListener(
@@ -664,6 +670,7 @@ g.render_barcode_entry = function(node,callnumber_composite_key,count,ou_id) {
                 tb = document.createElement('textbox');
                 tb_part_box.appendChild(tb);
                 part_menu = g.render_part_menu(tb);
+                part_menu.setAttribute('class','part_column');
                 tb_part_box.appendChild(part_menu);
                 set_handlers = true;
             } else {
index 9e88c1a..0cbf65d 100644 (file)
         <hbox flex="0">
             <hbox id="batch_bar">
                 <label value="&staff.cat.volume_copy_creator.batch_bar;"/>
-                <label value="&staff.cat.volume_copy_creator.batch_bar.call_number.classification;"/>
-                <hbox id="batch_class"/>
-                <label value="&staff.cat.volume_copy_creator.batch_bar.call_number.prefix;"/>
-                <hbox id="batch_prefix"/>
+                <label class="cn_class" value="&staff.cat.volume_copy_creator.batch_bar.call_number.classification;"/>
+                <hbox class="cn_class" id="batch_class"/>
+                <label class="cn_prefix" value="&staff.cat.volume_copy_creator.batch_bar.call_number.prefix;"/>
+                <hbox class="cn_prefix" id="batch_prefix"/>
                 <label value="&staff.cat.volume_copy_creator.batch_bar.call_number.label.label;"
                     accesskey="&staff.cat.volume_copy_creator.batch_bar.call_number.label.accesskey;" control="marc_cn_menulist"/>
                 <hbox id="marc_cn"/>
-                <label value="&staff.cat.volume_copy_creator.batch_bar.call_number.suffix;"/>
-                <hbox id="batch_suffix"/>
+                <label class="cn_suffix" value="&staff.cat.volume_copy_creator.batch_bar.call_number.suffix;"/>
+                <hbox class="cn_suffix" id="batch_suffix"/>
                 <hbox id="batch_button_box"/>
             </hbox>
             <spacer flex="1" />
index 92aeb21..db6e1b8 100644 (file)
@@ -24,10 +24,16 @@ function my_init() {
         for (var i = 0; i < g.volumes.length; i++) {
             var row = document.createElement('row'); rows.appendChild(row);
             var lib_label = document.createElement('label'); row.appendChild(lib_label);
-            var class_ml = g.render_class_menu(i); row.appendChild(class_ml);
-            var prefix_ml = g.render_prefix_menu(i); row.appendChild(prefix_ml);
+            var class_ml = g.render_class_menu(i);
+                class_ml.setAttribute('class','cn_class');
+                row.appendChild(class_ml);
+            var prefix_ml = g.render_prefix_menu(i);
+                prefix_ml.setAttribute('class','cn_prefix');
+                row.appendChild(prefix_ml);
             var label_tb = document.createElement('textbox'); row.appendChild(label_tb);
-            var suffix_ml = g.render_suffix_menu(i); row.appendChild(suffix_ml);
+            var suffix_ml = g.render_suffix_menu(i);
+                suffix_ml.setAttribute('class','cn_suffix');
+                row.appendChild(suffix_ml);
             if (!first_tb) { first_tb = label_tb; }
 
             var lib_id = g.volumes[i].owning_lib();
index 5a4e5c6..b6e1d58 100644 (file)
@@ -6,6 +6,7 @@
 <!-- STYLESHEETS -->
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 <?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?>
+<?xml-stylesheet href="/xul/server/skin/cat.css" type="text/css"?>
 
 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
 <!-- LOCALIZATION -->
         <grid flex="1">
             <columns>
                 <column />
-                <column />
-                <column />
+                <column class="cn_class"/>
+                <column class="cn_prefix"/>
                 <column flex="1"/>
-                <column />
+                <column class="cn_suffix"/>
             </columns>
             <rows id="rows">
                 <row>
                     <label value="&staff.cat.volume_editor.owning_lib;" class="header"/>
-                    <label value="&staff.cat.volume_editor.classification;" class="header"/>
-                    <label value="&staff.cat.volume_editor.prefix;" class="header"/>
+                    <label value="&staff.cat.volume_editor.classification;" class="header cn_class"/>
+                    <label value="&staff.cat.volume_editor.prefix;" class="header cn_prefix"/>
                     <label value="&staff.cat.volume_editor.label;" class="header"/>
-                    <label value="&staff.cat.volume_editor.suffix;" class="header"/>
+                    <label value="&staff.cat.volume_editor.suffix;" class="header cn_suffix"/>
                 </row>
             </rows>
         </grid>
index 151df8a..d17d0df 100644 (file)
@@ -9,3 +9,11 @@
 .copy_editor_field_required { border: solid thin red; }
 
 hbox#batch_bar { background-color: gray; }
+
+/* How you might hide the classification, affix, and parts columns in the volume creator/editor */
+/*
+.cn_class { display: none; }
+.cn_prefix { display: none; }
+.cn_suffix { display: none; }
+.part_column { display: none; }
+*/