Bug 485607: Add attributes for 'on' and 'off' labels in toggle checkbox, r=mfinkle

This commit is contained in:
Vivien Nicolas 2009-06-17 09:55:18 -04:00
Родитель 75cbc0c8ac
Коммит ab488d49e9
1 изменённых файлов: 11 добавлений и 2 удалений

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

@ -43,13 +43,14 @@
<bindings
xmlns="http://www.mozilla.org/xbl"
xmlns:xbl="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="checkbox-radio" display="xul:box" extends="chrome://global/content/bindings/checkbox.xml#checkbox-baseline">
<content>
<xul:radiogroup anonid="group">
<xul:radio anonid="on" class="checkbox-radio-on" label="&checkbox.yes.label;"/>
<xul:radio anonid="off" class="checkbox-radio-off" label="&checkbox.no.label;"/>
<xul:radio anonid="on" class="checkbox-radio-on" label="&checkbox.yes.label;" xbl:inherits="label=onlabel"/>
<xul:radio anonid="off" class="checkbox-radio-off" label="&checkbox.no.label;" xbl:inherits="label=offlabel"/>
</xul:radiogroup>
</content>
<implementation>
@ -69,6 +70,14 @@
document.getAnonymousElementByAttribute(this, "anonid", "off");
</field>
<property name="onlabel"
onget="return this._on.label"
onset="this._on.label=val"/>
<property name="offlabel"
onget="return this._off.label"
onset="this._off.label=val"/>
<method name="setChecked">
<parameter name="aValue"/>
<body>