Make it possible for <preference> elements to notice checkbox listitems b=423407 r=Mano a=beltzner

This commit is contained in:
neil@parkwaycc.co.uk 2008-03-27 02:30:48 -07:00
Родитель 072ebb3175
Коммит 907cb2f671
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -843,8 +843,10 @@
if (this.currentItem) { if (this.currentItem) {
if (this.currentItem.getAttribute("type") != "checkbox") if (this.currentItem.getAttribute("type") != "checkbox")
this.addItemToSelection(this.currentItem); this.addItemToSelection(this.currentItem);
else if (!this.currentItem.disabled) else if (!this.currentItem.disabled) {
this.currentItem.checked = !this.currentItem.checked; this.currentItem.checked = !this.currentItem.checked;
this.currentItem.doCommand();
}
} }
]]> ]]>
</handler> </handler>
@ -1039,8 +1041,10 @@
<handlers> <handlers>
<handler event="mousedown" button="0"> <handler event="mousedown" button="0">
<![CDATA[ <![CDATA[
if (!this.disabled && !this.control.disabled) if (!this.disabled && !this.control.disabled) {
this.checked = !this.checked; this.checked = !this.checked;
this.doCommand();
}
]]> ]]>
</handler> </handler>
</handlers> </handlers>