Changeset 12792

Show
Ignore:
Timestamp:
02/29/08 14:51:10 (11 months ago)
Author:
peller
Message:

Fix bidi for TabContainer? vertical tabs. Thanks, Evan (IBM). Fixes #5752 !strict

Location:
dijit/trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • dijit/trunk/layout/StackContainer.js

    r12724 r12792  
    298298                        } 
    299299                        if(!this._currentChild){ // put the first child into the tab order 
    300                                 button.focusNode.setAttribute("tabIndex","0"); 
     300                                button.focusNode.setAttribute("tabIndex", "0"); 
    301301                                this._currentChild = page; 
     302                        } 
     303                        //make sure all tabs have the same length 
     304                        if(!dojo._isBodyLtr() && dojo.isIE && this._rectifyRtlTabList){ 
     305                                this._rectifyRtlTabList(); 
    302306                        } 
    303307                }, 
     
    409413                                } 
    410414                                // handle page navigation 
    411                                 if(forward != null){ 
     415                                if(forward !== null){ 
    412416                                        this.adjacent(forward).onClick(); 
    413417                                        dojo.stopEvent(e); 
  • dijit/trunk/layout/TabContainer.js

    r12724 r12792  
    133133                this["class"] = "dijitTabLabels-" + this.tabPosition + (this.doLayout ? "" : " dijitTabNoLayout"); 
    134134                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                }        
    135154        } 
    136155}); 
  • dijit/trunk/layout/templates/_TabButton.html

    r12196 r12792  
    22    <div waiRole="presentation" class='dijitTabInnerDiv' dojoAttachPoint='innerDiv'> 
    33        <div waiRole="presentation" class='dijitTabContent' dojoAttachPoint='tabContent'> 
    4                 <span dojoAttachPoint='containerNode,focusNode'>${!label}</span> 
     4                <span dojoAttachPoint='containerNode,focusNode' class='tabLabel'>${!label}</span> 
    55                <span dojoAttachPoint='closeButtonNode' class='closeImage' dojoAttachEvent='onmouseenter:_onMouse, onmouseleave:_onMouse, onclick:onClickCloseButton' stateModifier='CloseButton'> 
    66                    <span dojoAttachPoint='closeText' class='closeText'>x</span> 
  • dijit/trunk/tests/layout/test_TabContainer.html

    r12703 r12792  
    151151        </div> 
    152152 
     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 
    153175        <h3>Typical rendering time</h3> 
    154176        <table border=1> 
  • dijit/trunk/themes/tundra/layout/TabContainer_rtl.css

    r12331 r12792  
    5454} 
    5555 
     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 
    5664.dijitRtl .dijitAlignRight .dijitTab .dijitClosable .closeImage { 
    5765        left:auto; 
     
    5967} 
    6068 
    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; 
    6376        left:3px; 
    6477} 
     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}