From: Jason Etheridge <jason@esilibrary.com> Date: Fri, 20 May 2011 07:33:52 +0000 (-0400) Subject: css hooks so we can hide class, affix, and part columns in volume creator/editor... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=45b6c0503f2095fb5bd9e1975188c5f1b6ff5d88;p=evergreen%2Fmasslnc.git css hooks so we can hide class, affix, and part columns in volume creator/editor. can help with screen real estate with the horizontal vol/copy editor Signed-off-by: Jason Etheridge <jason@esilibrary.com> --- diff --git a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js index 1aea205c1d..7bc79c1a63 100644 --- a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js +++ b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js @@ -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 { diff --git a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.xul b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.xul index 9e88c1ae68..0cbf65df34 100644 --- a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.xul +++ b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.xul @@ -50,15 +50,15 @@ <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" /> diff --git a/Open-ILS/xul/staff_client/server/cat/volume_editor.js b/Open-ILS/xul/staff_client/server/cat/volume_editor.js index 92aeb214cc..db6e1b85a5 100644 --- a/Open-ILS/xul/staff_client/server/cat/volume_editor.js +++ b/Open-ILS/xul/staff_client/server/cat/volume_editor.js @@ -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(); diff --git a/Open-ILS/xul/staff_client/server/cat/volume_editor.xul b/Open-ILS/xul/staff_client/server/cat/volume_editor.xul index 5a4e5c634b..b6e1d584fa 100644 --- a/Open-ILS/xul/staff_client/server/cat/volume_editor.xul +++ b/Open-ILS/xul/staff_client/server/cat/volume_editor.xul @@ -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 --> @@ -49,18 +50,18 @@ <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> diff --git a/Open-ILS/xul/staff_client/server/skin/cat.css b/Open-ILS/xul/staff_client/server/skin/cat.css index 151df8a4b6..d17d0df589 100644 --- a/Open-ILS/xul/staff_client/server/skin/cat.css +++ b/Open-ILS/xul/staff_client/server/skin/cat.css @@ -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; } +*/