Commit f70cd8ed authored by Marius Cramer's avatar Marius Cramer
Browse files

Added js.d inclusion from master

parent 6f833c80
......@@ -60,6 +60,22 @@ if(isset($_SESSION['show_error_msg'])) {
unset($_SESSION['show_error_msg']);
}
// read js.d files
$js_d = ISPC_WEB_PATH . '/js/js.d';
$js_d_files = array();
if(@is_dir($js_d)) {
$dir = opendir($js_d);
while($file = readdir($dir)) {
$filename = $js_d . '/' . $file;
if($file === '.' || $file === '..' || !is_file($filename)) continue;
if(substr($file, -3) !== '.js') continue;
$js_d_files[] = array('file' => $file);
}
closedir($dir);
}
if (!empty($js_d_files)) $app->tpl->setLoop('js_d_includes', $js_d_files);
unset($js_d_files);
$app->tpl_defaults();
$app->tpl->pparse();
......
......@@ -18,6 +18,9 @@
<script type="text/javascript" src="js/uni-form/uni-form.jquery.js"></script>
<script type="text/javascript" src="js/jquery.ispconfigsearch.js"></script>
<script type="text/javascript" src="js/jquery.tipsy.js"></script>
<tmpl_loop name="js_d_includes">
<script type="text/javascript" src="js/js.d/<tmpl_var name='file'>"></script>
</tmpl_loop>
<script language="JavaScript" type="text/javascript">
jQuery(document).ready(function() {
loadInitContent();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment