Просмотр исходного кода

Ticket #940 - On-hover background color for Cards.

AntonLV 9 лет назад
Родитель
Сommit
85ae5a2feb

+ 3 - 0
modules/boonex/decorous/data/template/system/css/default.less

@@ -447,6 +447,9 @@ a.bx-def-font-h3:hover {
 .bx-def-box.bx-def-color-bg-box {
 	.background-color (@bx-color-box);
 }
+.bx-def-box.bx-def-color-bg-box-hover:hover {
+    .background-color (@bx-color-box-hover);
+}
 .bx-def-box.bx-def-round-corners {
 	.radius(@bx-border-radius-box);
 }

+ 1 - 0
modules/boonex/decorous/data/template/system/scripts/BxTemplConfig.php

@@ -134,6 +134,7 @@ class BxTemplConfig extends BxBaseConfig
         $this->_aConfig['aLessConfig']['bx-color-block-title'] = $this->_setColorRgba($sName . '_block_title_bg_color', 'rgba(255, 255, 255, 1.0)');
         $this->_aConfig['aLessConfig']['bx-color-block-title-div'] = $this->_setColorRgba($sName . '_block_title_div_bg_color', 'rgba(208, 208, 208, 1)');        
         $this->_aConfig['aLessConfig']['bx-color-box'] = $this->_setColorRgba($sName . '_card_bg_color', 'rgba(242, 242, 242, 1)');
+        $this->_aConfig['aLessConfig']['bx-color-box-hover'] = $this->_setColorRgba($sName . '_card_bg_color_hover', 'rgba(242, 242, 242, 0.5)');
         $this->_aConfig['aLessConfig']['bx-color-popup'] = $this->_setColorRgba($sName . '_popup_bg_color', 'rgba(255, 255, 255, 1)');
         $this->_aConfig['aLessConfig']['bx-color-popup-title'] = $this->_setColorRgba($sName . '_popup_title_bg_color', 'rgba(40, 60, 80, 0.9)');
         $this->_aConfig['aLessConfig']['bx-color-menu-main'] = $this->_setColorRgba($sName . '_menu_main_bg_color', 'rgba(255, 255, 255, 0.9)');

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

@@ -102,6 +102,7 @@
 
 	<string name="_bx_decorous_stg_cpt_category_styles_card"><![CDATA[Cards]]></string>
 	<string name="_bx_decorous_stg_cpt_option_card_bg_color"><![CDATA[Background color]]></string>
+	<string name="_bx_decorous_stg_cpt_option_card_bg_color_hover"><![CDATA[On-hover background color]]></string>
 	<string name="_bx_decorous_stg_cpt_option_card_bg_image"><![CDATA[Background image]]></string>
 	<string name="_bx_decorous_stg_cpt_option_card_bg_image_repeat"><![CDATA[Background image repeat]]></string>
 	<string name="_bx_decorous_stg_cpt_option_card_bg_image_attachment"><![CDATA[Background image attachment]]></string>

+ 10 - 9
modules/boonex/decorous/install/sql/install.sql

@@ -150,15 +150,16 @@ SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
 (@iCategoryId, CONCAT(@sName, '_card_bg_color'), '_bx_decorous_stg_cpt_option_card_bg_color', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 1),
-(@iCategoryId, CONCAT(@sName, '_card_bg_image'), '_bx_decorous_stg_cpt_option_card_bg_image', '', 'image', '', '', '', 2),
-(@iCategoryId, CONCAT(@sName, '_card_bg_image_repeat'), '_bx_decorous_stg_cpt_option_card_bg_image_repeat', 'no-repeat', 'select', 'no-repeat,repeat,repeat-x,repeat-y', '', '', 3),
-(@iCategoryId, CONCAT(@sName, '_card_bg_image_attachment'), '_bx_decorous_stg_cpt_option_card_bg_image_attachment', 'scroll', 'select', 'fixed,scroll,local', '', '', 4),
-(@iCategoryId, CONCAT(@sName, '_card_bg_image_size'), '_bx_decorous_stg_cpt_option_card_bg_image_size', 'cover', 'select', 'auto,cover,contain', '', '', 5),
-(@iCategoryId, CONCAT(@sName, '_card_content_padding'), '_bx_decorous_stg_cpt_option_card_content_padding', '1rem', 'digit', '', '', '', 6),
-(@iCategoryId, CONCAT(@sName, '_card_border_color'), '_bx_decorous_stg_cpt_option_card_border_color', 'rgba(0, 0, 0, 0.1)', 'rgba', '', '', '', 7),
-(@iCategoryId, CONCAT(@sName, '_card_border_size'), '_bx_decorous_stg_cpt_option_card_border_size', '1px', 'digit', '', '', '', 8),
-(@iCategoryId, CONCAT(@sName, '_card_border_radius'), '_bx_decorous_stg_cpt_option_card_border_radius', '3px', 'digit', '', '', '', 9),
-(@iCategoryId, CONCAT(@sName, '_card_shadow'), '_bx_decorous_stg_cpt_option_card_shadow', '0px 1px 3px 0px rgba(0, 0, 0, 0.05)', 'digit', '', '', '', 10);
+(@iCategoryId, CONCAT(@sName, '_card_bg_color_hover'), '_bx_decorous_stg_cpt_option_card_bg_color_hover', 'rgba(255, 255, 255, 0.5)', 'rgba', '', '', '', 2),
+(@iCategoryId, CONCAT(@sName, '_card_bg_image'), '_bx_decorous_stg_cpt_option_card_bg_image', '', 'image', '', '', '', 3),
+(@iCategoryId, CONCAT(@sName, '_card_bg_image_repeat'), '_bx_decorous_stg_cpt_option_card_bg_image_repeat', 'no-repeat', 'select', 'no-repeat,repeat,repeat-x,repeat-y', '', '', 4),
+(@iCategoryId, CONCAT(@sName, '_card_bg_image_attachment'), '_bx_decorous_stg_cpt_option_card_bg_image_attachment', 'scroll', 'select', 'fixed,scroll,local', '', '', 5),
+(@iCategoryId, CONCAT(@sName, '_card_bg_image_size'), '_bx_decorous_stg_cpt_option_card_bg_image_size', 'cover', 'select', 'auto,cover,contain', '', '', 6),
+(@iCategoryId, CONCAT(@sName, '_card_content_padding'), '_bx_decorous_stg_cpt_option_card_content_padding', '1rem', 'digit', '', '', '', 7),
+(@iCategoryId, CONCAT(@sName, '_card_border_color'), '_bx_decorous_stg_cpt_option_card_border_color', 'rgba(0, 0, 0, 0.1)', 'rgba', '', '', '', 8),
+(@iCategoryId, CONCAT(@sName, '_card_border_size'), '_bx_decorous_stg_cpt_option_card_border_size', '1px', 'digit', '', '', '', 9),
+(@iCategoryId, CONCAT(@sName, '_card_border_radius'), '_bx_decorous_stg_cpt_option_card_border_radius', '3px', 'digit', '', '', '', 10),
+(@iCategoryId, CONCAT(@sName, '_card_shadow'), '_bx_decorous_stg_cpt_option_card_shadow', '0px 1px 3px 0px rgba(0, 0, 0, 0.05)', 'digit', '', '', '', 11);
 
 
 -- SETTINGS: Decorous template Styles Popups

+ 2 - 1
modules/boonex/ocean/data/template/system/scripts/BxTemplConfig.php

@@ -18,7 +18,8 @@ class BxTemplConfig extends BxBaseConfig
         
         	'bx-color-page' => '#b9e2f6',
         	'bx-color-block' => '#fff',
-        	'bx-color-box' => '#daf8ff',
+        	'bx-color-box' => 'rgba(218, 248, 255, 1.0)',
+        	'bx-color-box-hover' => 'rgba(218, 248, 255, 0.5)',
         	'bx-color-sec' => '#fff',
         	'bx-color-hl' => 'rgba(202, 242, 252, 0.2)',
         	'bx-color-active' => 'rgba(202, 242, 252, 0.4)',

+ 3 - 0
modules/boonex/protean/data/template/system/css/default.less

@@ -435,6 +435,9 @@ a.bx-def-font-h3:hover {
 .bx-def-box.bx-def-color-bg-box {
 	.background-color (@bx-color-box);
 }
+.bx-def-box.bx-def-color-bg-box-hover:hover {
+    .background-color (@bx-color-box-hover);
+}
 .bx-def-box.bx-def-round-corners {
 	border-radius: @bx-border-radius-box;
 	background-clip: padding-box;

+ 1 - 0
modules/boonex/protean/data/template/system/scripts/BxTemplConfig.php

@@ -127,6 +127,7 @@ class BxTemplConfig extends BxBaseConfig
         $this->_aConfig['aLessConfig']['bx-color-block-title'] = $this->_setColorRgba($sName . '_block_title_bg_color', 'rgba(255, 255, 255, 1.0)');
         $this->_aConfig['aLessConfig']['bx-color-block-title-div'] = $this->_setColorRgba($sName . '_block_title_div_bg_color', 'rgba(208, 208, 208, 1)');        
         $this->_aConfig['aLessConfig']['bx-color-box'] = $this->_setColorRgba($sName . '_card_bg_color', 'rgba(242, 242, 242, 1)');
+        $this->_aConfig['aLessConfig']['bx-color-box-hover'] = $this->_setColorRgba($sName . '_card_bg_color_hover', 'rgba(242, 242, 242, 0.5)');
         $this->_aConfig['aLessConfig']['bx-color-popup'] = $this->_setColorRgba($sName . '_popup_bg_color', 'rgba(255, 255, 255, 1)');
         $this->_aConfig['aLessConfig']['bx-color-popup-title'] = $this->_setColorRgba($sName . '_popup_title_bg_color', 'rgba(40, 60, 80, 0.9)');
         $this->_aConfig['aLessConfig']['bx-color-menu-main'] = $this->_setColorRgba($sName . '_menu_main_bg_color', 'rgba(255, 255, 255, 0.9)');

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

@@ -102,6 +102,7 @@
 
 	<string name="_bx_protean_stg_cpt_category_styles_card"><![CDATA[Cards]]></string>
 	<string name="_bx_protean_stg_cpt_option_card_bg_color"><![CDATA[Background color]]></string>
+	<string name="_bx_protean_stg_cpt_option_card_bg_color_hover"><![CDATA[On-hover background color]]></string>
 	<string name="_bx_protean_stg_cpt_option_card_bg_image"><![CDATA[Background image]]></string>
 	<string name="_bx_protean_stg_cpt_option_card_bg_image_repeat"><![CDATA[Background image repeat]]></string>
 	<string name="_bx_protean_stg_cpt_option_card_bg_image_attachment"><![CDATA[Background image attachment]]></string>

+ 11 - 9
modules/boonex/protean/install/sql/install.sql

@@ -150,15 +150,16 @@ SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
 (@iCategoryId, CONCAT(@sName, '_card_bg_color'), '_bx_protean_stg_cpt_option_card_bg_color', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 1),
-(@iCategoryId, CONCAT(@sName, '_card_bg_image'), '_bx_protean_stg_cpt_option_card_bg_image', '', 'image', '', '', '', 2),
-(@iCategoryId, CONCAT(@sName, '_card_bg_image_repeat'), '_bx_protean_stg_cpt_option_card_bg_image_repeat', 'no-repeat', 'select', 'no-repeat,repeat,repeat-x,repeat-y', '', '', 3),
-(@iCategoryId, CONCAT(@sName, '_card_bg_image_attachment'), '_bx_protean_stg_cpt_option_card_bg_image_attachment', 'scroll', 'select', 'fixed,scroll,local', '', '', 4),
-(@iCategoryId, CONCAT(@sName, '_card_bg_image_size'), '_bx_protean_stg_cpt_option_card_bg_image_size', 'cover', 'select', 'auto,cover,contain', '', '', 5),
-(@iCategoryId, CONCAT(@sName, '_card_content_padding'), '_bx_protean_stg_cpt_option_card_content_padding', '1rem', 'digit', '', '', '', 6),
-(@iCategoryId, CONCAT(@sName, '_card_border_color'), '_bx_protean_stg_cpt_option_card_border_color', 'rgba(0, 0, 0, 0.1)', 'rgba', '', '', '', 7),
-(@iCategoryId, CONCAT(@sName, '_card_border_size'), '_bx_protean_stg_cpt_option_card_border_size', '1px', 'digit', '', '', '', 8),
-(@iCategoryId, CONCAT(@sName, '_card_border_radius'), '_bx_protean_stg_cpt_option_card_border_radius', '3px', 'digit', '', '', '', 9),
-(@iCategoryId, CONCAT(@sName, '_card_shadow'), '_bx_protean_stg_cpt_option_card_shadow', '0px 1px 3px 0px rgba(0, 0, 0, 0.05)', 'digit', '', '', '', 10);
+(@iCategoryId, CONCAT(@sName, '_card_bg_color_hover'), '_bx_protean_stg_cpt_option_card_bg_color_hover', 'rgba(255, 255, 255, 0.5)', 'rgba', '', '', '', 2),
+(@iCategoryId, CONCAT(@sName, '_card_bg_image'), '_bx_protean_stg_cpt_option_card_bg_image', '', 'image', '', '', '', 3),
+(@iCategoryId, CONCAT(@sName, '_card_bg_image_repeat'), '_bx_protean_stg_cpt_option_card_bg_image_repeat', 'no-repeat', 'select', 'no-repeat,repeat,repeat-x,repeat-y', '', '', 4),
+(@iCategoryId, CONCAT(@sName, '_card_bg_image_attachment'), '_bx_protean_stg_cpt_option_card_bg_image_attachment', 'scroll', 'select', 'fixed,scroll,local', '', '', 5),
+(@iCategoryId, CONCAT(@sName, '_card_bg_image_size'), '_bx_protean_stg_cpt_option_card_bg_image_size', 'cover', 'select', 'auto,cover,contain', '', '', 6),
+(@iCategoryId, CONCAT(@sName, '_card_content_padding'), '_bx_protean_stg_cpt_option_card_content_padding', '1rem', 'digit', '', '', '', 7),
+(@iCategoryId, CONCAT(@sName, '_card_border_color'), '_bx_protean_stg_cpt_option_card_border_color', 'rgba(0, 0, 0, 0.1)', 'rgba', '', '', '', 8),
+(@iCategoryId, CONCAT(@sName, '_card_border_size'), '_bx_protean_stg_cpt_option_card_border_size', '1px', 'digit', '', '', '', 9),
+(@iCategoryId, CONCAT(@sName, '_card_border_radius'), '_bx_protean_stg_cpt_option_card_border_radius', '3px', 'digit', '', '', '', 10),
+(@iCategoryId, CONCAT(@sName, '_card_shadow'), '_bx_protean_stg_cpt_option_card_shadow', '0px 1px 3px 0px rgba(0, 0, 0, 0.05)', 'digit', '', '', '', 11);
 
 
 -- SETTINGS: Protean template Styles Popups
@@ -481,6 +482,7 @@ INSERT INTO `sys_options_mixes2options` (`option`, `mix_id`, `value`) VALUES
 ('bx_protean_block_title_div_height', @iMixId, '1px'),
 ('bx_protean_block_title_div_bg_color', @iMixId, 'rgba(40, 60, 80, 0.1)'),
 ('bx_protean_card_bg_color', @iMixId, 'rgba(245, 250, 255, 1)'),
+('bx_protean_card_bg_color_hover', @iMixId, 'rgba(245, 250, 255, 0.5)'),
 ('bx_protean_card_bg_image', @iMixId, '0'),
 ('bx_protean_card_content_padding', @iMixId, '1rem'),
 ('bx_protean_card_border_color', @iMixId, 'rgba(40, 60, 80, 0.1)'),

+ 1 - 0
modules/boonex/russian/data/langs/bx_decorous/ru.xml

@@ -102,6 +102,7 @@
 
 	<string name="_bx_decorous_stg_cpt_category_styles_card"><![CDATA[Карточки]]></string>
 	<string name="_bx_decorous_stg_cpt_option_card_bg_color"><![CDATA[Цвет фона]]></string>
+	<string name="_bx_decorous_stg_cpt_option_card_bg_color_hover"><![CDATA[Цвет фона при наведении курсора]]></string>
 	<string name="_bx_decorous_stg_cpt_option_card_bg_image"><![CDATA[Изображение фона]]></string>
 	<string name="_bx_decorous_stg_cpt_option_card_bg_image_repeat"><![CDATA[Повтор изображения фона]]></string>
 	<string name="_bx_decorous_stg_cpt_option_card_bg_image_attachment"><![CDATA[Присоединение изображения фона]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/bx_protean/ru.xml

@@ -102,6 +102,7 @@
 
 	<string name="_bx_protean_stg_cpt_category_styles_card"><![CDATA[Карточки]]></string>
 	<string name="_bx_protean_stg_cpt_option_card_bg_color"><![CDATA[Цвет фона]]></string>
+	<string name="_bx_protean_stg_cpt_option_card_bg_color_hover"><![CDATA[Цвет фона при наведении курсора]]></string>
 	<string name="_bx_protean_stg_cpt_option_card_bg_image"><![CDATA[Изображение фона]]></string>
 	<string name="_bx_protean_stg_cpt_option_card_bg_image_repeat"><![CDATA[Повтор изображения фона]]></string>
 	<string name="_bx_protean_stg_cpt_option_card_bg_image_attachment"><![CDATA[Присоединение изображения фона]]></string>

+ 5 - 1
template/css/default.less

@@ -291,6 +291,9 @@
 .bx-def-color-bg-box {
     .background-color (@bx-color-box);
 }
+.bx-def-color-bg-box-hover:hover {
+    .background-color (@bx-color-box-hover);
+}
 .bx-def-color-bg-sec {
     .background-color (@bx-color-sec);
 }
@@ -383,7 +386,8 @@
     /*color:@bx-font-color-default; */ 
 }
 
-.bx-def-font-color {
+.bx-def-font-color,
+.bx-def-font-color:hover {
 	color:@bx-font-color-default;
 }
 

+ 2 - 1
template/scripts/BxBaseConfig.php

@@ -33,7 +33,8 @@ class BxBaseConfig extends BxDol implements iBxDolSingleton
 
             'bx-color-page' => '#fff',
             'bx-color-block' => '#fff',
-            'bx-color-box' => '#f2f2f2',
+            'bx-color-box' => 'rgba(242, 242, 242, 1.0)',
+            'bx-color-box-hover' => 'rgba(242, 242, 242, 0.8)',
             'bx-color-sec' => '#f2f2f2',
             'bx-color-hl' => 'rgba(196, 248, 156, 0.2)',
             'bx-color-active' => 'rgba(196, 248, 156, 0.4)',