Преглед изворни кода

#95 - Lagoon:Page width setting in templates.

AntonLV пре 11 година
родитељ
комит
2ad0bf1d6b

+ 1 - 5
install/sql/system.sql

@@ -229,7 +229,6 @@ INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `ex
 (@iCategoryId, 'sys_site_icon', '', '0', 'digit', '', '', '', 22),
 (@iCategoryId, 'sys_site_logo_width', '_adm_stg_cpt_option_sys_site_logo_width', '240', 'digit', '', '', '', 23),
 (@iCategoryId, 'sys_site_logo_height', '_adm_stg_cpt_option_sys_site_logo_height', '48', 'digit', '', '', '', 24),
-(@iCategoryId, 'main_div_width', '', '1000px', 'digit', '', '', '', 25),
 
 (@iCategoryId, 'sys_template_cache_image_enable', '', '', 'checkbox', '', '', '', 30),
 (@iCategoryId, 'sys_template_cache_image_max_size', '', '5', 'digit', '', '', '', 31),
@@ -267,10 +266,7 @@ INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `hidden`, `or
 SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
-(@iCategoryId, 'template', '_adm_stg_cpt_option_template', '', 'select', 'a:3:{s:6:"module";s:6:"system";s:6:"method";s:13:"get_templates";s:5:"class";s:21:"TemplTemplateServices";}', 'Template', '_adm_stg_err_option_template', 1),
-
-(@iCategoryId, 'sys_template_page_width_min', '_adm_stg_cpt_option_sys_template_page_width_min', '774', 'digit', '', '', '', 2),
-(@iCategoryId, 'sys_template_page_width_max', '_adm_stg_cpt_option_sys_template_page_width_max', '1600', 'digit', '', '', '', 3);
+(@iCategoryId, 'template', '_adm_stg_cpt_option_template', '', 'select', 'a:3:{s:6:"module";s:6:"system";s:6:"method";s:13:"get_templates";s:5:"class";s:21:"TemplTemplateServices";}', 'Template', '_adm_stg_err_option_template', 1);
 
 
 --

+ 3 - 0
modules/boonex/lagoon/data/template/system/scripts/BxTemplConfig.php

@@ -15,6 +15,9 @@ class BxTemplConfig extends BxBaseConfig
     {
         parent::__construct();
 
+		if(class_exists('BxDolDb') && BxDolDb::getInstance())
+			$this->_aConfig['aLessConfig']['bx-page-width'] = getParam('bx_lagoon_page_width') . 'px';
+
         bx_import('BxDolTemplate');
         $sCode = BxDolTemplate::getInstance()->getCode();
         $sStaticImages = BX_DOL_URL_ROOT . 'templates/tmpl_' . $sCode . '/images/';

+ 1 - 0
modules/boonex/lagoon/install/langs/en.xml

@@ -4,4 +4,5 @@
 	<string name="_bx_lagoon_stg_cpt_type"><![CDATA[Lagoon]]></string>
 	<string name="_bx_lagoon_stg_cpt_category_system"><![CDATA[General]]></string>
 	<string name="_bx_lagoon_stg_cpt_option_switcher_name"><![CDATA[Name In Template Switcher]]></string>
+	<string name="_bx_lagoon_stg_cpt_option_page_width"><![CDATA[Page Width]]></string>
 </resources>

+ 2 - 1
modules/boonex/lagoon/install/sql/install.sql

@@ -10,7 +10,8 @@ INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALU
 SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
-(@iCategoryId, CONCAT(@sName, '_switcher_title'), '_bx_lagoon_stg_cpt_option_switcher_name', 'Lagoon', 'digit', '', '', '', 1);
+(@iCategoryId, CONCAT(@sName, '_switcher_title'), '_bx_lagoon_stg_cpt_option_switcher_name', 'Lagoon', 'digit', '', '', '', 1),
+(@iCategoryId, CONCAT(@sName, '_page_width'), '_bx_lagoon_stg_cpt_option_page_width', '1000', 'digit', '', '', '', 2);
 
 
 -- STUDIO PAGE & WIDGET

+ 0 - 3
template/scripts/BxBaseConfig.php

@@ -61,9 +61,6 @@ class BxBaseConfig extends BxDol implements iBxDolSingleton
     function __construct()
     {
         parent::__construct();
-
-        if (class_exists('BxDolDb') && BxDolDb::getInstance())
-            $this->_aConfig['aLessConfig']['bx-page-width'] = getParam('main_div_width');
     }
 
     public static function getInstance()