Changeset 15014
- Timestamp:
- 03/03/10 15:16:07 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Xul_Wsp/content/scenariWsp/views/treeItemnetView/treeItemnetView.xbl.xml
r15013 r15014 86 86 <parameter name="pToolbar"/> 87 87 <body><![CDATA[ 88 var sView = this; 89 this.fBtnAsc = document.createElementNS(dom.XULNS, "toolbarbutton"); 90 this.fBtnAsc.setAttribute("label", "@jsStr;Asc."); 91 this.fBtnAsc.setAttribute("tooltiptext", "@jsStr;Arbre des items ascendants"); 92 this.fBtnAsc.addEventListener("command", function(){ 93 sView.setViewAsc(true); 94 }, false); 95 this.fBtnDesc = document.createElementNS(dom.XULNS, "toolbarbutton"); 96 this.fBtnDesc.setAttribute("label", "@jsStr;Desc."); 97 this.fBtnDesc.setAttribute("tooltiptext", "@jsStr;Arbre des items descendants"); 98 this.fBtnDesc.addEventListener("command", function(){ 99 sView.setViewAsc(false); 100 }, false); 101 pToolbar.appendChild(this.fBtnAsc); 102 pToolbar.appendChild(this.fBtnDesc); 88 this.fToolbar = document.createElementNS(dom.XULNS, "box"); 89 this.fToolbar.fView = this; 90 this.fToolbar.setAttribute("style", "-moz-binding: url('chrome://scenariWsp/content/views/treeItemnetView/treeItemnetView.xbl.xml#toolBar');"); 91 pToolbar.appendChild(this.fToolbar); 103 92 this.redrawStatusBtns(); 104 93 ]]></body> … … 106 95 <method name="redrawStatusBtns"> 107 96 <body><![CDATA[ 108 if( ! this.fBtnAsc) return; 109 if(this.getAttribute("view")=="asc") { 110 this.fBtnAsc.setAttribute("checked", "true"); 111 this.fBtnDesc.setAttribute("checked", "false"); 112 } else { 113 this.fBtnAsc.setAttribute("checked", "false"); 114 this.fBtnDesc.setAttribute("checked", "true"); 115 } 97 if(this.fToolbar) this.fToolbar.redrawStatusBtns(); 116 98 ]]></body> 117 99 </method> … … 917 899 </handlers> 918 900 </binding> 919 <xbl:binding id="t reeItemnetToolBar">901 <xbl:binding id="toolBar"> 920 902 <resources> 921 903 <stylesheet src="chrome://scenariWsp/content/views/treeItemnetView/treeItemnetView.xbl.css"/> … … 926 908 </content> 927 909 <implementation> 910 <field name="fBtnAsc">document.getAnonymousElementByAttribute(this, "anonid", "ascBtn")</field> 911 <field name="fBtnDesc">document.getAnonymousElementByAttribute(this, "anonid", "descBtn")</field> 928 912 <!-- Affecte le mode d'affichage Ascendants / Descendants. --> 929 913 <method name="setViewAsc"> 930 914 <parameter name="pAsc"/> 931 915 <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(); 916 if(this.fView) this.fView.setViewAsc(pAsc); 938 917 ]]></body> 939 918 </method> 940 919 <method name="redrawStatusBtns"> 941 920 <body><![CDATA[ 942 if( ! this.fBtnAsc) return;943 if(this. getAttribute("view")=="asc") {921 if(!this.fView) return; 922 if(this.fView.getAttribute("view")=="asc") { 944 923 this.fBtnAsc.setAttribute("checked", "true"); 945 924 this.fBtnDesc.setAttribute("checked", "false");
Note: See TracChangeset
for help on using the changeset viewer.