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
|
|
@ -520,7 +520,7 @@ sub www_view {
|
|||
__DATA__
|
||||
<dl id="adminBar" class="accordion-menu">
|
||||
<dt id="adminConsole" class="a-m-t clickable">^International("admin console","AdminConsole");</dt>
|
||||
<dd class="a-m-d"><div class="bd">
|
||||
<dd class="a-m-d">
|
||||
<ul id="admin_list">
|
||||
<TMPL_LOOP adminPlugins>
|
||||
<li class="clickable with_icon" style="background-image: url(<tmpl_var icon.small default="^Extras('icon/cog.png');">);">
|
||||
|
|
@ -528,32 +528,32 @@ __DATA__
|
|||
</li>
|
||||
</TMPL_LOOP>
|
||||
</ul>
|
||||
</div></dd>
|
||||
</dd>
|
||||
<!-- placeholder for version tags -->
|
||||
<dt id="versionTags" class="a-m-t clickable">^International('version tags','VersionTag');</dt>
|
||||
<dd class="a-m-d"><div class="bd">
|
||||
<dd class="a-m-d">
|
||||
<div id="versionTagItems"></div>
|
||||
</div></dd>
|
||||
</dd>
|
||||
<!-- placeholder for clipboard -->
|
||||
<dt id="clipboard" class="a-m-t clickable">^International('1082','Asset');</dt>
|
||||
<dd class="a-m-d"><div class="bd">
|
||||
<dd class="a-m-d">
|
||||
<input type="checkbox" id="clipboardShowAll" />
|
||||
<label for="clipboardShowAll" id="clipboardShowAllLabel">^International('show all','WebGUI');</label>
|
||||
<div id="clipboardItems"></div>
|
||||
</div></dd>
|
||||
</dd>
|
||||
<!-- placeholder for asset helpers -->
|
||||
<dt id="assetHelpers" class="a-m-t clickable">^International('asset helpers','WebGUI');</dt>
|
||||
<dd id="assetHelpers_pane" class="a-m-d"><div class="bd">
|
||||
<dd id="assetHelpers_pane" class="a-m-d">
|
||||
<h1 class="with_icon" id="helper_asset_name"></h1>
|
||||
<ul id="helper_list">
|
||||
</ul>
|
||||
<h2 class="with_icon" style="background-image: url(^Extras(icon/clock.png););">^International('history','Asset');</h2>
|
||||
<ul id="history_list">
|
||||
</ul>
|
||||
</div></dd>
|
||||
</dd>
|
||||
<!-- placeholder for new content menu -->
|
||||
<dt id="newContent" class="a-m-t clickable">^International('1083','Macro_AdminBar');</dt>
|
||||
<dd class="a-m-d"><div class="bd" style="margin: 0; padding: 0">
|
||||
<dd class="a-m-d">
|
||||
<dl id="newContentBar" class="accordion-menu">
|
||||
<tmpl_loop newContentTabs>
|
||||
<dt class="a-m-t clickable" id="<tmpl_var id>"><tmpl_var title></dt>
|
||||
|
|
@ -568,7 +568,7 @@ __DATA__
|
|||
</div></dd>
|
||||
</tmpl_loop>
|
||||
</dl>
|
||||
</div></dd>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<div id="wrapper" class="yui-skin-sam">
|
||||
|
|
|
|||
|
|
@ -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