home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2011 November
/
CHIP_2011_11.iso
/
Programy
/
Narzedzia
/
AIMP2
/
aimp_2.61.583.exe
/
$TEMP
/
YandexPackSetup.msi
/
fil76E183081515FC0090C2A573EEA6CDAF
< prev
next >
Wrap
Extensible Markup Language
|
2010-07-12
|
2KB
|
67 lines
<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml">
<binding id="components"
inheritstyle="false">
<resources>
<stylesheet src="components.css"/>
</resources>
<content>
<xul:vbox class="list"/>
</content>
<implementation>
<field name="_nodeList">document.getAnonymousElementByAttribute(this, "class", "list")</field>
<constructor><![CDATA[
]]></constructor>
<property name="items">
<getter><![CDATA[
return 0;
]]></getter>
<setter><![CDATA[
this._items = val;
var ns = this.namespaceURI;
for each (let item in this._items) {
var node = document.createElementNS(ns, "component");
node.className = "item";
node.setAttribute("type", item.type);
//node.setAttribute("type", item.type == "package" ? "package-remove" : item.type);
node.item = item;
this._nodeList.appendChild(node);
//this.appendChild(node);
}
]]></setter>
</property>
<method name="selectAll">
<body><![CDATA[
var node = this.firstChild;
while(node) {
node.setAttribute("checked", "true");
node = node.nextSibling;
}
]]></body>
</method>
<method name="selected">
<body><![CDATA[
var widgets = [];
var node = this.firstChild;
while(node) {
if (!node.unchecked)
widgets.push(node.info);
node = node.nextSibling;
}
return widgets;
]]></body>
</method>
</implementation>
</binding>
</bindings>