зеркало из 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:
Родитель
cbef8231d2
Коммит
739949cd30
|
@ -114,20 +114,31 @@
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
</method>
|
</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>
|
</implementation>
|
||||||
|
|
||||||
<handlers>
|
<handlers>
|
||||||
<handler event="command">
|
<!-- While it would seem we could do this by handling oncommand, we can't
|
||||||
<![CDATA[
|
because any external oncommand handlers might get called before ours,
|
||||||
if (this.autoCheck || !this.hasAttribute("autoCheck")) {
|
and then they would see the incorrect value of checked. Additionally
|
||||||
if (this.type == "checkbox") {
|
a command attribute would redirect the command events anyway.-->
|
||||||
this.checked = !this.checked;
|
<handler event="click" button="0" action="this._handleClick();"/>
|
||||||
} else if (this.type == "radio") {
|
<handler event="keypress" key=" " action="this._handleClick();"/>
|
||||||
this.checked = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]]>
|
|
||||||
</handler>
|
|
||||||
|
|
||||||
<handler event="keypress">
|
<handler event="keypress">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
@ -211,8 +222,11 @@
|
||||||
<xul:hbox class="box-inherit button-box" xbl:inherits="align,dir,pack,orient"
|
<xul:hbox class="box-inherit button-box" xbl:inherits="align,dir,pack,orient"
|
||||||
align="center" pack="center" flex="1">
|
align="center" pack="center" flex="1">
|
||||||
<children>
|
<children>
|
||||||
<xul:image class="button-icon" xbl:inherits="src=image"/>
|
<xul:hbox class="box-inherit" xbl:inherits="align,dir,pack,orient"
|
||||||
<xul:label class="button-text" xbl:inherits="value=label,accesskey,crop" flex="1"/>
|
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"/>
|
<xul:dropmarker class="button-menu-dropmarker" xbl:inherits="open,disabled,label"/>
|
||||||
</children>
|
</children>
|
||||||
</xul:hbox>
|
</xul:hbox>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче