Changeset 15013


Ignore:
Timestamp:
03/03/10 15:03:38 (2 years ago)
Author:
sam
Message:

...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Xul_Wsp/content/scenariWsp/views/treeItemnetView/treeItemnetView.xbl.xml

    r15007 r15013  
    8888                                var sView = this; 
    8989                                this.fBtnAsc = document.createElementNS(dom.XULNS, "toolbarbutton"); 
    90                                 this.fBtnAsc.className = "ascBtn"; 
    9190                                this.fBtnAsc.setAttribute("label", "@jsStr;Asc."); 
    9291                                this.fBtnAsc.setAttribute("tooltiptext", "@jsStr;Arbre des items ascendants");  
     
    9594                                }, false); 
    9695                                this.fBtnDesc = document.createElementNS(dom.XULNS, "toolbarbutton"); 
    97                                 this.fBtnDesc = "descBtn"; 
    9896                                this.fBtnDesc.setAttribute("label", "@jsStr;Desc."); 
    9997                                this.fBtnDesc.setAttribute("tooltiptext", "@jsStr;Arbre des items descendants");  
     
    919917                </handlers> 
    920918        </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> 
    921954</bindings> 
Note: See TracChangeset for help on using the changeset viewer.