зеркало из https://github.com/mozilla/pjs.git
Bug 282180 - "sync xpfe button.xml with toolkit button.xml" ((Bv1a-TK) <button.xml>) [p=sgautherie.bz@free.fr (Serge Gautherie) r=Mano a1.9=beltzner]
This commit is contained in:
Родитель
7dca64f481
Коммит
6fee3f0192
|
@ -114,20 +114,31 @@
|
|||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="_handleClick">
|
||||
<body>
|
||||
<![CDATA[
|
||||
if (!this.disabled &&
|
||||
(this.autoCheck || !this.hasAttribute("autoCheck"))) {
|
||||
|
||||
if (this.type == "checkbox") {
|
||||
this.checked = !this.checked;
|
||||
} else if (this.type == "radio") {
|
||||
this.checked = true;
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
</implementation>
|
||||
|
||||
<handlers>
|
||||
<handler event="command">
|
||||
<![CDATA[
|
||||
if (this.autoCheck || !this.hasAttribute("autoCheck")) {
|
||||
if (this.type == "checkbox") {
|
||||
this.checked = !this.checked;
|
||||
} else if (this.type == "radio") {
|
||||
this.checked = true;
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</handler>
|
||||
<!-- While it would seem we could do this by handling oncommand, we can't
|
||||
because any external oncommand handlers might get called before ours,
|
||||
and then they would see the incorrect value of checked. Additionally
|
||||
a command attribute would redirect the command events anyway.-->
|
||||
<handler event="click" button="0" action="this._handleClick();"/>
|
||||
<handler event="keypress" key=" " action="this._handleClick();"/>
|
||||
|
||||
<handler event="keypress">
|
||||
<![CDATA[
|
||||
|
@ -211,8 +222,11 @@
|
|||
<xul:hbox class="box-inherit button-box" xbl:inherits="align,dir,pack,orient"
|
||||
align="center" pack="center" flex="1">
|
||||
<children>
|
||||
<xul:image class="button-icon" xbl:inherits="src=image"/>
|
||||
<xul:label class="button-text" xbl:inherits="value=label,accesskey,crop" flex="1"/>
|
||||
<xul:hbox class="box-inherit" xbl:inherits="align,dir,pack,orient"
|
||||
align="center" pack="center" flex="1">
|
||||
<xul:image class="button-icon" xbl:inherits="src=image"/>
|
||||
<xul:label class="button-text" xbl:inherits="value=label,accesskey,crop"/>
|
||||
</xul:hbox>
|
||||
<xul:dropmarker class="button-menu-dropmarker" xbl:inherits="open,disabled,label"/>
|
||||
</children>
|
||||
</xul:hbox>
|
||||
|
|
Загрузка…
Ссылка в новой задаче