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

Ticket #3073 - Content page's layout.

AntonLV пре 5 година
родитељ
комит
dbdb76d9e6
28 измењених фајлова са 283 додато и 302 уклоњено
  1. 1 1
      modules/boonex/decorous/classes/BxDecorousStudioPage.php
  2. 1 1
      modules/boonex/lucid/classes/BxLucidStudioPage.php
  3. 1 1
      modules/boonex/protean/classes/BxProteanStudioPage.php
  4. 8 0
      studio/classes/BxDolStudioWidget.php
  5. 14 0
      studio/template/css/menu_top.css
  6. 3 1
      studio/template/images/icons/bc-arrow.svg
  7. 6 4
      studio/template/images/icons/bc-home.svg
  8. 1 1
      studio/template/page_breadcrumb.html
  9. 2 2
      studio/template/scripts/BxBaseStudioAudit.php
  10. 2 2
      studio/template/scripts/BxBaseStudioBadges.php
  11. 2 2
      studio/template/scripts/BxBaseStudioBuilderPage.php
  12. 7 7
      studio/template/scripts/BxBaseStudioDashboard.php
  13. 1 1
      studio/template/scripts/BxBaseStudioDesign.php
  14. 110 132
      studio/template/scripts/BxBaseStudioDesigner.php
  15. 2 2
      studio/template/scripts/BxBaseStudioForms.php
  16. 2 2
      studio/template/scripts/BxBaseStudioLauncher.php
  17. 2 1
      studio/template/scripts/BxBaseStudioMenu.php
  18. 0 34
      studio/template/scripts/BxBaseStudioModule.php
  19. 2 2
      studio/template/scripts/BxBaseStudioNavigation.php
  20. 1 1
      studio/template/scripts/BxBaseStudioPage.php
  21. 2 2
      studio/template/scripts/BxBaseStudioPermissions.php
  22. 73 90
      studio/template/scripts/BxBaseStudioPolyglot.php
  23. 2 2
      studio/template/scripts/BxBaseStudioRoles.php
  24. 2 2
      studio/template/scripts/BxBaseStudioSettings.php
  25. 2 2
      studio/template/scripts/BxBaseStudioStorages.php
  26. 2 2
      studio/template/scripts/BxBaseStudioStore.php
  27. 30 3
      studio/template/scripts/BxBaseStudioWidget.php
  28. 2 2
      studio/template/scripts/BxBaseStudioWidgets.php

+ 1 - 1
modules/boonex/decorous/classes/BxDecorousStudioPage.php

@@ -62,7 +62,7 @@ class BxDecorousStudioPage extends BxTemplStudioDesign
         $oTemplate->addCss(BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'codemirror/|codemirror.css');
 
         return BxDolStudioTemplate::getInstance()->parseHtmlByName('design.html', array(
-            'content' => $oPage->getPageCode(),
+            'content' => $oPage->getFormCode(),
             'js_content' => $this->getPageJsCode(array(
                 'sCodeMirror' => "textarea[name='" . $sPrefix . "_styles_custom']"
             ))

+ 1 - 1
modules/boonex/lucid/classes/BxLucidStudioPage.php

@@ -66,7 +66,7 @@ class BxLucidStudioPage extends BxTemplStudioDesign
         $oTemplate->addCss(BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'codemirror/|codemirror.css');
 
         return BxDolStudioTemplate::getInstance()->parseHtmlByName('design.html', array(
-            'content' => $oPage->getPageCode(),
+            'content' => $oPage->getFormCode(),
             'js_content' => $this->getPageJsCode(array(
                 'sCodeMirror' => "textarea[name='" . $sPrefix . "_styles_custom']"
             ))

+ 1 - 1
modules/boonex/protean/classes/BxProteanStudioPage.php

@@ -61,7 +61,7 @@ class BxProteanStudioPage extends BxTemplStudioDesign
         $oTemplate->addCss(BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'codemirror/|codemirror.css');
 
         return BxDolStudioTemplate::getInstance()->parseHtmlByName('design.html', array(
-            'content' => $oPage->getPageCode(),
+            'content' => $oPage->getFormCode(),
             'js_content' => $this->getPageJsCode(array(
                 'sCodeMirror' => "textarea[name='" . $sPrefix . "_styles_custom']"
             ))

+ 8 - 0
studio/classes/BxDolStudioWidget.php

@@ -7,14 +7,22 @@
  * @{
  */
 
+define('BX_DOL_STUDIO_WGT_TYPE_SETTINGS', 'settings');
+define('BX_DOL_STUDIO_WGT_TYPE_DEFAULT', BX_DOL_STUDIO_WGT_TYPE_SETTINGS);
+
 class BxDolStudioWidget extends BxTemplStudioPage
 {
+    protected $sPage;
+    protected $sPageDefault = BX_DOL_STUDIO_WGT_TYPE_DEFAULT;
+    
     protected $aActions;
 
     public function __construct($mixedPageName)
     {
         parent::__construct($mixedPageName);
 
+        $this->sPage = $this->sPageDefault;
+
         $this->aActions = array();
 
         if(!$this->bPageMultiple) {

+ 14 - 0
studio/template/css/menu_top.css

@@ -75,7 +75,21 @@ div.bx-std-menu-top-right {
     width: 100%;
     height: 100%;
 }
+.bx-menu-breadcrumb li.bx-menu-bc-item > a:hover span {
+    color: rgba(255, 255, 255, 0.85);
+}
+.bx-menu-breadcrumb li.bx-menu-bc-item > a img,
+.bx-menu-breadcrumb li.bx-menu-bc-item > a svg {
+    width: 1.625rem;
+    height: 1.625rem;
+}
+.bx-menu-breadcrumb li.bx-menu-bc-item:not(:last-child) > a svg g {
+    opacity: 0.7;
+}
 
+.bx-menu-breadcrumb li.bx-menu-bc-item:not(:last-child) > a:hover svg g {
+    opacity: 0.85;
+}
 
 /*--- Widgets (Center) ---*/
 div.bx-std-menu-top .bx-menu-floating-blocks li {

+ 3 - 1
studio/template/images/icons/bc-arrow.svg

@@ -1,3 +1,5 @@
 <svg width="24" height="22" viewBox="0 0 24 22" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M10 14.6667L14 11L10 7.33337" stroke="#595959" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
+<g opacity="0.3">
+<path d="M10 14.6667L14 11L10 7.33337" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
+</g>
 </svg>

+ 6 - 4
studio/template/images/icons/bc-home.svg

@@ -1,6 +1,8 @@
 <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M7.75 9.75H5C3.895 9.75 3 8.855 3 7.75V5C3 3.895 3.895 3 5 3H7.75C8.855 3 9.75 3.895 9.75 5V7.75C9.75 8.855 8.855 9.75 7.75 9.75Z" stroke="#FAFAFA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M19 9.75H16.25C15.145 9.75 14.25 8.855 14.25 7.75V5C14.25 3.895 15.145 3 16.25 3H19C20.105 3 21 3.895 21 5V7.75C21 8.855 20.105 9.75 19 9.75Z" stroke="#FAFAFA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M7.75 21H5C3.895 21 3 20.105 3 19V16.25C3 15.145 3.895 14.25 5 14.25H7.75C8.855 14.25 9.75 15.145 9.75 16.25V19C9.75 20.105 8.855 21 7.75 21Z" stroke="#FAFAFA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M19 21H16.25C15.145 21 14.25 20.105 14.25 19V16.25C14.25 15.145 15.145 14.25 16.25 14.25H19C20.105 14.25 21 15.145 21 16.25V19C21 20.105 20.105 21 19 21Z" stroke="#FAFAFA" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
+<g opacity="0.7">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M7.75 9.75H5C3.895 9.75 3 8.855 3 7.75V5C3 3.895 3.895 3 5 3H7.75C8.855 3 9.75 3.895 9.75 5V7.75C9.75 8.855 8.855 9.75 7.75 9.75Z" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M19 9.75H16.25C15.145 9.75 14.25 8.855 14.25 7.75V5C14.25 3.895 15.145 3 16.25 3H19C20.105 3 21 3.895 21 5V7.75C21 8.855 20.105 9.75 19 9.75Z" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M7.75 21H5C3.895 21 3 20.105 3 19V16.25C3 15.145 3.895 14.25 5 14.25H7.75C8.855 14.25 9.75 15.145 9.75 16.25V19C9.75 20.105 8.855 21 7.75 21Z" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M19 21H16.25C15.145 21 14.25 20.105 14.25 19V16.25C14.25 15.145 15.145 14.25 16.25 14.25H19C20.105 14.25 21 15.145 21 16.25V19C21 20.105 20.105 21 19 21Z" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
+</g>
 </svg>

+ 1 - 1
studio/template/page_breadcrumb.html

@@ -5,7 +5,7 @@
                 <img src="<bx_icon_url:bc-arrow.svg />" />
             </li>
             <li class="bx-menu-bc-item bx-menu-bc-__name__  __class_add__">
-                <a href="__link__" onclick="__onclick__" class="bx-def-margin-sec-left bx-def-font-contrasted" title="__title_attr__"__attrs__><bx_if:icon><i class="sys-icon __icon__ bx-def-round-corners bx-def-font-contrasted"></i></bx_if:icon><bx_if:image><img src="__icon_url__" /></bx_if:image><bx_if:title><span class="bx-def-padding-thd-left">__title__</span></bx_if:title></a>
+                <a href="__link__" onclick="__onclick__" class="bx-def-margin-sec-left bx-def-font-contrasted" title="__title_attr__"__attrs__><bx_if:icon><i class="sys-icon __icon__ bx-def-round-corners bx-def-font-contrasted"></i></bx_if:icon><bx_if:image><img src="__icon_url__" /></bx_if:image><bx_if:image_inline>__image__</bx_if:image_inline><bx_if:title><span class="bx-def-padding-thd-left">__title__</span></bx_if:title></a>
             </li>
         </bx_repeat:menu_items>
     </ul>

+ 2 - 2
studio/template/scripts/BxBaseStudioAudit.php

@@ -62,9 +62,9 @@ class BxBaseStudioAudit extends BxDolStudioAudit
         return parent::getPageMenu($aMenu);
     }
 
-    function getPageCode()
+    function getPageCode($sPage = '', $bWrap = true)
     {
-        $sResult = parent::getPageCode();
+        $sResult = parent::getPageCode($sPage, $bWrap);
         if($sResult === false)
             return false;
 

+ 2 - 2
studio/template/scripts/BxBaseStudioBadges.php

@@ -61,9 +61,9 @@ class BxBaseStudioBadges extends BxDolStudioBadges
         return parent::getPageMenu($aMenu);
     }
 
-    function getPageCode()
+    function getPageCode($sPage = '', $bWrap = true)
     {
-        $sResult = parent::getPageCode();
+        $sResult = parent::getPageCode($sPage, $bWrap);
         if($sResult === false)
             return false;
 

+ 2 - 2
studio/template/scripts/BxBaseStudioBuilderPage.php

@@ -152,9 +152,9 @@ class BxBaseStudioBuilderPage extends BxDolStudioBuilderPage
         return parent::getPageMenu($aMenu);
     }
 
-    function getPageCode()
+    function getPageCode($sPage = '', $bWrap = true)
     {
-        $sResult = parent::getPageCode();
+        $sResult = parent::getPageCode($sPage, $bWrap);
         if($sResult === false)
             return false;
 

+ 7 - 7
studio/template/scripts/BxBaseStudioDashboard.php

@@ -18,20 +18,20 @@ class BxBaseStudioDashboard extends BxDolStudioDashboard
     function getPageCss()
     {
         return array_merge(parent::getPageCss(), array(
-        	'page_layouts.css', 
-        	'dashboard.css',
+            'page_layouts.css', 
+            'dashboard.css',
         ));
     }
 
     function getPageJs()
     {
         return array_merge(parent::getPageJs(), array(
-        	'jquery.anim.js',
-        	'dashboard.js'
+            'jquery.anim.js',
+            'dashboard.js'
         ));
     }
 
-	function getPageJsClass()
+    function getPageJsClass()
     {
         return 'BxDolStudioDashboard';
     }
@@ -54,9 +54,9 @@ class BxBaseStudioDashboard extends BxDolStudioDashboard
         return $sContent;
     }
 
-    function getPageCode()
+    function getPageCode($sPage = '', $bWrap = true)
     {
-        $sResult = parent::getPageCode();
+        $sResult = parent::getPageCode($sPage, $bWrap);
         if($sResult === false)
             return false;
 

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

@@ -45,7 +45,7 @@ class BxBaseStudioDesign extends BxDolStudioDesign
         $oTemplate->addJs($oPage->getPageJs());
         $oTemplate->addCss($oPage->getPageCss());
     	return $oTemplate->parseHtmlByName('design.html', array(
-            'content' => $oPage->getPageCode(),
+            'content' => $oPage->getPageCode(BX_DOL_STUDIO_TEMPL_TYPE_LOGO, false),
             'js_content' => $this->getPageJsCode()
         ));
     }

+ 110 - 132
studio/template/scripts/BxBaseStudioDesigner.php

@@ -19,7 +19,7 @@ class BxBaseStudioDesigner extends BxDolStudioDesigner
     protected $sCoverFormId = 'adm-dsg-cover-form';
     protected $sCoverIframeId = 'adm-dsg-cover-iframe';
     protected $sCoverStorage = BX_DOL_STORAGE_OBJ_IMAGES;
-	protected $sCoverTranscoder = 'sys_cover_preview';
+    protected $sCoverTranscoder = 'sys_cover_preview';
 
     protected $sSplashFormId = 'adm-dsg-splash-form';
     protected $sSplashIframeId = 'adm-dsg-splash-iframe';
@@ -35,7 +35,7 @@ class BxBaseStudioDesigner extends BxDolStudioDesigner
     function __construct($sPage = '')
     {
         parent::__construct($sPage);
-
+                
         $this->aPageCss = array('forms.css', 'designer.css');
         $this->aPageJs = array('settings.js', 'designer.js');
     }
@@ -88,18 +88,6 @@ class BxBaseStudioDesigner extends BxDolStudioDesigner
 
         return parent::getPageMenu($aMenu);
     }
-    function getPageCode($bHidden = false)
-    {
-        $sResult = parent::getPageCode();
-        if($sResult === false)
-            return false;
-
-        $sMethod = 'get' . ucfirst($this->sPage);
-        if(!method_exists($this, $sMethod))
-            return '';
-
-        return $sResult . $this->$sMethod();
-    }
 
     protected function getGeneral()
     {
@@ -244,9 +232,7 @@ class BxBaseStudioDesigner extends BxDolStudioDesigner
         }
 
         return MsgBox(_t('_adm_dsg_txt_logo_redefinition')) . $oTemplate->parseHtmlByName('designer.html', array(
-            'content' => $this->getBlockCode(array(
-                'items' => $oTemplate->parseHtmlByName('dsr_logo.html', array('logo_iframe_id' => $this->sLogoIframeId, 'form' => $oForm->getCode())),
-            )),
+            'content' => $oTemplate->parseHtmlByName('dsr_logo.html', array('logo_iframe_id' => $this->sLogoIframeId, 'form' => $oForm->getCode())),
             'js_content' => $this->getPageJsCode()
         ));
     }
@@ -350,10 +336,8 @@ class BxBaseStudioDesigner extends BxDolStudioDesigner
         }
 
         return $oTemplate->parseHtmlByName('designer.html', array(
-            'content' => $this->getBlockCode(array(
-				'items' => $oTemplate->parseHtmlByName('dsr_icon.html', array('icon_iframe_id' => $this->sIconIframeId, 'form' => $oForm->getCode())),
-			)),
-			'js_content' => $this->getPageJsCode()
+            'content' => $oTemplate->parseHtmlByName('dsr_icon.html', array('icon_iframe_id' => $this->sIconIframeId, 'form' => $oForm->getCode())),
+            'js_content' => $this->getPageJsCode()
         ));
     }
 
@@ -374,45 +358,45 @@ class BxBaseStudioDesigner extends BxDolStudioDesigner
 
             $aFormInputs[$sCover] = array(
                 'type' => 'files',
-				'name' => $sCover,
-				'storage_object' => $this->sCoverStorage,
-				'images_transcoder' => $this->sCoverTranscoder,
-				'uploaders' => array('sys_std_crop_cover'),
-				'multiple' => false,
-				'content_id' => $aSetting['id'],
-				'ghost_template' => BxDolStudioTemplate::getInstance()->parseHtmlByName('uploader_fgt_cover.html', array(
-					'name' => $sCover,
-				)),
-				'caption' => _t('_adm_dsg_txt_upload_' . $sCover),
-				'db' => array (
+                    'name' => $sCover,
+                    'storage_object' => $this->sCoverStorage,
+                    'images_transcoder' => $this->sCoverTranscoder,
+                    'uploaders' => array('sys_std_crop_cover'),
+                    'multiple' => false,
+                    'content_id' => $aSetting['id'],
+                    'ghost_template' => BxDolStudioTemplate::getInstance()->parseHtmlByName('uploader_fgt_cover.html', array(
+                        'name' => $sCover,
+                    )),
+                    'caption' => _t('_adm_dsg_txt_upload_' . $sCover),
+                    'db' => array (
                     'pass' => 'Int',
                 )
             );
 
-        	if(($iImageId = (int)getParam($aCover['setting'])) == 0)
-        		continue;
+            if(($iImageId = (int)getParam($aCover['setting'])) == 0)
+                continue;
 
-			$sImageUrl = BxDolTranscoderImage::getObjectInstance($aCover['transcoder'])->getFileUrl($iImageId);
+            $sImageUrl = BxDolTranscoderImage::getObjectInstance($aCover['transcoder'])->getFileUrl($iImageId);
             if($sImageUrl === false) {
             	setParam($aCover['setting'], 0);
                 continue;
-			}
-
-			$aTmplVarsCovers[] = array(
-			    'image_id' => $iImageId,
-			    'content' => $oTemplate->parseHtmlByName($aCover['template'], array(
-			        'js_object' => $sJsObject,
-    				'type' => $sCover,
-    				'caption' => _t($aCover['title']),
-    				'image_id' => $iImageId,
-                    'bx_if:show_bg' => array(
-    					'condition' => !empty($sImageUrl),
-    					'content' => array(
-    						'image_url' => $sImageUrl
-    					)
-    				),
+            }
+
+            $aTmplVarsCovers[] = array(
+                'image_id' => $iImageId,
+                'content' => $oTemplate->parseHtmlByName($aCover['template'], array(
+                    'js_object' => $sJsObject,
+                    'type' => $sCover,
+                    'caption' => _t($aCover['title']),
+                    'image_id' => $iImageId,
+                        'bx_if:show_bg' => array(
+                            'condition' => !empty($sImageUrl),
+                            'content' => array(
+                                'image_url' => $sImageUrl
+                            )
+                    ),
                 ))
-			);
+            );
         }
 
         $aForm = array(
@@ -443,8 +427,8 @@ class BxBaseStudioDesigner extends BxDolStudioDesigner
                     'type' => 'custom',
                     'name' => 'preview',
                     'content' => $oTemplate->parseHtmlByName('dsr_cover_preview.html', array(
-                		'bx_repeat:covers' => $aTmplVarsCovers
-                	))
+                        'bx_repeat:covers' => $aTmplVarsCovers
+                    ))
                 ),
 
                 'save' => array(
@@ -467,10 +451,8 @@ class BxBaseStudioDesigner extends BxDolStudioDesigner
 
         $this->aPageCss[] = 'cover.css';
         return $oTemplate->parseHtmlByName('designer.html', array(
-            'content' => $this->getBlockCode(array(
-				'items' => $oTemplate->parseHtmlByName('dsr_cover.html', array('iframe_id' => $this->sCoverIframeId, 'form' => $oForm->getCode())),
-			)),
-			'js_content' => $this->getPageJsCode()
+            'content' => $oTemplate->parseHtmlByName('dsr_cover.html', array('iframe_id' => $this->sCoverIframeId, 'form' => $oForm->getCode())),
+            'js_content' => $this->getPageJsCode()
         ));
     }
 
@@ -478,77 +460,75 @@ class BxBaseStudioDesigner extends BxDolStudioDesigner
     {
     	$oTemplate = BxDolStudioTemplate::getInstance();
 
-		$aForm = array(
-			'form_attrs' => array(
-				'id' => $this->sSplashFormId,
-				'name' => $this->sSplashFormId,
-				'action' => BX_DOL_URL_STUDIO . 'designer.php',
-				'method' => 'post',
-				'enctype' => 'multipart/form-data',
-				'target' => $this->sSplashIframeId
-			),
-			'params' => array(
-				'db' => array(
-					'table' => '',
-					'key' => '',
-					'uri' => '',
-					'uri_title' => '',
-					'submit_name' => 'save'
-				),
-			),
-			'inputs' => array(
-				'page' => array(
-					'type' => 'hidden',
-					'name' => 'page',
-					'value' => $this->sPage
-				),
-				'enabled' => array(
-					'type' => 'checkbox',
-					'name' => 'enabled',
-					'caption' => _t('_adm_dsg_txt_splash_enabled'),
-					'value' => 'on',
-					'checked' => getParam('sys_site_splash_enabled') == 'on',
-					'db' => array (
+        $aForm = array(
+            'form_attrs' => array(
+                'id' => $this->sSplashFormId,
+                'name' => $this->sSplashFormId,
+                'action' => BX_DOL_URL_STUDIO . 'designer.php',
+                'method' => 'post',
+                'enctype' => 'multipart/form-data',
+                'target' => $this->sSplashIframeId
+            ),
+            'params' => array(
+                'db' => array(
+                    'table' => '',
+                    'key' => '',
+                    'uri' => '',
+                    'uri_title' => '',
+                    'submit_name' => 'save'
+                ),
+            ),
+            'inputs' => array(
+                'page' => array(
+                    'type' => 'hidden',
+                    'name' => 'page',
+                    'value' => $this->sPage
+                ),
+                'enabled' => array(
+                    'type' => 'checkbox',
+                    'name' => 'enabled',
+                    'caption' => _t('_adm_dsg_txt_splash_enabled'),
+                    'value' => 'on',
+                    'checked' => getParam('sys_site_splash_enabled') == 'on',
+                    'db' => array (
                         'pass' => 'Xss',
                     ),
-				),
-				'code' => array(
+                ),
+                'code' => array(
                     'type' => 'textarea',
                     'code' => true,
                     'name' => 'code',
-					'caption' => '',
-					'value' => getParam('sys_site_splash_code'),
-				),
-				'save' => array(
-					'type' => 'submit',
-					'name' => 'save',
-					'value' => _t('_adm_btn_designer_submit'),
-				)
-			)
-		);
-
-		$oForm = new BxTemplStudioFormView($aForm, $oTemplate);
-		$oForm->initChecker();
-
-		if($oForm->isSubmittedAndValid()) {
-			echo $this->submitSplash($oForm);
-			exit;
-		}
-		
-		$oTemplate->addJs(array('codemirror/codemirror.min.js'));
+                    'caption' => '',
+                    'value' => getParam('sys_site_splash_code'),
+                ),
+                'save' => array(
+                    'type' => 'submit',
+                    'name' => 'save',
+                    'value' => _t('_adm_btn_designer_submit'),
+                )
+            )
+        );
+
+        $oForm = new BxTemplStudioFormView($aForm, $oTemplate);
+        $oForm->initChecker();
+
+        if($oForm->isSubmittedAndValid()) {
+            echo $this->submitSplash($oForm);
+            exit;
+        }
+
+        $oTemplate->addJs(array('codemirror/codemirror.min.js'));
         $oTemplate->addCss(BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'codemirror/|codemirror.css');
-		return $oTemplate->parseHtmlByName('designer.html', array(
-			'content' => $this->getBlockCode(array(
-				'items' => $oTemplate->parseHtmlByName('dsr_splash.html', array(
-					'warning' => MsgBox(_t('_adm_dsg_dsc_splash_warning')),
-					'splash_iframe_id' => $this->sSplashIframeId, 
-					'form' => $oForm->getCode()
-				)),
-			)),
-			'js_content' => $this->getPageJsCode(array(
-				'sCodeMirror' => 'textarea[name=code]'
-			)),
-		));
+        return $oTemplate->parseHtmlByName('designer.html', array(
+            'content' => $oTemplate->parseHtmlByName('dsr_splash.html', array(
+                'warning' => MsgBox(_t('_adm_dsg_dsc_splash_warning')),
+                'splash_iframe_id' => $this->sSplashIframeId, 
+                'form' => $oForm->getCode()
+            )),
+            'js_content' => $this->getPageJsCode(array(
+                'sCodeMirror' => 'textarea[name=code]'
+            )),
+        ));
     }
 
     protected function getInjections()
@@ -575,9 +555,9 @@ class BxBaseStudioDesigner extends BxDolStudioDesigner
             ),
             'inputs' => array(
                 'page' => array(
-                        'type' => 'hidden',
-                        'name' => 'page',
-                        'value' => $this->sPage
+                    'type' => 'hidden',
+                    'name' => 'page',
+                    'value' => $this->sPage
                 ),
                 'sys_head' => array(
                     'type' => 'textarea',
@@ -615,15 +595,13 @@ class BxBaseStudioDesigner extends BxDolStudioDesigner
         $oTemplate->addCss(BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'codemirror/|codemirror.css');
 
         return $oTemplate->parseHtmlByName('designer.html', array(
-            'content' => $this->getBlockCode(array(
-                'items' => $oTemplate->parseHtmlByName('dsr_injections.html', array(
-                    'warning' => '',
-                    'splash_iframe_id' => $this->sInjectionsIframeId, 
-                    'form' => $oForm->getCode()
-                )),
+            'content' => $oTemplate->parseHtmlByName('dsr_injections.html', array(
+                'warning' => '',
+                'splash_iframe_id' => $this->sInjectionsIframeId, 
+                'form' => $oForm->getCode()
             )),
             'js_content' => $this->getPageJsCode(array(
-                    'sCodeMirror' => 'textarea[name=sys_head],textarea[name=sys_body]'
+                'sCodeMirror' => 'textarea[name=sys_head],textarea[name=sys_body]'
             ))
         ));
     }

+ 2 - 2
studio/template/scripts/BxBaseStudioForms.php

@@ -77,9 +77,9 @@ class BxBaseStudioForms extends BxDolStudioForms
         return parent::getPageMenu($aMenu);
     }
 
-    function getPageCode()
+    function getPageCode($sPage = '', $bWrap = true)
     {
-        $sResult = parent::getPageCode();
+        $sResult = parent::getPageCode($sPage, $bWrap);
         if($sResult === false)
             return false;
 

+ 2 - 2
studio/template/scripts/BxBaseStudioLauncher.php

@@ -72,9 +72,9 @@ class BxBaseStudioLauncher extends BxDolStudioLauncher
         )), $bWrap);
     }
 
-    public function getPageCode()
+    public function getPageCode($sPage = '', $bWrap = true)
     {
-        $sResult = parent::getPageCode();
+        $sResult = parent::getPageCode($sPage, $bWrap);
         if($sResult === false)
             return false;
 

+ 2 - 1
studio/template/scripts/BxBaseStudioMenu.php

@@ -19,7 +19,8 @@ class BxBaseStudioMenu extends BxDolStudioMenu
         $this->_bInlineIcons = in_array($this->_aObject['template'], array(
             'menu_side.html', 
             'menu_top_toolbar.html', 
-            'menu_launcher_browser.html'
+            'menu_launcher_browser.html',
+            'page_breadcrumb.html'
         ));
     }
     

+ 0 - 34
studio/template/scripts/BxBaseStudioModule.php

@@ -16,8 +16,6 @@ class BxBaseStudioModule extends BxDolStudioModule
         BX_DOL_STUDIO_MOD_TYPE_SETTINGS => array('name' => BX_DOL_STUDIO_MOD_TYPE_SETTINGS, 'icon' => 'cogs', 'title' => '_adm_lmi_cpt_settings')
     );
 
-    protected $aPageCodeNoWrap;
-
     protected $sTmplNamePopupSettings;
     protected $sTmplNamePopupConfirmUninstall;
 
@@ -27,8 +25,6 @@ class BxBaseStudioModule extends BxDolStudioModule
 
         $this->oHelper = BxTemplStudioModules::getInstance();
 
-        $this->aPageCodeNoWrap = array();
-
         $this->sTmplNamePopupSettings = 'mod_popup_settings.html';
         $this->sTmplNamePopupConfirmUninstall = 'mod_popup_confirm_uninstall.html';
     }
@@ -92,36 +88,6 @@ class BxBaseStudioModule extends BxDolStudioModule
         return parent::getPageMenu($aMenu);
     }
 
-    function getPageCode()
-    {
-        $sResult = parent::getPageCode();
-        if($sResult === false)
-            return false;
-
-        $sMethod = 'get' . ucfirst($this->sPage);
-        if(!method_exists($this, $sMethod))
-            return '';
-
-        $mixedContent = $this->$sMethod();
-        if(in_array($this->sPage, $this->aPageCodeNoWrap))
-            return $mixedContent;
-
-        $sContent = '';
-        if(is_string($mixedContent))
-            $sContent = $this->getBlockCode(array(
-                'content' => $mixedContent
-            ));
-        else if(is_array($mixedContent))
-            foreach($mixedContent as $sBlock)
-                $sContent .= $this->getBlockCode(array(
-                    'content' => $sBlock
-                ));
-        else if(is_a($mixedContent, 'BxDolPage'))
-            $sContent = $mixedContent->getCode();
-
-        return $sResult . $sContent;
-    }
-
     protected function getSettings()
     {
         $oPage = new BxTemplStudioSettings($this->sModule);

+ 2 - 2
studio/template/scripts/BxBaseStudioNavigation.php

@@ -58,9 +58,9 @@ class BxBaseStudioNavigation extends BxDolStudioNavigation
 
         return parent::getPageMenu($aMenu);
     }
-    function getPageCode()
+    function getPageCode($sPage = '', $bWrap = true)
     {
-        $sResult = parent::getPageCode();
+        $sResult = parent::getPageCode($sPage, $bWrap);
         if($sResult === false)
             return false;
 

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

@@ -140,7 +140,7 @@ class BxBaseStudioPage extends BxDolStudioPage
         return $oMenu->getCode();
     }
 
-    public function getPageCode() {
+    public function getPageCode($sPage = '', $bWrap = true) {
         if(empty($this->aPage) || !is_array($this->aPage)) {
             $this->setError('_sys_txt_not_found');
             return false;

+ 2 - 2
studio/template/scripts/BxBaseStudioPermissions.php

@@ -51,9 +51,9 @@ class BxBaseStudioPermissions extends BxDolStudioPermissions
 
         return parent::getPageMenu($aMenu);
     }
-    function getPageCode()
+    function getPageCode($sPage = '', $bWrap = true)
     {
-        $sResult = parent::getPageCode();
+        $sResult = parent::getPageCode($sPage, $bWrap);
         if($sResult === false)
             return false;
 

+ 73 - 90
studio/template/scripts/BxBaseStudioPolyglot.php

@@ -20,17 +20,17 @@ class BxBaseStudioPolyglot extends BxDolStudioPolyglot
 
         $this->sSubpageUrl = BX_DOL_URL_STUDIO . 'polyglot.php?page=';
 
-		$this->aMenuItems = array(
-	        BX_DOL_STUDIO_PGT_TYPE_SETTINGS => array('icon' => 'cogs'),
-	        BX_DOL_STUDIO_PGT_TYPE_KEYS => array('icon' => 'key'),
-	        BX_DOL_STUDIO_PGT_TYPE_ETEMPLATES => array('icon' => 'far envelope'),
-	        BX_DOL_STUDIO_PGT_TYPE_ETEMPLATES_HF => array('icon' => 'far sticky-note')
-	    );
-
-		$this->aGridObjects = array(
-        	'keys' => 'sys_studio_lang_keys',
-        	'etemplates' => 'sys_studio_lang_etemplates',
-    );
+        $this->aMenuItems = array(
+            BX_DOL_STUDIO_PGT_TYPE_SETTINGS => array('icon' => 'cogs'),
+            BX_DOL_STUDIO_PGT_TYPE_KEYS => array('icon' => 'key'),
+            BX_DOL_STUDIO_PGT_TYPE_ETEMPLATES => array('icon' => 'far envelope'),
+            BX_DOL_STUDIO_PGT_TYPE_ETEMPLATES_HF => array('icon' => 'far sticky-note')
+        );
+
+        $this->aGridObjects = array(
+            'keys' => 'sys_studio_lang_keys',
+            'etemplates' => 'sys_studio_lang_etemplates',
+        );
     }
     function getPageCss()
     {
@@ -73,19 +73,6 @@ class BxBaseStudioPolyglot extends BxDolStudioPolyglot
         return parent::getPageMenu($aMenu);
     }
 
-    function getPageCode()
-    {
-        $sResult = parent::getPageCode();
-        if($sResult === false)
-            return false;
-
-        $sMethod = 'get' . bx_gen_method_name($this->sPage);
-        if(!method_exists($this, $sMethod))
-            return '';
-
-        return $sResult . $this->$sMethod();
-    }
-
     protected function getSettings()
     {
         $oPage = new BxTemplStudioSettings(BX_DOL_STUDIO_STG_TYPE_DEFAULT, BX_DOL_STUDIO_STG_CATEGORY_LANGUAGES);
@@ -113,83 +100,81 @@ class BxBaseStudioPolyglot extends BxDolStudioPolyglot
         $sFormId = 'adm-dsg-et-hf-form';
         $sIFrameId = 'adm-dsg-et-hf-iframe';
 
-		$aForm = array(
-			'form_attrs' => array(
-				'id' => $sFormId,
-				'name' => $sFormId,
-				'action' => BX_DOL_URL_STUDIO . 'polyglot.php',
-				'method' => 'post',
-				'enctype' => 'multipart/form-data',
-				'target' => $sIFrameId
-			),
-			'params' => array(
-				'db' => array(
-					'table' => '',
-					'key' => '',
-					'uri' => '',
-					'uri_title' => '',
-					'submit_name' => 'save'
-				),
-			),
-			'inputs' => array(
-				'page' => array(
-					'type' => 'hidden',
-					'name' => 'page',
-					'value' => $this->sPage
-				),
-				'et_hf_header' => array(
+        $aForm = array(
+            'form_attrs' => array(
+                'id' => $sFormId,
+                'name' => $sFormId,
+                'action' => BX_DOL_URL_STUDIO . 'polyglot.php',
+                'method' => 'post',
+                'enctype' => 'multipart/form-data',
+                'target' => $sIFrameId
+            ),
+            'params' => array(
+                'db' => array(
+                    'table' => '',
+                    'key' => '',
+                    'uri' => '',
+                    'uri_title' => '',
+                    'submit_name' => 'save'
+                ),
+            ),
+            'inputs' => array(
+                'page' => array(
+                    'type' => 'hidden',
+                    'name' => 'page',
+                    'value' => $this->sPage
+                ),
+                'et_hf_header' => array(
                     'type' => 'textarea',
                     'code' => true,
                     'name' => 'et_hf_header',
-					'caption' => _t('_adm_stg_cpt_option_site_email_html_template_header'),
-					'info' => _t('_adm_pgt_txt_et_hf_inf'),
-					'value' => getParam('site_email_html_template_header'),
-					'db' => array (
+                    'caption' => _t('_adm_stg_cpt_option_site_email_html_template_header'),
+                    'info' => _t('_adm_pgt_txt_et_hf_inf'),
+                    'value' => getParam('site_email_html_template_header'),
+                    'db' => array (
                         'pass' => 'Xss',
                     ),
-				),
-				'et_hf_footer' => array(
+                ),
+                'et_hf_footer' => array(
                     'type' => 'textarea',
                     'code' => true,
                     'name' => 'et_hf_footer',
-					'caption' => _t('_adm_stg_cpt_option_site_email_html_template_footer'),
-					'info' => _t('_adm_pgt_txt_et_hf_inf'),
-					'value' => getParam('site_email_html_template_footer'),
-					'db' => array (
+                    'caption' => _t('_adm_stg_cpt_option_site_email_html_template_footer'),
+                    'info' => _t('_adm_pgt_txt_et_hf_inf'),
+                    'value' => getParam('site_email_html_template_footer'),
+                    'db' => array (
                         'pass' => 'Xss',
                     ),
-				),
-				'save' => array(
-					'type' => 'submit',
-					'name' => 'save',
-					'value' => _t('_adm_pgt_btn_et_hf_submit'),
-				)
-			)
-		);
-
-		$oForm = new BxTemplStudioFormView($aForm, $oTemplate);
-		$oForm->initChecker();
-
-		if($oForm->isSubmittedAndValid()) {
-			echo $this->submitEtemplatesHf($oForm);
-			exit;
-		}
+                ),
+                'save' => array(
+                    'type' => 'submit',
+                    'name' => 'save',
+                    'value' => _t('_adm_pgt_btn_et_hf_submit'),
+                )
+            )
+        );
+
+        $oForm = new BxTemplStudioFormView($aForm, $oTemplate);
+        $oForm->initChecker();
+
+        if($oForm->isSubmittedAndValid()) {
+            echo $this->submitEtemplatesHf($oForm);
+            exit;
+        }
 
         $oTemplate->addJs(array('codemirror/codemirror.min.js'));
         $oTemplate->addCss(BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'codemirror/|codemirror.css');
 
-		return $oTemplate->parseHtmlByName('polyglot.html', array(
-			'content' => $this->getBlockCode(array(
-				'items' => $oTemplate->parseHtmlByName('pgt_etemplates_hf.html', array(
-					'warning' => '',
-					'iframe_id' => $sIFrameId, 
-					'form' => $oForm->getCode()
-				)),
-			)),
-			'js_content' => $this->getPageJsCode(array(
-				'sCodeMirror' => 'textarea[name=et_hf_header],textarea[name=et_hf_footer]'
-			))
-		));
+        return $oTemplate->parseHtmlByName('polyglot.html', array(
+            'content' => $oTemplate->parseHtmlByName('pgt_etemplates_hf.html', array(
+                'warning' => '',
+                'iframe_id' => $sIFrameId, 
+                'form' => $oForm->getCode()
+            )),
+            'js_content' => $this->getPageJsCode(array(
+                'sCodeMirror' => 'textarea[name=et_hf_header],textarea[name=et_hf_footer]'
+            ))
+        ));
     }
 
     protected function getGrid($sObjectName)
@@ -199,9 +184,7 @@ class BxBaseStudioPolyglot extends BxDolStudioPolyglot
             return '';
 
         return BxDolStudioTemplate::getInstance()->parseHtmlByName('polyglot.html', array(
-            'content' => $this->getBlockCode(array(
-				'items' => $oGrid->getCode()
-			)),
+            'content' => $oGrid->getCode(),
             'js_content' => ''
         ));
     }

+ 2 - 2
studio/template/scripts/BxBaseStudioRoles.php

@@ -51,9 +51,9 @@ class BxBaseStudioRoles extends BxDolStudioRoles
 
         return parent::getPageMenu($aMenu);
     }
-    function getPageCode()
+    function getPageCode($sPage = '', $bWrap = true)
     {
-        $sResult = parent::getPageCode();
+        $sResult = parent::getPageCode($sPage, $bWrap);
         if($sResult === false)
             return false;
 

+ 2 - 2
studio/template/scripts/BxBaseStudioSettings.php

@@ -52,9 +52,9 @@ class BxBaseStudioSettings extends BxDolStudioSettings
         return parent::getPageMenu($aMenu);
     }
 
-    public function getPageCode($sCategorySelected = '')
+    public function getPageCode($sPage = '', $bWrap = true)
     {
-        $sResult = parent::getPageCode();
+        $sResult = parent::getPageCode($sPage, $bWrap);
         if($sResult === false)
             return false;
 

+ 2 - 2
studio/template/scripts/BxBaseStudioStorages.php

@@ -55,9 +55,9 @@ class BxBaseStudioStorages extends BxDolStudioStorages
         return parent::getPageMenu($aMenu);
     }
 
-    function getPageCode()
+    function getPageCode($sPage = '', $bWrap = true)
     {
-        $sResult = parent::getPageCode();
+        $sResult = parent::getPageCode($sPage, $bWrap);
         if($sResult === false)
             return false;
 

+ 2 - 2
studio/template/scripts/BxBaseStudioStore.php

@@ -75,9 +75,9 @@ class BxBaseStudioStore extends BxDolStudioStore
         return parent::getPageMenu($aMenu, $aMarkers);
     }
 
-    function getPageCode()
+    function getPageCode($sPage = '', $bWrap = true)
     {
-        $sResult = parent::getPageCode();
+        $sResult = parent::getPageCode($sPage, $bWrap);
         if($sResult === false)
             return false;
 

+ 30 - 3
studio/template/scripts/BxBaseStudioWidget.php

@@ -9,10 +9,14 @@
  */
 
 class BxBaseStudioWidget extends BxDolStudioWidget
-{
+{    
+    protected $aPageCodeNoWrap;
+
     public function __construct($mixedPageName)
     {
         parent::__construct($mixedPageName);
+
+        $this->aPageCodeNoWrap = array();
     }
 
     public function getPageCss()
@@ -96,9 +100,9 @@ class BxBaseStudioWidget extends BxDolStudioWidget
         return '';
     }
 
-    public function getPageCode()
+    public function getPageCode($sPage = '', $bWrap = true)
     {
-        $sResult = parent::getPageCode();
+        $sResult = parent::getPageCode($sPage, $bWrap);
         if($sResult === false)
             return false;
 
@@ -107,6 +111,29 @@ class BxBaseStudioWidget extends BxDolStudioWidget
             return false;
         }
 
+        if(empty($sPage))
+            $sPage = $this->sPage;
+
+        $sMethod = 'get' . bx_gen_method_name($sPage);
+        if(!method_exists($this, $sMethod))
+            return '';
+
+        $mixedContent = $this->$sMethod();
+        if(!$bWrap || in_array($sPage, $this->aPageCodeNoWrap))
+            return $mixedContent;
+
+        if(is_string($mixedContent))
+            $sResult .= $this->getBlockCode(array(
+                'content' => $mixedContent
+            ));
+        else if(is_array($mixedContent))
+            foreach($mixedContent as $sBlock)
+                $sResult .= $this->getBlockCode(array(
+                    'content' => $sBlock
+                ));
+        else if(is_a($mixedContent, 'BxDolPage'))
+            $sResult .= $mixedContent->getCode();
+
         return $sResult . BxTemplStudioLauncher::getInstance()->getPageJsCode(array(
             'bInit' => false
         ));

+ 2 - 2
studio/template/scripts/BxBaseStudioWidgets.php

@@ -43,9 +43,9 @@ class BxBaseStudioWidgets extends BxDolStudioWidgets
         return parent::getPageMenu($aMenuItems);
     }
 
-    public function getPageCode()
+    public function getPageCode($sPage = '', $bWrap = true)
     {
-        $sResult = parent::getPageCode();
+        $sResult = parent::getPageCode($sPage, $bWrap);
         if($sResult === false)
             return false;