Changeset 14040

Show
Ignore:
Timestamp:
06/17/08 15:36:58 (5 months ago)
Author:
toonetown
Message:

Fixes #6593 - allow the scrollbox to have overflow:auto instead of overflow:scroll (to hide scrollbars when not used) !strict

Location:
dojox/trunk/grid
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • dojox/trunk/grid/resources/Grid.css

    r13997 r14040  
    8787.dojoxGrid-scrollbox { 
    8888        position: relative; 
    89         overflow: scroll; 
     89        overflow: auto; 
    9090        background-color: white; 
    9191        width: 100%; 
  • dojox/trunk/grid/resources/nihiloGrid.css

    r13633 r14040  
    9191.nihilo .dojoxGrid-scrollbox { 
    9292        position: relative; 
    93         overflow: scroll; 
     93        overflow: auto; 
    9494        background-color: #fefefe; 
    9595        width: 100%; 
  • dojox/trunk/grid/resources/soriaGrid.css

    r13633 r14040  
    9191.soria .dojoxGrid-scrollbox { 
    9292        position: relative; 
    93         overflow: scroll; 
     93        overflow: auto; 
    9494        background-color: #fefefe; 
    9595        width: 100%; 
  • dojox/trunk/grid/resources/tundraGrid.css

    r13691 r14040  
    8080.tundra .dojoxGrid-scrollbox { 
    8181        position: relative; 
    82         overflow: scroll; 
     82        overflow: auto; 
    8383        background-color: #fefefe; 
    8484        width: 100%; 
  • dojox/trunk/grid/_View.js

    r14030 r14040  
    739739 
    740740                getScrollbarWidth: function(){ 
    741                         return (this.noscroll ? 0 : dojox.html.metrics.getScrollbar().w); // Integer 
     741                        return (this.noscroll || !this.hasVScrollbar() ? 0 : dojox.html.metrics.getScrollbar().w); // Integer 
    742742                }, 
    743743 
     
    851851                }, 
    852852 
    853                 hasScrollbar: function(){ 
    854                         return (this.scrollboxNode.clientHeight != this.scrollboxNode.offsetHeight); // Boolean 
    855                 }, 
    856  
     853                hasHScrollbar: function(reset){ 
     854                        if(this._hasHScroll == undefined || reset){ 
     855                                this._hasHScroll = (this.scrollboxNode.offsetWidth < this.contentNode.offsetWidth); 
     856                        } 
     857                        return this._hasHScroll; // Boolean 
     858                }, 
     859 
     860                hasVScrollbar: function(reset){ 
     861                        if(this._hasVScroll == undefined || reset){ 
     862                                this._hasVScroll = (this.scrollboxNode.offsetHeight < this.contentNode.offsetHeight); 
     863                        } 
     864                        return this._hasVScroll; // Boolean 
     865                }, 
     866                 
    857867                adaptHeight: function(){ 
    858868                        if(!this.grid.autoHeight){ 
    859869                                var h = this.domNode.clientHeight; 
    860                                 if(!this.hasScrollbar()){ // no scrollbar is rendered 
    861                                         h -= dojox.html.metrics.getScrollbar().w; 
    862                                 } 
    863870                                dojox.grid.util.setStyleHeightPx(this.scrollboxNode, h); 
    864871                        } 
     872                        this.hasVScrollbar(true); 
    865873                }, 
    866874 
     
    880888                                this._removingColumn = false; 
    881889                        } 
    882  
    883890                        var cn = this.contentNode; 
    884                         cn.style.width = ''; 
    885                         cn.offsetWidth; 
    886891                        cn.style.width = w; 
     892                        this.hasHScrollbar(true); 
    887893                }, 
    888894 
  • dojox/trunk/grid/_ViewManager.js

    r13545 r14040  
    263263                // summary: Returns the first grid view with a scroll bar  
    264264                for(var i=0, v; (v=this.views[i]); i++){ 
    265                         if(v.hasScrollbar()){ 
     265                        if(v.hasHScrollbar() || v.hasVScrollbar()){ 
    266266                                return v; 
    267267                        }