mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 09:53:20 +01:00
61 lines
2.0 KiB
JavaScript
61 lines
2.0 KiB
JavaScript
/**
|
|
* EGroupware: Stylite Pixelegg template: hiding/showing header
|
|
*
|
|
* @link http://www.egroupware.org
|
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
|
* @author Wolfgang Ott <wolfgang.ott@pixelegg.de>
|
|
* @package pixelegg
|
|
* @version $Id: class.pixelegg_framework.inc.php 2741 2013-11-14 13:53:24Z ralfbecker $
|
|
*/
|
|
|
|
function show_pixelegg_header(_toggle, _delay)
|
|
{
|
|
$j("#egw_fw_header").slideToggle();
|
|
$j("#egw_fw_topmenu_addons").animate({'margin-right': '20px'},_delay);
|
|
$j("#egw_fw_sidebar").animate({'top':'57px'},_delay);
|
|
$j("#egw_fw_tabs").animate({'margin-top':'0px'},_delay);
|
|
$j(_toggle).parent().removeClass("slidedown");
|
|
$j(_toggle).parent().addClass("slideup");
|
|
}
|
|
|
|
function hide_pixelegg_header(_toggle, _delay)
|
|
{
|
|
$j("#egw_fw_header").slideToggle();
|
|
$j("#egw_fw_sidebar").animate({'top':'0px'},_delay);
|
|
$j("#egw_fw_topmenu_info_items").show();
|
|
$j("#egw_fw_logout").show();
|
|
$j("#egw_fw_print").show();
|
|
$j("#egw_fw_tabs").animate({'margin-top':'-13px'},_delay);
|
|
$j("#egw_fw_topmenu_addons").animate({'margin-right': '270px'},_delay);
|
|
$j(_toggle).parent().removeClass("slideup");
|
|
$j(_toggle).parent().addClass("slidedown");
|
|
}
|
|
|
|
egw_LAB.wait(function() {
|
|
$j(document).ready(function() {
|
|
|
|
$j('#slidetoggle').click(function(){
|
|
if ($j('#egw_fw_header').css('display') === 'none') {
|
|
show_pixelegg_header(this, 1000);
|
|
egw.set_preference('common', 'pixelegg_header_hidden', '');
|
|
}
|
|
else {
|
|
hide_pixelegg_header(this, 1000);
|
|
egw.set_preference('common', 'pixelegg_header_hidden', 'true');
|
|
}
|
|
});
|
|
|
|
// hide header, if pref says it is not shown
|
|
if (egw.preference('pixelegg_header_hidden')) {
|
|
hide_pixelegg_header($j('#slidetoggle'),0);
|
|
}
|
|
});
|
|
|
|
// Override jdots height calcluation
|
|
egw_fw.prototype.getIFrameHeight = function()
|
|
{
|
|
$header = $j(this.tabsUi.appHeaderContainer);
|
|
var height = $j(this.sidemenuDiv).height()-this.tabsUi.appHeaderContainer.outerHeight() - this.tabsUi.appHeader.outerHeight();
|
|
return height;
|
|
}
|
|
}); |