AntonLV пре 5 година
родитељ
комит
21fa5d9da0

+ 11 - 27
inc/classes/BxDolPreloader.php

@@ -10,21 +10,19 @@
 bx_import('BxDolLanguages');
 bx_import('BxDolLanguages');
 
 
 define('BX_PRELOADER_TYPE_CSS', 'css_system');
 define('BX_PRELOADER_TYPE_CSS', 'css_system');
-define('BX_PRELOADER_TYPE_STUDIO_CSS', 'studio_css_system');
 define('BX_PRELOADER_TYPE_JS', 'js_system');
 define('BX_PRELOADER_TYPE_JS', 'js_system');
-define('BX_PRELOADER_TYPE_STUDIO_JS', 'studio_js_system');
 define('BX_PRELOADER_TYPE_JS_OPTION', 'js_option');
 define('BX_PRELOADER_TYPE_JS_OPTION', 'js_option');
 define('BX_PRELOADER_TYPE_JS_TRANSLATION', 'js_translation');
 define('BX_PRELOADER_TYPE_JS_TRANSLATION', 'js_translation');
 define('BX_PRELOADER_TYPE_JS_IMAGE', 'js_image');
 define('BX_PRELOADER_TYPE_JS_IMAGE', 'js_image');
 
 
 class BxDolPreloader extends BxDolFactory implements iBxDolSingleton
 class BxDolPreloader extends BxDolFactory implements iBxDolSingleton
 {
 {
-	protected $_oDb;
+    protected $_oDb;
 
 
-	protected $_aEntries;
+    protected $_aEntries;
 
 
-	protected $_aTypes;
-	protected $_aMarkers;
+    protected $_aTypes;
+    protected $_aMarkers;
 
 
     protected function __construct()
     protected function __construct()
     {
     {
@@ -36,9 +34,7 @@ class BxDolPreloader extends BxDolFactory implements iBxDolSingleton
 
 
         $this->_aTypes = array(
         $this->_aTypes = array(
             BX_PRELOADER_TYPE_CSS => '',
             BX_PRELOADER_TYPE_CSS => '',
-            BX_PRELOADER_TYPE_STUDIO_CSS => '',  
             BX_PRELOADER_TYPE_JS => '', 
             BX_PRELOADER_TYPE_JS => '', 
-            BX_PRELOADER_TYPE_STUDIO_JS => '',
             BX_PRELOADER_TYPE_JS_OPTION => '',
             BX_PRELOADER_TYPE_JS_OPTION => '',
             BX_PRELOADER_TYPE_JS_TRANSLATION => '',
             BX_PRELOADER_TYPE_JS_TRANSLATION => '',
             BX_PRELOADER_TYPE_JS_IMAGE => ''
             BX_PRELOADER_TYPE_JS_IMAGE => ''
@@ -58,40 +54,28 @@ class BxDolPreloader extends BxDolFactory implements iBxDolSingleton
             trigger_error('Clone is not allowed for the class: ' . get_class($this), E_USER_ERROR);
             trigger_error('Clone is not allowed for the class: ' . get_class($this), E_USER_ERROR);
     }
     }
 
 
-	public static function getInstance()
+    public static function getInstance()
     {
     {
         if(!isset($GLOBALS['bxDolClasses'][__CLASS__]))
         if(!isset($GLOBALS['bxDolClasses'][__CLASS__]))
-        	$GLOBALS['bxDolClasses'][__CLASS__] = new BxDolPreloader();
+            $GLOBALS['bxDolClasses'][__CLASS__] = new BxDolPreloader();
 
 
-		return $GLOBALS['bxDolClasses'][__CLASS__];
+        return $GLOBALS['bxDolClasses'][__CLASS__];
     }
     }
 
 
     public function perform($oTemplateSystem)
     public function perform($oTemplateSystem)
     {
     {
-    	$bStudio = $oTemplateSystem instanceof BxDolStudioTemplate;
-    	$aTypesAvail = array_keys($this->_aTypes);
+        $bStudio = $oTemplateSystem instanceof BxDolStudioTemplate;
+        $aTypesAvail = array_keys($this->_aTypes);
 
 
         foreach($this->_aEntries as $aEntry) {
         foreach($this->_aEntries as $aEntry) {
             $sType = $aEntry['type'];
             $sType = $aEntry['type'];
             if(!in_array($sType, $aTypesAvail))
             if(!in_array($sType, $aTypesAvail))
                 continue;
                 continue;
 
 
-            $sLocKey = '';
-            $bLocRemove = false;
-            $bLocRemoveJs = false;
-
-            $bModule = $aEntry['module'] != 'system';
-            $oModule = $bModule ? BxDolModule::getInstance($aEntry['module']) : null;
-            if($bModule && !$oModule)
-            	continue;
-
-            $sMethod = $this->_aTypes[($bStudio && $bModule ? 'studio_' : '') . $sType];
+            $sMethod = $this->_aTypes[$sType];
             $sContent = bx_replace_markers($aEntry['content'], $this->_aMarkers);
             $sContent = bx_replace_markers($aEntry['content'], $this->_aMarkers);
 
 
-            if($bModule)
-            	$oModule->_oTemplate->$sMethod($sContent);
-            else
-            	$oTemplateSystem->$sMethod($sContent);
+            $oTemplateSystem->$sMethod($sContent);
         }
         }
     }
     }
 }
 }

+ 4 - 4
modules/boonex/fontawesome/install/sql/enable.sql

@@ -28,10 +28,10 @@ INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
 UPDATE `sys_preloader` SET `active` = 0 WHERE `module` = 'system' AND `type` = 'css_system' AND `content` = 'icons.css';
 UPDATE `sys_preloader` SET `active` = 0 WHERE `module` = 'system' AND `type` = 'css_system' AND `content` = 'icons.css';
 
 
 INSERT INTO `sys_preloader` (`module`, `type`, `content`, `active`) VALUES
 INSERT INTO `sys_preloader` (`module`, `type`, `content`, `active`) VALUES
-('bx_fontawesome', 'css_system', 'icons.css', 1),
-('bx_fontawesome', 'css_system', 'fonts-all.css', 1),
-('bx_fontawesome', 'css_system', 'fonts-duotone.css', 0),
-('bx_fontawesome', 'css_system', 'fonts-light.css', 0);
+('bx_fontawesome', 'css_system', 'modules/boonex/fontawesome/template/css/|icons.css', 1),
+('bx_fontawesome', 'css_system', 'modules/boonex/fontawesome/template/css/|fonts-all.css', 1),
+('bx_fontawesome', 'css_system', 'modules/boonex/fontawesome/template/css/|fonts-duotone.css', 0),
+('bx_fontawesome', 'css_system', 'modules/boonex/fontawesome/template/css/|fonts-light.css', 0);
 
 
 -- Injections
 -- Injections
 
 

+ 1 - 1
modules/boonex/froala/install/sql/enable.sql

@@ -39,4 +39,4 @@ INSERT INTO `sys_injections` (`name`, `page_index`, `key`, `type`, `data`, `repl
 
 
 SET @iMaxOrder = (SELECT `order` FROM `sys_preloader` WHERE `type` = 'css_system' ORDER BY `order` DESC LIMIT 1);
 SET @iMaxOrder = (SELECT `order` FROM `sys_preloader` WHERE `type` = 'css_system' ORDER BY `order` DESC LIMIT 1);
 INSERT INTO `sys_preloader`(`module`, `type`, `content`, `active`, `order`) VALUES
 INSERT INTO `sys_preloader`(`module`, `type`, `content`, `active`, `order`) VALUES
-('bx_froala', 'css_system', '{dir_plugins_modules}boonex/froala/plugins/froala/css/|froala_style.min.css',  '1',  @iMaxOrder + 1);
+('bx_froala', 'css_system', 'modules/boonex/froala/plugins/froala/css/|froala_style.min.css',  '1',  @iMaxOrder + 1);

+ 1 - 1
modules/boonex/timeline/install/sql/enable.sql

@@ -509,4 +509,4 @@ INSERT INTO `sys_cron_jobs` (`name`, `time`, `class`, `file`, `service_call`) VA
 -- PRELOADER
 -- PRELOADER
 SET @iOrderPreloader = (SELECT IFNULL(MAX(`order`), 9999) FROM `sys_preloader` WHERE `type`='js_system' AND `order` > 9999 LIMIT 1);
 SET @iOrderPreloader = (SELECT IFNULL(MAX(`order`), 9999) FROM `sys_preloader` WHERE `type`='js_system' AND `order` > 9999 LIMIT 1);
 INSERT INTO `sys_preloader`(`module`, `type`, `content`, `active`, `order`) VALUES
 INSERT INTO `sys_preloader`(`module`, `type`, `content`, `active`, `order`) VALUES
-('bx_timeline', 'js_system', 'modernizr.min.js', 1, @iOrderPreloader + 1);
+('bx_timeline', 'js_system', 'modules/boonex/timeline/js/|modernizr.min.js', 1, @iOrderPreloader + 1);