Changeset 15013
- Timestamp:
- 03/03/10 15:03:38 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Xul_Wsp/content/scenariWsp/views/treeItemnetView/treeItemnetView.xbl.xml
r15007 r15013 88 88 var sView = this; 89 89 this.fBtnAsc = document.createElementNS(dom.XULNS, "toolbarbutton"); 90 this.fBtnAsc.className = "ascBtn";91 90 this.fBtnAsc.setAttribute("label", "@jsStr;Asc."); 92 91 this.fBtnAsc.setAttribute("tooltiptext", "@jsStr;Arbre des items ascendants"); … … 95 94 }, false); 96 95 this.fBtnDesc = document.createElementNS(dom.XULNS, "toolbarbutton"); 97 this.fBtnDesc = "descBtn";98 96 this.fBtnDesc.setAttribute("label", "@jsStr;Desc."); 99 97 this.fBtnDesc.setAttribute("tooltiptext", "@jsStr;Arbre des items descendants"); … … 919 917 </handlers> 920 918 </binding> 919 <xbl:binding id="treeItemnetToolBar"> 920 <resources> 921 <stylesheet src="chrome://scenariWsp/content/views/treeItemnetView/treeItemnetView.xbl.css"/> 922 </resources> 923 <content orient="horizontal"> 924 <xul:toolbarbutton anonid="ascBtn" label="Asc." tooltiptext="Arbre des items ascendants" oncommand="document.getBindingParent(this).setViewAsc(true);"/> 925 <xul:toolbarbutton anonid="descBtn" label="Desc." tooltiptext="Arbre des items descendants" oncommand="document.getBindingParent(this).setViewAsc(false);"/> 926 </content> 927 <implementation> 928 <!-- Affecte le mode d'affichage Ascendants / Descendants. --> 929 <method name="setViewAsc"> 930 <parameter name="pAsc"/> 931 <body><![CDATA[ 932 this.setAttribute("view", pAsc ? "asc": "desc"); 933 this.reset(); 934 this.fItemnetMgrCur = new this.ItemnetMgr(); 935 this.fItemnetMgrCur.registerViewer(this); 936 this.fItemnetMgrCur.init(this.fScWsp.getDataProvider(), this.fWspUri, null, pAsc); 937 this.redrawStatusBtns(); 938 ]]></body> 939 </method> 940 <method name="redrawStatusBtns"> 941 <body><![CDATA[ 942 if( ! this.fBtnAsc) return; 943 if(this.getAttribute("view")=="asc") { 944 this.fBtnAsc.setAttribute("checked", "true"); 945 this.fBtnDesc.setAttribute("checked", "false"); 946 } else { 947 this.fBtnAsc.setAttribute("checked", "false"); 948 this.fBtnDesc.setAttribute("checked", "true"); 949 } 950 ]]></body> 951 </method> 952 </implementation> 953 </xbl:binding> 921 954 </bindings>
Note: See TracChangeset
for help on using the changeset viewer.