[open-ils-commits] r12483 - trunk/Open-ILS/xul/staff_client/server/cat (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Mar 10 09:39:33 EDT 2009
Author: phasefx
Date: 2009-03-10 09:39:32 -0400 (Tue, 10 Mar 2009)
New Revision: 12483
Modified:
trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js
trunk/Open-ILS/xul/staff_client/server/cat/marcedit.xul
Log:
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
Modified: trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js 2009-03-10 04:52:52 UTC (rev 12482)
+++ trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js 2009-03-10 13:39:32 UTC (rev 12483)
@@ -1229,7 +1229,7 @@
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);
Modified: trunk/Open-ILS/xul/staff_client/server/cat/marcedit.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/marcedit.xul 2009-03-10 04:52:52 UTC (rev 12482)
+++ trunk/Open-ILS/xul/staff_client/server/cat/marcedit.xul 2009-03-10 13:39:32 UTC (rev 12483)
@@ -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;"
More information about the open-ils-commits
mailing list