From: phasefx Date: Tue, 10 Mar 2009 13:39:32 +0000 (+0000) Subject: use oncommand rather onclick here for keyboard access. But interestingly, the timing... X-Git-Tag: sprint4-merge-nov22~10550 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b44b9db5ef8ef34304b4e8fab0754e059155e500;p=working%2FEvergreen.git use oncommand rather onclick here for keyboard access. But interestingly, the timing for DOM updates appears to happen differently between oncommand and onclick, so the element's .checked (and @checked) get updated after the oncommand but before the onclick. So I threw a negation in front of the .checked test git-svn-id: svn://svn.open-ils.org/ILS/trunk@12483 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/cat/marcedit.js b/Open-ILS/xul/staff_client/server/cat/marcedit.js index dbd8dcb6bd..36d2a5eca1 100644 --- a/Open-ILS/xul/staff_client/server/cat/marcedit.js +++ b/Open-ILS/xul/staff_client/server/cat/marcedit.js @@ -1229,7 +1229,7 @@ function stackSubfields(checkbox) { var list = document.getElementsByAttribute('name','sf_box'); var o = 'vertical'; - if (checkbox.checked) o = 'horizontal'; + if (!checkbox.checked /* this property gets changed after the oncommand handler, so we're testing for the opposite value */) o = 'horizontal'; for (var i = 0; i < list.length; i++) { if (list[i]) list[i].setAttribute('orient',o); diff --git a/Open-ILS/xul/staff_client/server/cat/marcedit.xul b/Open-ILS/xul/staff_client/server/cat/marcedit.xul index e72d37909e..671b036c6c 100644 --- a/Open-ILS/xul/staff_client/server/cat/marcedit.xul +++ b/Open-ILS/xul/staff_client/server/cat/marcedit.xul @@ -24,7 +24,7 @@ - +