AntonLV 11 лет назад
Родитель
Сommit
adab8f621c

+ 1 - 1
modules/boonex/developer/classes/BxDevBuilderPage.php

@@ -30,7 +30,7 @@ class BxDevBuilderPage extends BxTemplStudioBuilderPage
         $this->oModule->_oTemplate->addStudioCss(array('builder_page.css'));
     }
 
-    function getBlockPanelTop($aParams = array())
+    function getBlockPanelTop($aBlock)
     {
          return BxBaseStudioPage::getBlockPanelTop(
             array('panel_top' => $this->oModule->_oTemplate->parseHtmlByName('bp_block_panel_top.html', $this->_getTmplVarsBlockPanelTop()))

+ 1 - 1
studio/template/builder_page.html

@@ -1,4 +1,4 @@
-<bx_include_auto:page_blocks.html />
+__content__
 <script defer type="text/javascript">
 	var __js_object__ = new BxDolStudioBuilderPage({
 	    sActionUrl: '__action_url__',

+ 1 - 1
studio/template/design.html

@@ -1 +1 @@
-<bx_include_auto:page_blocks.html />
+__content__

+ 1 - 1
studio/template/designer.html

@@ -1,4 +1,4 @@
-<bx_include_auto:page_blocks.html />
+__content__
 <script defer type="text/javascript">
 	var __js_object__ = new BxDolStudioDesigner({
 	    sActionUrl: '<bx_url_studio />designer.php',

+ 1 - 1
studio/template/forms.html

@@ -1 +1 @@
-<bx_include_auto:page_blocks.html />
+__content__

+ 1 - 1
studio/template/language.html

@@ -1 +1 @@
-<bx_include_auto:page_blocks.html />
+__content__

+ 1 - 1
studio/template/module.html

@@ -1 +1 @@
-<bx_include_auto:page_blocks.html />
+__content__

+ 1 - 1
studio/template/navigation.html

@@ -1 +1 @@
-<bx_include_auto:page_blocks.html />
+__content__

+ 0 - 3
studio/template/page_blocks.html

@@ -1,3 +0,0 @@
-<bx_repeat:blocks>
-    <bx_include_auto:page_block.html />
-</bx_repeat:blocks>

+ 1 - 1
studio/template/permissions.html

@@ -1,4 +1,4 @@
-<bx_include_auto:page_blocks.html />
+__content__
 <script defer type="text/javascript">
 	var __js_object__ = new BxDolStudioPermissions({
 	    sActionUrl: '<bx_url_studio />permissions.php'

+ 1 - 1
studio/template/polyglot.html

@@ -1 +1 @@
-<bx_include_auto:page_blocks.html />
+__content__

+ 5 - 12
studio/template/scripts/BxBaseStudioBuilderPage.php

@@ -194,14 +194,9 @@ class BxBaseStudioBuilderPage extends BxDolStudioBuilderPage
             'page' => $this->sPage,
             'html_ids' => json_encode($this->aHtmlIds),
             'languahes' => json_encode($aLanguages),
-            'bx_repeat:blocks' => array(
-                array(
-                    'caption' => '',
-                    'panel_top' => $this->getBlockPanelTop(),
-                    'items' => $sContent,
-                    'panel_bottom' => ''
-                )
-            )
+            'content' => $this->getBlockCode(array(
+				'items' => $sContent
+			))
         );
 
         $oTemplate->addJsTranslation(array(
@@ -211,12 +206,10 @@ class BxBaseStudioBuilderPage extends BxDolStudioBuilderPage
         return $oTemplate->parseHtmlByName('builder_page.html', $aTmplVars);
     }
 
-    function getBlockPanelTop($aParams = array())
+    function getBlockPanelTop($aBlock)
     {
-        $oTemplate = BxDolStudioTemplate::getInstance();
-
         return parent::getBlockPanelTop(
-            array('panel_top' => $oTemplate->parseHtmlByName('bp_block_panel_top.html', $this->_getTmplVarsBlockPanelTop()))
+            array('panel_top' => BxDolStudioTemplate::getInstance()->parseHtmlByName('bp_block_panel_top.html', $this->_getTmplVarsBlockPanelTop()))
         );
     }
 

+ 3 - 4
studio/template/scripts/BxBaseStudioDesign.php

@@ -79,10 +79,9 @@ class BxBaseStudioDesign extends BxDolStudioDesign
     {
         $oPage = new BxTemplStudioSettings($this->sTemplate);
 
-        $aTmplVars = array(
-            'bx_repeat:blocks' => $oPage->getPageCode(),
-        );
-        return BxDolStudioTemplate::getInstance()->parseHtmlByName('design.html', $aTmplVars);
+        return BxDolStudioTemplate::getInstance()->parseHtmlByName('design.html', array(
+            'content' => $oPage->getPageCode()
+        ));
     }
 }
 

+ 16 - 34
studio/template/scripts/BxBaseStudioDesigner.php

@@ -109,12 +109,10 @@ class BxBaseStudioDesigner extends BxDolStudioDesigner
             'bx_repeat:templates' => $aTmplVarsTemplates,
         ));
 
-        $aTmplVars = array(
+        return $oTemplate->parseHtmlByName('designer.html', array(
             'js_object' => $this->getPageJsObject(),
-            'bx_repeat:blocks' => $sContent,
-        );
-
-        return $oTemplate->parseHtmlByName('designer.html', $aTmplVars);
+            'content' => $sContent,
+        ));
     }
 
     protected function getLogo()
@@ -206,19 +204,12 @@ class BxBaseStudioDesigner extends BxDolStudioDesigner
             exit;
         }
 
-        $aTmplVars = array(
+        return $oTemplate->parseHtmlByName('designer.html', array(
             'js_object' => $this->getPageJsObject(),
-            'bx_repeat:blocks' => array(
-                array(
-                    'caption' => '',
-                    'panel_top' => '',
-                    'items' => $oTemplate->parseHtmlByName('dsr_logo.html', array('logo_iframe_id' => $this->sLogoIframeId, 'form' => $oForm->getCode())),
-                    'panel_bottom' => ''
-                )
-            )
-        );
-
-        return $oTemplate->parseHtmlByName('designer.html', $aTmplVars);
+            'content' => $this->getBlockCode(array(
+				'items' => $oTemplate->parseHtmlByName('dsr_logo.html', array('logo_iframe_id' => $this->sLogoIframeId, 'form' => $oForm->getCode())),
+			))
+        ));
     }
 
     protected function getIcon()
@@ -303,31 +294,22 @@ class BxBaseStudioDesigner extends BxDolStudioDesigner
             exit;
         }
 
-        $aTmplVars = array(
+        return $oTemplate->parseHtmlByName('designer.html', array(
             'js_object' => $this->getPageJsObject(),
-            'bx_repeat:blocks' => array(
-                array(
-                    'caption' => '',
-                    'panel_top' => '',
-                    'items' => $oTemplate->parseHtmlByName('dsr_icon.html', array('icon_iframe_id' => $this->sIconIframeId, 'form' => $oForm->getCode())),
-                    'panel_bottom' => ''
-                )
-            )
-        );
-
-        return $oTemplate->parseHtmlByName('designer.html', $aTmplVars);
+            'content' => $this->getBlockCode(array(
+				'items' => $oTemplate->parseHtmlByName('dsr_icon.html', array('icon_iframe_id' => $this->sIconIframeId, 'form' => $oForm->getCode())),
+			))
+        ));
     }
 
     protected function getSettings()
     {
         $oPage = new BxTemplStudioSettings(BX_DOL_STUDIO_STG_TYPE_SYSTEM, BX_DOL_STUDIO_STG_CATEGORY_TEMPLATES);
 
-        $aTmplVars = array(
+        return BxDolStudioTemplate::getInstance()->parseHtmlByName('designer.html', array(
             'js_object' => $this->getPageJsObject(),
-            'bx_repeat:blocks' => $oPage->getPageCode(),
-        );
-
-        return BxDolStudioTemplate::getInstance()->parseHtmlByName('designer.html', $aTmplVars);
+            'content' => $oPage->getPageCode()
+        ));
     }
 }
 

+ 5 - 12
studio/template/scripts/BxBaseStudioForms.php

@@ -158,19 +158,12 @@ class BxBaseStudioForms extends BxDolStudioForms
         if(!$oGrid)
             return '';
 
-        $aTmplVars = array(
+        return BxDolStudioTemplate::getInstance()->parseHtmlByName('forms.html', array(
             'js_object' => $this->getPageJsObject(),
-            'bx_repeat:blocks' => array(
-                array(
-                    'caption' => '',
-                    'panel_top' => '',
-                    'items' => $oGrid->getCode(),
-                    'panel_bottom' => ''
-                )
-            )
-        );
-
-        return BxDolStudioTemplate::getInstance()->parseHtmlByName('forms.html', $aTmplVars);
+            'content' => $this->getBlockCode(array(
+				'items' => $oGrid->getCode()
+			))
+        ));
     }
 
     protected function actionValuesList()

+ 3 - 4
studio/template/scripts/BxBaseStudioLanguage.php

@@ -81,10 +81,9 @@ class BxBaseStudioLanguage extends BxDolStudioLanguage
     {
         $oPage = new BxTemplStudioSettings($this->sLanguage);
 
-        $aTmplVars = array(
-            'bx_repeat:blocks' => $oPage->getPageCode(),
-        );
-        return BxDolStudioTemplate::getInstance()->parseHtmlByName('language.html', $aTmplVars);
+        return BxDolStudioTemplate::getInstance()->parseHtmlByName('language.html', array(
+            'content' => $oPage->getPageCode()
+        ));
     }
 }
 

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

@@ -86,10 +86,9 @@ class BxBaseStudioModule extends BxDolStudioModule
     {
         $oPage = new BxTemplStudioSettings($this->sModule);
 
-        $aTmplVars = array(
-            'bx_repeat:blocks' => $oPage->getPageCode(),
-        );
-        return BxDolStudioTemplate::getInstance()->parseHtmlByName('module.html', $aTmplVars);
+        return BxDolStudioTemplate::getInstance()->parseHtmlByName('module.html', array(
+            'content' => $oPage->getPageCode(),
+        ));
     }
 }
 

+ 5 - 12
studio/template/scripts/BxBaseStudioNavigation.php

@@ -111,19 +111,12 @@ class BxBaseStudioNavigation extends BxDolStudioNavigation
         if(!$oGrid)
             return '';
 
-        $aTmplVars = array(
+        return BxDolStudioTemplate::getInstance()->parseHtmlByName('navigation.html', array(
             'js_object' => $this->getPageJsObject(),
-            'bx_repeat:blocks' => array(
-                array(
-                    'caption' => '',
-                    'panel_top' => '',
-                    'items' => $oGrid->getCode(),
-                    'panel_bottom' => ''
-                )
-            )
-        );
-
-        return BxDolStudioTemplate::getInstance()->parseHtmlByName('navigation.html', $aTmplVars);
+            'content' => $this->getBlockCode(array(
+				'items' => $oGrid->getCode()
+			))
+        ));
     }
 }
 

+ 5 - 12
studio/template/scripts/BxBaseStudioPermissions.php

@@ -81,19 +81,12 @@ class BxBaseStudioPermissions extends BxDolStudioPermissions
         if(!$oGrid)
             return '';
 
-        $aTmplVars = array(
+        return BxDolStudioTemplate::getInstance()->parseHtmlByName('permissions.html', array(
             'js_object' => $this->getPageJsObject(),
-            'bx_repeat:blocks' => array(
-                array(
-                    'caption' => '',
-                    'panel_top' => '',
-                    'items' => $oGrid->getCode(),
-                    'panel_bottom' => ''
-                )
-            )
-        );
-
-        return BxDolStudioTemplate::getInstance()->parseHtmlByName('permissions.html', $aTmplVars);
+            'content' => $this->getBlockCode(array(
+				'items' => $oGrid->getCode()
+        	))
+        ));
     }
 }
 

+ 8 - 22
studio/template/scripts/BxBaseStudioPolyglot.php

@@ -85,16 +85,9 @@ class BxBaseStudioPolyglot extends BxDolStudioPolyglot
     {
         $oPage = new BxTemplStudioSettings(BX_DOL_STUDIO_STG_TYPE_DEFAULT, BX_DOL_STUDIO_STG_CATEGORY_LANGUAGES);
 
-        $aTmplVars = array(
-            'js_object' => $this->getPageJsObject(),
-            'bx_repeat:blocks' => $oPage->getPageCode(),
-            'bx_if:show_new_key_popup' => array(
-                'condition' => false,
-                'content' => array()
-            )
-        );
-
-        return BxDolStudioTemplate::getInstance()->parseHtmlByName('polyglot.html', $aTmplVars);
+        return BxDolStudioTemplate::getInstance()->parseHtmlByName('polyglot.html', array(
+            'content' => $oPage->getPageCode()
+        ));
     }
 
     protected function getKeys()
@@ -113,18 +106,11 @@ class BxBaseStudioPolyglot extends BxDolStudioPolyglot
         if(!$oGrid)
             return '';
 
-        $aTmplVars = array(
-            'bx_repeat:blocks' => array(
-                array(
-                    'caption' => '',
-                    'panel_top' => '',
-                    'items' => $oGrid->getCode(),
-                    'panel_bottom' => ''
-                )
-            )
-        );
-
-        return BxDolStudioTemplate::getInstance()->parseHtmlByName('polyglot.html', $aTmplVars);
+        return BxDolStudioTemplate::getInstance()->parseHtmlByName('polyglot.html', array(
+            'content' => $this->getBlockCode(array(
+				'items' => $oGrid->getCode()
+			))
+        ));
     }
 }