AntonLV 7 лет назад
Родитель
Сommit
e73d06c899

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

@@ -470,11 +470,11 @@ a.bx-def-font-h3:hover {
 }
 .bx-base-text-unit.bx-base-text-unit-ext.bx-def-round-corners img.bx-base-text-unit-cover.bx-def-round-corners,
 .bx-base-text-unit.bx-base-text-unit-ext .bx-def-round-corners img.bx-base-text-unit-cover.bx-def-round-corners {
-    border-radius: @bx-border-radius-box-tl @bx-border-radius-box-tr 0 0;
+    border-radius: @bx-border-radius-box-itl @bx-border-radius-box-itr 0 0;
 }
 .bx-base-text-unit.bx-base-text-unit-gallery.bx-def-round-corners .bx-base-text-unit-thumb.bx-def-round-corners,
 .bx-base-text-unit.bx-base-text-unit-gallery .bx-def-round-corners .bx-base-text-unit-thumb.bx-def-round-corners {
-    border-radius: 0 0 @bx-border-radius-box-br @bx-border-radius-box-bl;
+    border-radius: 0 0 @bx-border-radius-box-ibr @bx-border-radius-box-ibl;
 }
 
 /* popup */

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

@@ -223,6 +223,12 @@ class BxTemplConfig extends BxBaseConfig
             $this->_aConfig['aLessConfig']['bx-border-radius-box-br'],
             $this->_aConfig['aLessConfig']['bx-border-radius-box-bl']
         ) = $this->_setSizeDivided($this->_aConfig['aLessConfig']['bx-border-radius-box']);
+        list(
+            $this->_aConfig['aLessConfig']['bx-border-radius-box-itl'],
+            $this->_aConfig['aLessConfig']['bx-border-radius-box-itr'],
+            $this->_aConfig['aLessConfig']['bx-border-radius-box-ibr'],
+            $this->_aConfig['aLessConfig']['bx-border-radius-box-ibl']
+        ) = $this->_setInnerSizeDivided($this->_aConfig['aLessConfig']['bx-border-radius-box']);
         $this->_aConfig['aLessConfig']['bx-border-radius-popup'] = $this->_setSize($sName . '_popup_border_radius', '3px');
         list(
             $this->_aConfig['aLessConfig']['bx-border-radius-popup-tl'],

+ 2 - 2
modules/boonex/lucid/data/template/system/css/default.less

@@ -471,12 +471,12 @@ a.bx-def-font-h3:hover {
 }
 .bx-base-text-unit.bx-base-text-unit-gallery.bx-def-round-corners .bx-base-text-unit-thumb.bx-def-round-corners,
 .bx-base-text-unit.bx-base-text-unit-gallery .bx-def-round-corners .bx-base-text-unit-thumb.bx-def-round-corners {
-    border-radius: 0 0 @bx-border-radius-box-br @bx-border-radius-box-bl;
+    border-radius: 0 0 @bx-border-radius-box-ibr @bx-border-radius-box-ibl;
 }
 
 /* box: timeline */
 .bx-tl-view div.bx-tl-item div.bx-tl-item-footer {
-    border-radius: 0 0 @bx-border-radius-box-br @bx-border-radius-box-bl;
+    border-radius: 0 0 @bx-border-radius-box-ibr @bx-border-radius-box-ibl;
 }
 
 /* popup */

+ 6 - 0
modules/boonex/lucid/data/template/system/scripts/BxTemplConfig.php

@@ -259,6 +259,12 @@ class BxTemplConfig extends BxBaseConfig
             $this->_aConfig['aLessConfig']['bx-border-radius-box-br'],
             $this->_aConfig['aLessConfig']['bx-border-radius-box-bl']
         ) = $this->_setSizeDivided($this->_aConfig['aLessConfig']['bx-border-radius-box']);
+        list(
+            $this->_aConfig['aLessConfig']['bx-border-radius-box-itl'],
+            $this->_aConfig['aLessConfig']['bx-border-radius-box-itr'],
+            $this->_aConfig['aLessConfig']['bx-border-radius-box-ibr'],
+            $this->_aConfig['aLessConfig']['bx-border-radius-box-ibl']
+        ) = $this->_setInnerSizeDivided($this->_aConfig['aLessConfig']['bx-border-radius-box']);
         $this->_aConfig['aLessConfig']['bx-border-radius-popup'] = $this->_setSize($sName . '_popup_border_radius', '3px');
         list(
             $this->_aConfig['aLessConfig']['bx-border-radius-popup-tl'],

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

@@ -453,11 +453,11 @@ a.bx-def-font-h3:hover {
 }
 .bx-base-text-unit.bx-base-text-unit-ext.bx-def-round-corners img.bx-base-text-unit-cover.bx-def-round-corners,
 .bx-base-text-unit.bx-base-text-unit-ext .bx-def-round-corners img.bx-base-text-unit-cover.bx-def-round-corners {
-    border-radius: @bx-border-radius-box-tl @bx-border-radius-box-tr 0 0;
+    border-radius: @bx-border-radius-box-itl @bx-border-radius-box-itr 0 0;
 }
 .bx-base-text-unit.bx-base-text-unit-gallery.bx-def-round-corners .bx-base-text-unit-thumb.bx-def-round-corners,
 .bx-base-text-unit.bx-base-text-unit-gallery .bx-def-round-corners .bx-base-text-unit-thumb.bx-def-round-corners {
-    border-radius: 0 0 @bx-border-radius-box-br @bx-border-radius-box-bl;
+    border-radius: 0 0 @bx-border-radius-box-ibr @bx-border-radius-box-ibl;
 }
 
 /* popup */

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

@@ -213,6 +213,12 @@ class BxTemplConfig extends BxBaseConfig
             $this->_aConfig['aLessConfig']['bx-border-radius-box-br'],
             $this->_aConfig['aLessConfig']['bx-border-radius-box-bl']
         ) = $this->_setSizeDivided($this->_aConfig['aLessConfig']['bx-border-radius-box']);
+        list(
+            $this->_aConfig['aLessConfig']['bx-border-radius-box-itl'],
+            $this->_aConfig['aLessConfig']['bx-border-radius-box-itr'],
+            $this->_aConfig['aLessConfig']['bx-border-radius-box-ibr'],
+            $this->_aConfig['aLessConfig']['bx-border-radius-box-ibl']
+        ) = $this->_setInnerSizeDivided($this->_aConfig['aLessConfig']['bx-border-radius-box']);
         $this->_aConfig['aLessConfig']['bx-border-radius-popup'] = $this->_setSize($sName . '_popup_border_radius', '3px');
         list(
             $this->_aConfig['aLessConfig']['bx-border-radius-popup-tl'],

+ 57 - 0
template/scripts/BxBaseConfig.php

@@ -152,6 +152,63 @@ class BxBaseConfig extends BxDol implements iBxDolSingleton
         return $aResult;
     }
 
+    protected function _setInnerSizeDivided($sValue, $aReductor = array('px' => 1, 'rem' => 0.0625))
+    {
+        $aEmpty = array(0, 0, 0, 0);
+
+        $aValues = explode(' ', $sValue);
+        if(empty($aValues) || !is_array($aValues))
+            return $aEmpty;
+
+        $aResult = $aEmpty;
+        switch(count($aValues)) {
+            case 1:
+                $sValue0 = $this->_decreaseValue($aValues[0], $aReductor);
+                $aResult = array($sValue0, $sValue0, $sValue0, $sValue0);
+                break;
+
+            case 2:
+                $sValue0 = $this->_decreaseValue($aValues[0], $aReductor);
+                $sValue1 = $this->_decreaseValue($aValues[1], $aReductor);
+                $aResult = array($sValue0, $sValue1, $sValue0, $sValue1);
+                break;
+
+            case 3:
+                $sValue0 = $this->_decreaseValue($aValues[0], $aReductor);
+                $sValue1 = $this->_decreaseValue($aValues[1], $aReductor);
+                $sValue2 = $this->_decreaseValue($aValues[2], $aReductor);
+                $aResult = array($sValue0, $sValue1, $sValue2, $sValue1);
+                break;
+
+            case 4:
+                $sValue0 = $this->_decreaseValue($aValues[0], $aReductor);
+                $sValue1 = $this->_decreaseValue($aValues[1], $aReductor);
+                $sValue2 = $this->_decreaseValue($aValues[2], $aReductor);
+                $sValue3 = $this->_decreaseValue($aValues[3], $aReductor);
+                $aResult = array($sValue0, $sValue1, $sValue2, $sValue3);
+                break;
+        }
+
+        return $aResult;
+    }
+
+    protected function _decreaseValue($sValue, $aReductor = array('px' => 1, 'rem' => 0.0625))
+    {
+        $sPattern = "/(([0-9\.]+)\s*((px)|(rem))){1}/";
+
+        $aMatches = array();
+        if(!preg_match($sPattern, $sValue, $aMatches))
+            return $sValue;
+
+        if(!isset($aMatches[2]) || empty($aMatches[4]))
+            return $sValue;
+
+        if(!isset($aReductor[$aMatches[4]]))
+            return $sValue;
+
+        return ($aMatches[2] - $aReductor[$aMatches[4]]) . $aMatches[4];
+    }
+
     protected function _setMargin($sKey, $sDefault = '')
     {
         if(empty($sDefault))