Explorar el Código

#255 Split system and per page css/jss inclusions

Alex Trofimov hace 10 años
padre
commit
14ad083ba1

+ 11 - 2
inc/classes/BxDolTemplate.php

@@ -1069,16 +1069,25 @@ class BxDolTemplate extends BxDol implements iBxDolSingleton
             $sContent = $this->parseHtmlByName('default.html', $aVariables, $this->_sKeyWrapperHtml, BX_DOL_TEMPLATE_CHECK_IN_BOTH);
 
         //--- Add CSS and JS at the very last ---//
+
+        if(strpos($sContent , '<bx_include_css_system />') !== false) {
+            $sContent = str_replace('<bx_include_css_system />', $this->includeFiles('css', true), $sContent);
+        }
+
         if(strpos($sContent , '<bx_include_css />') !== false) {
             if (!empty($this->aPage['css_name']))
                 $this->addCss($this->aPage['css_name']);
-            $sContent = str_replace('<bx_include_css />', $this->includeFiles('css', true) . $this->includeFiles('css'), $sContent);
+            $sContent = str_replace('<bx_include_css />', $this->includeFiles('css'), $sContent);
+        }
+        
+        if(strpos($sContent , '<bx_include_js_system />') !== false) {
+            $sContent = str_replace('<bx_include_js_system />', $this->includeFiles('js', true), $sContent);
         }
 
         if(strpos($sContent , '<bx_include_js />') !== false) {
             if (!empty($this->aPage['js_name']))
                 $this->addJs($this->aPage['js_name']);
-            $sContent = str_replace('<bx_include_js />', $this->includeFiles('js', true) . $this->includeFiles('js'), $sContent);
+            $sContent = str_replace('<bx_include_js />', $this->includeFiles('js'), $sContent);
         }
 
         if (isset($GLOBALS['bx_profiler'])) $GLOBALS['bx_profiler']->endPage($sContent);

+ 2 - 0
modules/boonex/air/data/template/system/_header.html

@@ -11,6 +11,7 @@
 
     <meta http-equiv="Content-Style-Type" content="text/css" />
 
+    <bx_include_css_system />
     <bx_include_css />
     <link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,300,600,700' rel='stylesheet' type='text/css'>
     <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'>
@@ -19,6 +20,7 @@
     __dol_lang__
     __dol_options__
 
+    <bx_include_js_system />
     <bx_include_js />
     <script type="text/javascript" language="javascript">
 

+ 2 - 0
modules/boonex/ocean/data/template/system/_header.html

@@ -11,6 +11,7 @@
 
     <meta http-equiv="Content-Style-Type" content="text/css" />
 
+    <bx_include_css_system />
     <bx_include_css />
     <link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,400,600' rel='stylesheet' type='text/css' />
 
@@ -18,6 +19,7 @@
     __dol_lang__
     __dol_options__
 
+    <bx_include_js_system />
     <bx_include_js />
     <script type="text/javascript" language="javascript">
 

+ 2 - 2
modules/boonex/uni/data/template/system/_header.html

@@ -11,13 +11,13 @@
 
     <meta http-equiv="Content-Style-Type" content="text/css" />
 
-    <bx_include_css />
+    <bx_include_css_system />
 
     __dol_images__
     __dol_lang__
     __dol_options__
 
-    <bx_include_js />
+    <bx_include_js_system />
     <script type="text/javascript" language="javascript">
 
         var sUrlRoot = '<bx_url_root />';

+ 3 - 1
template/_header.html

@@ -11,12 +11,14 @@
 
     <meta http-equiv="Content-Style-Type" content="text/css" />
 
+    <bx_include_css_system />
     <bx_include_css />
 
     __dol_images__
     __dol_lang__
     __dol_options__
 
+    <bx_include_js_system />
     <bx_include_js />
     <script type="text/javascript" language="javascript">
 
@@ -90,4 +92,4 @@
 </head>
 
 <body class="bx-def-font bx-def-color-bg-page" <bx_injection:injection_body /> >
-    <bx_injection:injection_header />    
+    <bx_injection:injection_header />