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 >
Extensible Markup Language  |  2010-07-12  |  2KB  |  67 lines

  1. <?xml version="1.0"?>
  2.  
  3. <bindings xmlns="http://www.mozilla.org/xbl"
  4.           xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  5.           xmlns:xbl="http://www.mozilla.org/xbl"
  6.           xmlns:html="http://www.w3.org/1999/xhtml">
  7.     
  8.     <binding id="components"
  9.              inheritstyle="false">
  10.         <resources>
  11.             <stylesheet src="components.css"/>
  12.         </resources>
  13.         
  14.         <content>
  15.             <xul:vbox class="list"/>
  16.         </content>
  17.         
  18.         <implementation>
  19.             <field name="_nodeList">document.getAnonymousElementByAttribute(this, "class", "list")</field>
  20.             
  21.             <constructor><![CDATA[
  22.             ]]></constructor>
  23.             
  24.             <property name="items">
  25.                 <getter><![CDATA[
  26.                     return 0;
  27.                 ]]></getter>
  28.                 <setter><![CDATA[
  29.                     this._items = val;
  30.                     var ns = this.namespaceURI;
  31.                     for each (let item in this._items) {
  32.                         var node = document.createElementNS(ns, "component");
  33.                         node.className = "item";
  34.                         node.setAttribute("type", item.type);
  35.                         //node.setAttribute("type", item.type == "package" ? "package-remove" : item.type);
  36.                         node.item = item;
  37.                         this._nodeList.appendChild(node);
  38.                         //this.appendChild(node);
  39.                     }
  40.                 ]]></setter>
  41.             </property>
  42.             
  43.             <method name="selectAll">
  44.                 <body><![CDATA[
  45.                     var node = this.firstChild;
  46.                     while(node) {
  47.                         node.setAttribute("checked", "true");
  48.                         node = node.nextSibling;
  49.                     }
  50.                 ]]></body>
  51.             </method>
  52.             
  53.             <method name="selected">
  54.                 <body><![CDATA[
  55.                     var widgets = []; 
  56.                     var node = this.firstChild;
  57.                     while(node) {
  58.                         if (!node.unchecked)
  59.                             widgets.push(node.info);
  60.                         node = node.nextSibling;
  61.                     }
  62.                     return widgets;
  63.                 ]]></body>
  64.             </method>
  65.         </implementation>
  66.     </binding>
  67. </bindings>