コード例 #1
0
 public function onBeforeRender()
 {
     if ($this->getTemplate() === null) {
         $this->setTemplate(OW::getThemeManager()->getMasterPageTemplate(self::TEMPLATE_GENERAL));
     }
     $this->addComponent('signIn', new BASE_MCMP_SignIn());
     $this->addComponent('topMenu', new BASE_MCMP_TopMenu());
     $this->addComponent('bottomMenu', new BASE_MCMP_BottomMenu());
     $this->assign('buttonData', $this->buttonData);
     parent::onBeforeRender();
 }
コード例 #2
0
ファイル: master_page.php プロジェクト: vBulleteen/oxwall
 public function onBeforeRender()
 {
     parent::onBeforeRender();
     $language = OW::getLanguage();
     OW::getDocument()->setBodyClass('ow_admin_area');
     $this->setTemplate(OW::getThemeManager()->getMasterPageTemplate(OW_MasterPage::TEMPLATE_ADMIN));
     $arrayToAssign = array();
     srand(time());
     /* @var $value ADMIN_CMP_AdminMenu */
     foreach ($this->menuCmps as $key => $value) {
         $id = 'mi' . rand(1, 10000);
         $value->setCategory($key);
         $value->onBeforeRender();
         $menuItem = $value->getFirstElement();
         $arrayToAssign[$key] = array('id' => $id, 'firstLink' => $menuItem->getUrl(), 'key' => $key, 'isActive' => $value->isActive(), 'label' => $language->text('admin', 'sidebar_' . $key), 'sub_menu' => $value->getElementsCount() < 2 ? '' : $value->render(), 'active_sub_menu' => $value->getElementsCount() < 2 ? '' : $value->render('ow_admin_submenu'));
     }
     $this->assign('menuArr', $arrayToAssign);
 }
コード例 #3
0
ファイル: mobile_master_page.php プロジェクト: ZyXelP/oxwall
 public function setTemplate($template)
 {
     //TODO remove dirty hack for backcompat
     if (substr(basename($template), 0, strlen(self::TEMPLATE_BLANK)) == self::TEMPLATE_BLANK) {
         $this->buttonData = array("left" => array(), "right" => array());
     }
     parent::setTemplate($template);
 }
コード例 #4
0
ファイル: master_page.php プロジェクト: bhushansonar/hammu
 public function onBeforeRender()
 {
     parent::onBeforeRender();
     $language = OW::getLanguage();
     OW::getDocument()->setBodyClass('ow_admin_area');
     $this->setTemplate(OW::getThemeManager()->getMasterPageTemplate(OW_MasterPage::TEMPLATE_ADMIN));
     $arrayToAssign = array();
     srand(time());
     $script = "\$('.admin_menu_cont .menu_item')\n        .mouseover(function(){ \$('span.menu_items', \$(this)).css({display:'block'});\$(this).addClass('ow_hover');})\n        .mouseout(function(){ \$('span.menu_items', \$(this)).hide();\$(this).removeClass('ow_hover');});";
     /* @var $value ADMIN_CMP_AdminMenu */
     foreach ($this->menuCmps as $key => $value) {
         $id = 'mi' . rand(1, 10000);
         $value->onBeforeRender();
         $arrayToAssign[$key] = array('id' => $id, 'key' => $key, 'isActive' => $value->isActive(), 'label' => $language->text('admin', 'sidebar_' . $key), 'cmp' => $value->getElementsCount() < 2 || $value->isActive() ? '' : $value->render());
         if ($value->isActive() && $value->getElementsCount() > 1) {
             $this->assign('submenu', $value->render());
         }
         $menuItem = $value->getFirstElement();
         $script .= "\$('#{$id}').click(function(e){if(!\$(e.target).is('#{$id} .menu_cont *')){window.location='{$menuItem->getUrl()}';}});";
     }
     $this->assign('menuArr', $arrayToAssign);
     OW::getDocument()->addOnloadScript($script);
 }