AntonLV 5 anos atrás
pai
commit
a885f34227

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

@@ -23,7 +23,12 @@ class BxBaseStudioMenu extends BxDolStudioMenu
             'page_breadcrumb.html'
         ));
     }
-    
+
+    public function setInlineIcons($bInlineIcons)
+    {
+        $this->_bInlineIcons = $bInlineIcons;
+    }
+
     protected function _getMenuItem ($aItem)
     {
         $aItem = parent::_getMenuItem($aItem);

+ 10 - 4
studio/template/scripts/BxBaseStudioPage.php

@@ -133,10 +133,7 @@ class BxBaseStudioPage extends BxDolStudioPage
 
     public function getPageMenu($aMenu = array(), $aMarkers = array())
     {
-        $oMenu = new BxTemplStudioMenu(array('template' => 'menu_side.html', 'menu_items' => $aMenu));
-        if(!empty($aMarkers))
-            $oMenu->addMarkers($aMarkers);
-
+        $oMenu = $this->getPageMenuObject($aMenu, $aMarkers);
         return $oMenu->getCode();
     }
 
@@ -149,6 +146,15 @@ class BxBaseStudioPage extends BxDolStudioPage
         return '';
     }
 
+    protected function getPageMenuObject($aMenu = array(), $aMarkers = array())
+    {
+        $oMenu = new BxTemplStudioMenu(array('template' => 'menu_side.html', 'menu_items' => $aMenu));
+        if(!empty($aMarkers))
+            $oMenu->addMarkers($aMarkers);
+
+        return $oMenu;
+    }
+
     protected function getPageCaptionHelp()
     {
     	$sContent = BxDolRss::getObjectInstance($this->sPageRssHelpObject)->getHolder($this->sPageRssHelpId, $this->iPageRssHelpLength, 0, false);

+ 22 - 16
studio/template/scripts/BxBaseStudioWidget.php

@@ -115,24 +115,22 @@ class BxBaseStudioWidget extends BxDolStudioWidget
             $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)
+        if(method_exists($this, $sMethod)) {
+            $mixedContent = $this->$sMethod();
+            if(!$bWrap || in_array($sPage, $this->aPageCodeNoWrap))
+                $sResult .= $mixedContent;
+            else if(is_string($mixedContent))
                 $sResult .= $this->getBlockCode(array(
-                    'content' => $sBlock
+                    'content' => $mixedContent
                 ));
-        else if(is_a($mixedContent, 'BxDolPage'))
-            $sResult .= $mixedContent->getCode();
+            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
@@ -299,6 +297,14 @@ class BxBaseStudioWidget extends BxDolStudioWidget
         $oForm = new BxTemplStudioFormView($aForm);
         return $oForm->getCode();
     }
+
+    protected function getPageMenuObject($aMenu = array(), $aMarkers = array())
+    {
+        $oMenu = parent::getPageMenuObject($aMenu, $aMarkers);
+        $oMenu->setInlineIcons(false);
+
+        return $oMenu;
+    }
 }
 
 /** @} */