Bug 98595 Ability to disable lists/trees/outliners completely Toolkit verison of patch v0.3a

p=me/neil.parkwaycc.co.uk r=mkaply
This commit is contained in:
bugzilla%arlen.demon.co.uk 2005-02-08 14:32:09 +00:00
Родитель d7bf16c846
Коммит e4dd792f02
3 изменённых файлов: 24 добавлений и 5 удалений

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

@ -59,6 +59,11 @@
<!-- ///////////////// public listbox members ///////////////// -->
<property name="disabled" onset="if (val) this.setAttribute('disabled', 'true');
else this.removeAttribute('disabled');
return val;"
onget="return this.hasAttribute('disabled');"/>
<property name="listBoxObject"
onget="return this.boxObject.QueryInterface(Components.interfaces.nsIListBoxObject);"
readonly="true"/>
@ -804,6 +809,7 @@
click, so that drags work correctly. -->
<handler event="mousedown">
<![CDATA[
if (this.parentNode.disabled) return;
if (!event.ctrlKey && !event.shiftKey && !event.metaKey) {
if (!this.selected) {
parentNode.selectItem(this);
@ -815,9 +821,9 @@
<!-- On a click (up+down on the same item), deselect everything
except this item. -->
<handler event="click">
<handler event="click" button="0">
<![CDATA[
if (event.button != 0) return;
if (this.parentNode.disabled) return;
if (parentNode.selType != "multiple") {
parentNode.selectItem(this);
}
@ -893,7 +899,12 @@
</implementation>
<handlers>
<handler event="mousedown" button="0" action="if (!this.disabled) this.checked = !this.checked;"/>
<handler event="mousedown" button="0">
<![CDATA[
if (!this.disabled && !this.parentNode.disabled)
this.checked = !this.checked;
]]>
</handler>
</handlers>
</binding>

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

@ -56,6 +56,10 @@ listbox {
color: -moz-FieldText;
}
listbox[disabled="true"] {
color: GrayText;
}
/* ::::: listitem ::::: */
listitem {
@ -164,4 +168,4 @@ listheader[sortable="true"]:hover:active {
.listcell-check[disabled="true"][checked="true"] {
background-image: url("chrome://global/skin/checkbox/cbox-check-dis.gif");
}
}

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

@ -56,6 +56,10 @@ listbox {
color: -moz-FieldText;
}
listbox[disabled="true"] {
color: GrayText;
}
/* ::::: listitem ::::: */
listitem {
@ -164,4 +168,4 @@ listheader[sortable="true"]:hover:active {
.listcell-check[disabled="true"][checked="true"] {
background-image: url("chrome://global/skin/checkbox/cbox-check-dis.gif");
}
}