Changeset 15018
- Timestamp:
- 03/03/10 18:25:22 (2 years ago)
- Location:
- trunk/Xul_Core/content/scenariCore/widgets/matrix
- Files:
-
- 2 edited
-
matrix.xbl.xml (modified) (1 diff)
-
slotContents.xbl.xml (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Xul_Core/content/scenariCore/widgets/matrix/matrix.xbl.xml
r15017 r15018 279 279 ]]></body> 280 280 </method> 281 282 281 283 282 <!-- Interne. Appelé par le xul:deck lors d'un chgt d'offset du panel affiché. -
trunk/Xul_Core/content/scenariCore/widgets/matrix/slotContents.xbl.xml
r15017 r15018 80 80 pTab.setAttribute("accesskey", pView.getAttribute("accesskey")||""); 81 81 pTab.setAttribute("notClosable", ! (pView.getAttribute("closable")=="true")); 82 pTab.fSlot = this; 82 83 if(pView.getAttribute("dirty")=="true") { 83 84 pTab.setAttribute("dirty", "true"); … … 98 99 ]]></body> 99 100 </method> 101 <!-- .--> 102 <method name="closeAllTabs"> 103 <body><![CDATA[ 104 try { 105 var vTab = this.fTabsContainer.firstElementChild; 106 while(vTab) { 107 vTab.closeTab(); 108 vTab = this.fTabsContainer.firstElementChild; 109 } 110 }catch(e){ 111 log.debug("slot.closeAllTabs::"+e); 112 } 113 ]]></body> 114 </method> 115 <!-- .--> 116 <method name="closeOtherTabs"> 117 <parameter name="pCurrentTab"/> 118 <body><![CDATA[ 119 try { 120 log.info("closing all exept: "+pCurrentTab.label); 121 var vTab = pCurrentTab.nextElementSibling; 122 while(vTab) { 123 vTab.closeTab(); 124 vTab = pCurrentTab.nextElementSibling; 125 } 126 vTab = pCurrentTab.previousElementSibling; 127 while(vTab) { 128 var vPrvTab = vTab.previousElementSibling; 129 vTab.closeTab(); 130 vTab = vPrvTab; 131 } 132 }catch(e){ 133 log.debug("slot.closeOtherTabs::"+e); 134 } 135 ]]></body> 136 </method> 137 100 138 </implementation> 101 139 </binding> … … 117 155 </xul:hbox> 118 156 <xul:popup anonid="optionMnu"> 119 <xul:menuitem disabled="true" anonid="optionMnu.refresh" label="Recharger cet onglet" oncommand="" tooltiptext=""/>120 <xul:menuseparator/>121 157 <xul:menuitem anonid="optionMnu.closeTab" label="Fermer cet onglet" oncommand="document.getBindingParent(this).closeTab();" tooltiptext=""/> 122 <xul:menuitem disabled="true" anonid="optionMnu.CloseOtherTabs" label="Fermer les autres onglets" oncommand="" tooltiptext=""/>123 <xul:menuitem disabled="true" anonid="optionMnu.closeAllTab" label="Fermer tous les onglets" oncommand="" tooltiptext=""/>158 <xul:menuitem anonid="optionMnu.closeOtherTabs" label="Fermer les autres onglets" oncommand="document.getBindingParent(this).fSlot.closeOtherTabs(document.getBindingParent(this));" tooltiptext=""/> 159 <xul:menuitem anonid="optionMnu.closeAllTabs" label="Fermer tous les onglets" oncommand="document.getBindingParent(this).fSlot.closeAllTabs();" tooltiptext=""/> 124 160 </xul:popup> 125 161 </xul:stack> … … 128 164 <implementation> 129 165 <field name="fOptionMnu">document.getAnonymousElementByAttribute(this, "anonid", "optionMnu")</field> 166 <field name="fOptionMnuCloseOtherTabs">document.getAnonymousElementByAttribute(this, "anonid", "optionMnu.closeOtherTabs")</field> 167 <field name="fOptionMnuCloseAllTabs">document.getAnonymousElementByAttribute(this, "anonid", "optionMnu.closeAllTabs")</field> 130 168 <method name="showOptionMnu"> 131 169 <parameter name="pNode"/> 132 170 <body><![CDATA[ 133 171 try{ 172 this.fOptionMnuCloseOtherTabs.hidden = this.fSlot.fTabsContainer.childElementCount > 1 ? false : true; 173 this.fOptionMnuCloseAllTabs.hidden = this.fSlot.fTabsContainer.childElementCount > 1 ? false : true; 134 174 this.fOptionMnu.openPopup(document.getAnonymousElementByAttribute(this, "anonid", "optionBtn"), 'after_start', 0, 1, true, false); 135 175 }catch(e){log.debug("slotTabContent.showOptionMnu : "+e);}
Note: See TracChangeset
for help on using the changeset viewer.