From ac80f3b7c3e6e3104ad81ce8a424814155ee728d Mon Sep 17 00:00:00 2001 From: Dan Wells <dbw2@calvin.edu> Date: Thu, 26 May 2011 11:19:40 -0400 Subject: [PATCH] Distinguish between 'Show Groups' checkboxes in Serial Control Two different checkboxes ended up with the same ID, which, as one might expect, kinda worked and kinda didn't. Signed-off-by: Dan Wells <dbw2@calvin.edu> --- Open-ILS/xul/staff_client/server/serial/manage_dists.js | 10 +++++----- Open-ILS/xul/staff_client/server/serial/manage_dists.xul | 2 +- Open-ILS/xul/staff_client/server/serial/manage_subs.js | 10 +++++----- Open-ILS/xul/staff_client/server/serial/manage_subs.xul | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/serial/manage_dists.js b/Open-ILS/xul/staff_client/server/serial/manage_dists.js index 9e02c1fec7..1a5cacec2a 100644 --- a/Open-ILS/xul/staff_client/server/serial/manage_dists.js +++ b/Open-ILS/xul/staff_client/server/serial/manage_dists.js @@ -521,7 +521,7 @@ serial.manage_dists.prototype = { function(ev) { if (document.getElementById('refresh_button')) document.getElementById('refresh_button').focus(); JSAN.use('util.file'); var file = new util.file('manage_dists_prefs.'+obj.data.server_unadorned); - util.widgets.save_attributes(file, { 'sdist_lib_menu' : [ 'value' ], 'show_sdists' : [ 'checked' ], 'show_groups' : [ 'checked' ] }); + util.widgets.save_attributes(file, { 'sdist_lib_menu' : [ 'value' ], 'show_sdists' : [ 'checked' ], 'show_sdist_groups' : [ 'checked' ] }); obj.refresh_list(); }, false @@ -544,16 +544,16 @@ serial.manage_dists.prototype = { 'command', function(ev) { JSAN.use('util.file'); var file = new util.file('manage_dists_prefs.'+obj.data.server_unadorned); - util.widgets.save_attributes(file, { 'sdist_lib_menu' : [ 'value' ], 'show_sdists' : [ 'checked' ], 'show_groups' : [ 'checked' ] }); + util.widgets.save_attributes(file, { 'sdist_lib_menu' : [ 'value' ], 'show_sdists' : [ 'checked' ], 'show_sdist_groups' : [ 'checked' ] }); }, false ); - document.getElementById('show_groups').addEventListener( + document.getElementById('show_sdist_groups').addEventListener( 'command', function(ev) { JSAN.use('util.file'); var file = new util.file('manage_dists_prefs.'+obj.data.server_unadorned); - util.widgets.save_attributes(file, { 'sdist_lib_menu' : [ 'value' ], 'show_sdists' : [ 'checked' ], 'show_groups' : [ 'checked' ] }); + util.widgets.save_attributes(file, { 'sdist_lib_menu' : [ 'value' ], 'show_sdists' : [ 'checked' ], 'show_sdist_groups' : [ 'checked' ] }); }, false ); @@ -1001,7 +1001,7 @@ serial.manage_dists.prototype = { } } node.setAttribute('container','true'); - if (document.getElementById('show_groups').checked) { + if (document.getElementById('show_sdist_groups').checked) { node.setAttribute('open','true'); obj.funcs.push( function() { obj.on_select_sdist( sdist_tree.id(), true ); } ); } diff --git a/Open-ILS/xul/staff_client/server/serial/manage_dists.xul b/Open-ILS/xul/staff_client/server/serial/manage_dists.xul index e72b44d098..3daf758c01 100644 --- a/Open-ILS/xul/staff_client/server/serial/manage_dists.xul +++ b/Open-ILS/xul/staff_client/server/serial/manage_dists.xul @@ -73,7 +73,7 @@ vim:noet:sw=4:ts=4: <hbox id="serial_dist_lib_menu"/> <hbox> <checkbox id="show_sdists" label="Show Dists." /> - <checkbox id="show_groups" label="Show Groups" /> + <checkbox id="show_sdist_groups" label="Show Groups" /> <button id="serial_dist_add_button" label="&staff.cat.copy_browser.holdings_maintenance.refresh_button.label;" command="cmd_refresh_list" /> <spacer flex="1"/> <menubar> diff --git a/Open-ILS/xul/staff_client/server/serial/manage_subs.js b/Open-ILS/xul/staff_client/server/serial/manage_subs.js index 628ebbe50d..93fd587a5d 100644 --- a/Open-ILS/xul/staff_client/server/serial/manage_subs.js +++ b/Open-ILS/xul/staff_client/server/serial/manage_subs.js @@ -896,7 +896,7 @@ serial.manage_subs.prototype = { function(ev) { if (document.getElementById('refresh_button')) document.getElementById('refresh_button').focus(); JSAN.use('util.file'); var file = new util.file('manage_subs_prefs.'+obj.data.server_unadorned); - util.widgets.save_attributes(file, { 'lib_menu' : [ 'value' ], 'show_ssubs' : [ 'checked' ], 'show_groups' : [ 'checked' ] }); + util.widgets.save_attributes(file, { 'lib_menu' : [ 'value' ], 'show_ssubs' : [ 'checked' ], 'show_ssub_groups' : [ 'checked' ] }); obj.refresh_list(); }, false @@ -917,16 +917,16 @@ serial.manage_subs.prototype = { 'command', function(ev) { JSAN.use('util.file'); var file = new util.file('manage_subs_prefs.'+obj.data.server_unadorned); - util.widgets.save_attributes(file, { 'lib_menu' : [ 'value' ], 'show_ssubs' : [ 'checked' ], 'show_groups' : [ 'checked' ] }); + util.widgets.save_attributes(file, { 'lib_menu' : [ 'value' ], 'show_ssubs' : [ 'checked' ], 'show_ssub_groups' : [ 'checked' ] }); }, false ); - document.getElementById('show_groups').addEventListener( + document.getElementById('show_ssub_groups').addEventListener( 'command', function(ev) { JSAN.use('util.file'); var file = new util.file('manage_subs_prefs.'+obj.data.server_unadorned); - util.widgets.save_attributes(file, { 'lib_menu' : [ 'value' ], 'show_ssubs' : [ 'checked' ], 'show_groups' : [ 'checked' ] }); + util.widgets.save_attributes(file, { 'lib_menu' : [ 'value' ], 'show_ssubs' : [ 'checked' ], 'show_ssub_groups' : [ 'checked' ] }); }, false ); @@ -1429,7 +1429,7 @@ serial.manage_subs.prototype = { //did this support a later typo? obj.map_sdist[ 'ssub_' + ssub_tree.id() ] = ssub_tree; node.setAttribute('container','true'); } - if (document.getElementById('show_groups').checked) { + if (document.getElementById('show_ssub_groups').checked) { node.setAttribute('open','true'); obj.funcs.push( function() { obj.on_select_ssub( ssub_tree.id(), true ); } ); } diff --git a/Open-ILS/xul/staff_client/server/serial/manage_subs.xul b/Open-ILS/xul/staff_client/server/serial/manage_subs.xul index b544763802..5dff57bcd4 100644 --- a/Open-ILS/xul/staff_client/server/serial/manage_subs.xul +++ b/Open-ILS/xul/staff_client/server/serial/manage_subs.xul @@ -69,7 +69,7 @@ vim:noet:sw=4:ts=4: <hbox id="serial_sub_lib_menu"/> <hbox> <checkbox id="show_ssubs" label="Show Subs." /> - <checkbox id="show_groups" label="Show Groups" /> + <checkbox id="show_ssub_groups" label="Show Groups" /> <button id="serial_sub_add_button" label="&staff.cat.copy_browser.holdings_maintenance.refresh_button.label;" command="cmd_refresh_list" /> <spacer flex="1"/> <menubar> -- 2.11.0