Changeset 12792
- Timestamp:
- 02/29/08 14:51:10 (11 months ago)
- Location:
- dijit/trunk
- Files:
-
- 5 modified
-
layout/StackContainer.js (modified) (2 diffs)
-
layout/TabContainer.js (modified) (1 diff)
-
layout/templates/_TabButton.html (modified) (1 diff)
-
tests/layout/test_TabContainer.html (modified) (1 diff)
-
themes/tundra/layout/TabContainer_rtl.css (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dijit/trunk/layout/StackContainer.js
r12724 r12792 298 298 } 299 299 if(!this._currentChild){ // put the first child into the tab order 300 button.focusNode.setAttribute("tabIndex", "0");300 button.focusNode.setAttribute("tabIndex", "0"); 301 301 this._currentChild = page; 302 } 303 //make sure all tabs have the same length 304 if(!dojo._isBodyLtr() && dojo.isIE && this._rectifyRtlTabList){ 305 this._rectifyRtlTabList(); 302 306 } 303 307 }, … … 409 413 } 410 414 // handle page navigation 411 if(forward != null){415 if(forward !== null){ 412 416 this.adjacent(forward).onClick(); 413 417 dojo.stopEvent(e); -
dijit/trunk/layout/TabContainer.js
r12724 r12792 133 133 this["class"] = "dijitTabLabels-" + this.tabPosition + (this.doLayout ? "" : " dijitTabNoLayout"); 134 134 this.inherited("postMixInProperties",arguments); 135 }, 136 137 _rectifyRtlTabList: function(){ 138 //Summay: Rectify the length of all tabs in rtl, otherwise the tab lengths are different in IE 139 if(0 >= this.tabPosition.indexOf('-h')){ return; } 140 if(!this.pane2button){ return; } 141 var maxLen = 0; 142 //this.tablist.pane2button is not array, so we can't use dojo.forEach here 143 //simplily get the max length among the tabs 144 for(var pane in this.pane2button){ 145 var tabButton = this.pane2button[pane]; 146 var len = dojo.marginBox(tabButton.innerDiv).w; 147 maxLen = maxLen > len ? maxLen : len; 148 } 149 //unify the length of all the tabs 150 for(pane in this.pane2button){ 151 var tabButton = this.pane2button[pane]; 152 tabButton.innerDiv.style.width = maxLen + 'px'; 153 } 135 154 } 136 155 }); -
dijit/trunk/layout/templates/_TabButton.html
r12196 r12792 2 2 <div waiRole="presentation" class='dijitTabInnerDiv' dojoAttachPoint='innerDiv'> 3 3 <div waiRole="presentation" class='dijitTabContent' dojoAttachPoint='tabContent'> 4 <span dojoAttachPoint='containerNode,focusNode' >${!label}</span>4 <span dojoAttachPoint='containerNode,focusNode' class='tabLabel'>${!label}</span> 5 5 <span dojoAttachPoint='closeButtonNode' class='closeImage' dojoAttachEvent='onmouseenter:_onMouse, onmouseleave:_onMouse, onclick:onClickCloseButton' stateModifier='CloseButton'> 6 6 <span dojoAttachPoint='closeText' class='closeText'>x</span> -
dijit/trunk/tests/layout/test_TabContainer.html
r12703 r12792 151 151 </div> 152 152 153 <p></p> 154 <div dojoType="dijit.layout.TabContainer" style="width:500px;height:100px" tabPosition="left-h"> 155 <div id="LittleRed" dojoType="dijit.layout.ContentPane" title="Little Red Cap"> 156 Once upon a time there was a dear little girl who was loved by 157 every one who looked at her, but most of all by her grandmother, 158 and there was nothing that she would not have given to the child. 159 </div> 160 <div id="HanselGretel" dojoType="dijit.layout.ContentPane" 161 title="Hansel and Gretel" closable="true" selected="true"> 162 Hard by a great forest dwelt a poor wood-cutter with his wife 163 and his two children. The boy was called Hansel and the girl Gretel. 164 He had little to bite and to break, and once when great dearth fell 165 on the land, he could no longer procure even daily bread. 166 </div> 167 <div id="GreenTwigs" dojoType="dijit.layout.ContentPane" 168 title="The Three Green Twigs"> 169 There was once upon a time a hermit who lived in a forest at the foot 170 of a mountain, and passed his time in prayer and good works, 171 and every evening he carried, to the glory of God, two pails of water 172 up the mountain. 173 </div> 174 153 175 <h3>Typical rendering time</h3> 154 176 <table border=1> -
dijit/trunk/themes/tundra/layout/TabContainer_rtl.css
r12331 r12792 54 54 } 55 55 56 .dj_ie .dijitRtl .dijitAlignLeft .dijitTab .dijitTabInnerDiv { 57 padding-left:19px; 58 } 59 60 .dj_gecko .dijitRtl .dijitAlignLeft .dijitTab .dijitTabInnerDiv { 61 padding-left:11px; 62 } 63 56 64 .dijitRtl .dijitAlignRight .dijitTab .dijitClosable .closeImage { 57 65 left:auto; … … 59 67 } 60 68 61 .dijitRtl .dijitAlignLeft .dijitTab .dijitClosable .closeImage { 62 right:auto; 69 .dj_ie7 .dijitRtl .dijitAlignLeft .dijitTab .dijitTabContent{ 70 position:relative; 71 } 72 73 .dj_ie7 .dijitRtl .dijitAlignLeft .dijitTab .dijitClosable .closeImage{ 74 position:absolute; 75 top:2px; 63 76 left:3px; 64 77 } 78 79 .dj_ie6 .dijitRtl .dijitAlignLeft .dijitTab .dijitClosable .closeImage{ 80 float:left; 81 } 82 83 .dj_ie6 .dijitRtl .dijitAlignLeft .dijitTab .dijitClosable .tabLabel{ 84 float:right; 85 } 86 87 .dj_ie .dijitTab .dijitTabInnerDiv{ 88 width : 1%; 89 }