only add slider.js for framework (cd=yes), as it is not needed for iframes and gives javascript error

This commit is contained in:
Ralf Becker 2014-01-06 10:36:18 +00:00
parent 7334920cfb
commit da7b9ca9b5
2 changed files with 28 additions and 12 deletions

View File

@ -39,4 +39,22 @@ class pixelegg_framework extends jdots_framework
{
parent::__construct($template); // call the constructor of the extended class
}
/**
* Render header
*
* Overwritten to load our slider.js
*
* @param array $extra
* @return type
*/
function header(array $extra=array())
{
// load our slider.js, but only if framework requested
if (!self::$header_done && $_GET['cd'] === 'yes')
{
self::validate_file('/pixelegg/js/slider.js');
}
return parent::header($extra);
}
}

View File

@ -18,8 +18,6 @@
{app_css}
</style>
{java_script}
<script src="./pixelegg/js/slider.js" type="text/javascript"></script>
</head>
<body {body_tags}>
{include_wz_tooltip}
@ -30,15 +28,15 @@
<div id="egw_fw_basecontainer">
<div id="egw_fw_header">
<div id="egw_divLogo"><a href="{logo_url}" target="_blank"><img src="{logo_file}" title="{logo_title}" alt="EGroupware"/></a></div>
<div id="egw_fw_topmenu">
<div id="egw_fw_topmenu_items">{topmenu_items}</div>
</div>
</div>
</div>
<div id="egw_fw_topmenu_addons">
<div id="egw_fw_topmenu_info_items">{topmenu_info_items}</div>
<div id="egw_fw_logout" title="{title_logout}" data-logout-url="{link_logout}"></div>
@ -49,14 +47,14 @@
<div id="egw_fw_splitter"></div>
</div>
<div id="egw_fw_main">
<div id="egw_fw_tabs"><div id="egw_fw_topmenu_slide" class="slideup"><span id="slidetoggle"></span></div>
</div>
</div>
</div>
<div id="egw_fw_footer">{powered_by}</div>
<!-- END framework -->