use oncommand rather onclick here for keyboard access. But interestingly, the timing...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 10 Mar 2009 13:39:32 +0000 (13:39 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 10 Mar 2009 13:39:32 +0000 (13:39 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12483 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/marcedit.js
Open-ILS/xul/staff_client/server/cat/marcedit.xul

index dbd8dcb..36d2a5e 100644 (file)
@@ -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);
index e72d379..671b036 100644 (file)
@@ -24,7 +24,7 @@
 <groupbox flex="0">
        <caption label="&staff.cat.marcedit.options.label;"/>
        <hbox flex="1">
-               <checkbox persist="checked" accesskey='&staff.cat.marcedit.stackSubfields.accesskey;' label="&staff.cat.marcedit.stackSubfields.label;" onclick="stackSubfields(this);" checked="false" id="stackSubfields"/>
+               <checkbox persist="checked" accesskey='&staff.cat.marcedit.stackSubfields.accesskey;' label="&staff.cat.marcedit.stackSubfields.label;" oncommand="stackSubfields(this);" checked="false" id="stackSubfields"/>
                <button label="&staff.cat.marcedit.validate.label;" accesskey="&staff.cat.marcedit.validate.accesskey;" oncommand="validateAuthority(this);"/>
                <button id="save-button" accesskey="&staff.cat.marcedit.save-button.accesskey;"/>
                <button label="&staff.cat.marcedit.help.label;" accesskey="&staff.cat.marcedit.help.accesskey;"