fix bad height calculations in admin bar
This commit is contained in:
parent
e9e6771379
commit
68e0e117b0
2 changed files with 24 additions and 17 deletions
|
|
@ -1619,10 +1619,6 @@ WebGUI.Admin.AdminBar
|
|||
this.addClickHandler( dt, dd );
|
||||
}
|
||||
|
||||
// Precalculate dtHeight and maxHeight
|
||||
this.dtHeight = WebGUI.Admin.getRealHeight( this.dt[0] ) * this.dt.length;
|
||||
this.maxHeight = YAHOO.util.Dom.getViewportHeight() - this.dtHeight;
|
||||
|
||||
// Add custom event when showing an AdminBar pane
|
||||
this.afterShow = new YAHOO.util.CustomEvent("afterShow", this);
|
||||
};
|
||||
|
|
@ -1655,19 +1651,30 @@ WebGUI.Admin.AdminBar.prototype.getAnim
|
|||
*/
|
||||
WebGUI.Admin.AdminBar.prototype.getExpandHeight
|
||||
= function ( elem ) {
|
||||
var maxHeight = this.getMaxHeight();
|
||||
if ( this.cfg.expandMax ) {
|
||||
return this.maxHeight;
|
||||
return maxHeight;
|
||||
}
|
||||
|
||||
var height = WebGUI.Admin.getRealHeight( elem );
|
||||
|
||||
// Make sure not more than maxHeight
|
||||
if ( height > this.maxHeight ) {
|
||||
return this.maxHeight;
|
||||
if ( height > maxHeight ) {
|
||||
return maxHeight;
|
||||
}
|
||||
return height;
|
||||
};
|
||||
|
||||
/**
|
||||
* getMaxHeight( )
|
||||
* Get the maximum possible height for the DD
|
||||
*/
|
||||
WebGUI.Admin.AdminBar.prototype.getMaxHeight
|
||||
= function () {
|
||||
var dtHeight = WebGUI.Admin.getRealHeight( this.dt[0] ) * this.dt.length;
|
||||
return WebGUI.Admin.getRealHeight( this.dl.parentNode ) - dtHeight;
|
||||
};
|
||||
|
||||
/**
|
||||
* show( id )
|
||||
* Show the pane with the given ID. The ID is from the DT element.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue