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}