Move loading of js_config to templatelayout
Also check for installed flag because this isn't available before setup
This commit is contained in:
parent
e969a78cf9
commit
149d079fd4
|
@ -7,7 +7,6 @@
|
|||
<?php foreach ($_['cssfiles'] as $cssfile): ?>
|
||||
<link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
|
||||
<?php endforeach; ?>
|
||||
<script type="text/javascript" src="<?php echo OC_Helper::linkToRoute('js_config');?>"></script>
|
||||
<?php foreach ($_['jsfiles'] as $jsfile): ?>
|
||||
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<?php foreach($_['cssfiles'] as $cssfile): ?>
|
||||
<link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
|
||||
<?php endforeach; ?>
|
||||
<script type="text/javascript" src="<?php echo OC_Helper::linkToRoute('js_config');?>"></script>
|
||||
<?php foreach($_['jsfiles'] as $jsfile): ?>
|
||||
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<?php foreach($_['cssfiles'] as $cssfile): ?>
|
||||
<link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
|
||||
<?php endforeach; ?>
|
||||
<script type="text/javascript" src="<?php echo OC_Helper::linkToRoute('js_config');?>"></script>
|
||||
<?php foreach($_['jsfiles'] as $jsfile): ?>
|
||||
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
@ -36,6 +36,9 @@ class OC_TemplateLayout extends OC_Template {
|
|||
// Add the js files
|
||||
$jsfiles = self::findJavascriptFiles(OC_Util::$scripts);
|
||||
$this->assign('jsfiles', array(), false);
|
||||
if (OC_Config::getValue('installed', false)) {
|
||||
$this->append( 'jsfiles', OC_Helper::linkToRoute('js_config'));
|
||||
}
|
||||
if (!empty(OC_Util::$core_scripts)) {
|
||||
$this->append( 'jsfiles', OC_Helper::linkToRemoteBase('core.js', false));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue