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

Ticket #4980 - Studio: Layout changes.

AntonLV 3 месяцев назад
Родитель
Сommit
3414e8abf8

+ 6 - 4
studio/classes/BxDolStudioModule.php

@@ -189,10 +189,12 @@ class BxDolStudioModule extends BxTemplStudioWidget
 
         $aResult = array('code' => 0, 'message' => _t('_adm_scs_operation_done'));
         if($iWidgetId == 0) {
-            $aResult['content'] = BxDolStudioTemplate::getInstance()->parseHtmlByName('page_content_2_col.html', [
-                'page_menu_code' => $this->getPageMenu(),
-                'page_main_code' => $this->getPageCode()
-            ]);
+            $aResult['content'] = '';
+            if(!$this->_bShowHeaderBreadcrumb || (int)$aModule['enabled'] == 0)
+                $aResult['content'] = BxDolStudioTemplate::getInstance()->parseHtmlByName('page_content_2_col.html', [
+                    'page_menu_code' => $this->getPageMenu(),
+                    'page_main_code' => $this->getPageCode()
+                ]);
         }
         else
             $aResult['widget'] = BxTemplStudioFunctions::getInstance()->getWidget($iWidgetId);

+ 3 - 1
studio/classes/BxDolStudioPage.php

@@ -39,7 +39,8 @@ class BxDolStudioPage extends BxDol
 
     protected $iError;
     protected $sError;
-    
+
+    protected $_bShowHeaderBreadcrumb;
     protected $_bShowHeaderRightSearch;
     protected $_bShowHeaderRightSite;
     protected $_bShowHeaderRightAssistant;
@@ -74,6 +75,7 @@ class BxDolStudioPage extends BxDol
         $this->iError = 0;
         $this->sError = false;
 
+        $this->_bShowHeaderBreadcrumb = getParam('sys_std_show_header_left') == 'on';
         $this->_bShowHeaderRightSearch = getParam('sys_std_show_header_right_search') == 'on';
         $this->_bShowHeaderRightSite = getParam('sys_std_show_header_right_site') == 'on';
         $this->_bShowHeaderRightAssistant = $this->iPageAssistantId != 0;

+ 5 - 5
studio/js/module.js

@@ -56,11 +56,11 @@ BxDolStudioModule.prototype.activate = function(oCheckbox, sName, iWidgetId) {
                 return;
             }
 
-            var oContent = $('#bx-std-page-columns');
-            if(oData.content.length > 0)
-                oContent.bx_anim('hide', $this.sAnimationEffect, $this.iAnimationSpeed, function() {
-                    $(this).html(oData.content).bx_anim('show', $this.sAnimationEffect, 'fast');
-                });
+            $('#bx-std-page-columns').bx_anim('hide', $this.sAnimationEffect, $this.iAnimationSpeed, function() {
+                $(this).html(oData.content);
+                if(oData.content.length > 0)
+                    $(this).bxProcessHtml().bx_anim('show', $this.sAnimationEffect, 'fast');
+            });
         },
         'json'
     );

+ 1 - 1
studio/template/page_menu.html

@@ -1,6 +1,6 @@
 <bx_if:show_title>
     <div class="bx-std-pcm-title text-2xl font-bold" id="bx-std-pc-title">
-        <div class="bx-std-pcm-title-cnt flex justify-between px-2">
+        <div class="bx-std-pcm-title-cnt flex justify-between pl-2">
             <div>__title__</div>
             <bx_if:show_actions>
                 <div>

+ 3 - 3
studio/template/scripts/BxBaseStudioModule.php

@@ -62,15 +62,15 @@ class BxBaseStudioModule extends BxDolStudioModule
             'js_code' => $this->getPageJsCode()
         ));
     }
-/*
+
     function getPageAttributes()
     {
-        if((int)$this->aModule['enabled'] == 0)
+        if($this->_bShowHeaderBreadcrumb && (int)$this->aModule['enabled'] == 0)
             return 'style="display:none"';
 
         return parent::getPageAttributes();
     }
-*/
+
     function getPageMenu($aMenu = array(), $aMarkers = array())
     {
         $sJsObject = $this->getPageJsObject();

+ 1 - 1
studio/template/scripts/BxBaseStudioWidget.php

@@ -19,7 +19,7 @@ class BxBaseStudioWidget extends BxDolStudioWidget
     {
         parent::__construct($mixedPageName);
 
-        $this->bPageMenuTitle = getParam('sys_std_show_header_left') != 'on';
+        $this->bPageMenuTitle = !$this->_bShowHeaderBreadcrumb;
         $this->bPageMenuIconsInline = true;
 
         $this->aPageCodeNoWrap = [];