From 3900271c57cbfa0833c241fad15b0c9bebf05bf3 Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 18 May 2009 03:53:24 +0000 Subject: [PATCH] make clicking on the grippy in the z39.50 client and pressing the Hide/Show Top Pane button do the same thing/play well together. The text 'Hide' versus 'Show' can get out of sync, though. Could punt and relabel it 'Toggle' git-svn-id: svn://svn.open-ils.org/ILS/trunk@13201 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/cat/z3950.js | 20 ++++++++++++++++++-- Open-ILS/xul/staff_client/server/cat/z3950.xul | 4 ++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/cat/z3950.js b/Open-ILS/xul/staff_client/server/cat/z3950.js index d27c68cfc0..e00fd11ac9 100644 --- a/Open-ILS/xul/staff_client/server/cat/z3950.js +++ b/Open-ILS/xul/staff_client/server/cat/z3950.js @@ -202,9 +202,9 @@ cat.z3950.prototype = { ['command'], function() { var x = document.getElementById('top_pane'); - x.hidden = ! x.hidden; + document.getElementById('splitter_grippy2').doCommand(); var n = obj.controller.view.toggle_form_btn; - if (x.hidden) { + if (x.collapsed) { n.setAttribute('image',"/xul/server/skin/media/images/down_arrow.gif"); n.setAttribute('label',$("catStrings").getString('staff.cat.z3950.unhide_top_pane.label')); n.setAttribute('accesskey',$("catStrings").getString('staff.cat.z3950.unhide_top_pane.accesskey')); @@ -215,6 +215,22 @@ cat.z3950.prototype = { } }, ], + 'splitter_grippy2' : [ + ['click'], + function() { + var x = document.getElementById('top_pane'); + var n = obj.controller.view.toggle_form_btn; + if (x.collapsed) { + n.setAttribute('image',"/xul/server/skin/media/images/down_arrow.gif"); + n.setAttribute('label',$("catStrings").getString('staff.cat.z3950.unhide_top_pane.label')); + n.setAttribute('accesskey',$("catStrings").getString('staff.cat.z3950.unhide_top_pane.accesskey')); + } else { + n.setAttribute('image',"/xul/server/skin/media/images/up_arrow.gif"); + n.setAttribute('label',$("catStrings").getString('staff.cat.z3950.hide_top_pane.label')); + n.setAttribute('accesskey',$("catStrings").getString('staff.cat.z3950.hide_top_pane.accesskey')); + } + } + ], 'service_rows' : [ ['render'], function(e) { diff --git a/Open-ILS/xul/staff_client/server/cat/z3950.xul b/Open-ILS/xul/staff_client/server/cat/z3950.xul index a8a28343ed..fbab62d6d6 100644 --- a/Open-ILS/xul/staff_client/server/cat/z3950.xul +++ b/Open-ILS/xul/staff_client/server/cat/z3950.xul @@ -131,7 +131,7 @@