예제 #1
0
 /**
  * This method registers the appropriate javascript and css files for
  * the component. Also calls {@link registerPostBack},
  * which allows the object to respond to post events.
  * 
  * This method is invoked when the control enters 'OnPreRender' stage.
  * The method raises 'OnPreRender' event.
  * If you override this method, be sure to call the parent implementation
  * so that the event handlers can be invoked.
  * @param TEventParameter event parameter to be passed to the event handlers
  */
 public function onPreRender($param)
 {
     parent::onPreRender($param);
     $this->setHeight("30px");
     $this->getPage()->getClientScript()->registerPradoScript('prado');
     $this->getPage()->getClientScript()->registerStyleSheetFile('EtkStarryCss', $this->publishAsset("/stars.css", __CLASS__));
     $this->getPage()->getClientScript()->registerScriptFile('EtkStarryJs', $this->publishAsset("/stars.js", __CLASS__));
     $this->registerPostBack();
 }
예제 #2
0
 /**
  * Registers clientscripts
  *
  * This method overrides the parent implementation and is invoked before render.
  * @param mixed event parameter
  */
 public function onPreRender($param)
 {
     parent::onPreRender($param);
 }
예제 #3
0
 /**
  * Render the javascript within the panel.
  */
 protected function onPreRender($param)
 {
     parent::onPreRender($param);
     $this->Page->registerClientScript("controls");
     $this->renderClientScript();
 }
예제 #4
0
 /**
  * Determins which wizard step to show and appropriate navigation elements.
  * @param TEventParameter event parameter to be passed to the event handlers
  */
 protected function onPreRender($param)
 {
     parent::onPreRender($param);
     $index = $this->getActiveStepIndex();
     $totalSteps = count($this->steps);
     //show the current step
     for ($i = 0; $i < $totalSteps; $i++) {
         $this->steps[$i]->setVisible($i == $index);
     }
     //determine which link is active
     for ($i = 0; $i < count($this->sidebarLinks); $i++) {
         $this->sidebarLinks[$i]->CssClass = $i == $index ? 'active' : '';
     }
     //hide all the navigations first.
     foreach ($this->navigation as $navigation) {
         foreach ($navigation as $nav) {
             $nav->setVisible(false);
         }
     }
     $final = $this->steps[$index]->Type == TWizardStep::TYPE_FINAL;
     //if it is not the final step
     if (!$final && $this->isSideBarVisible()) {
         $this->showNavigation(TWizardTemplate::ID_SIDEBAR);
     }
     $finishStep = $index == $totalSteps - 1;
     $finishStep = $finishStep || isset($this->steps[$index + 1]) && $this->steps[$index + 1]->Type == TWizardStep::TYPE_FINAL;
     //now show the appropriate navigation elements.
     if ($index == 0) {
         $this->showNavigation(TWizardTemplate::ID_START);
     } else {
         if ($final) {
         } else {
             if ($finishStep) {
                 $this->showNavigation(TWizardTemplate::ID_FINISH);
             } else {
                 $this->showNavigation(TWizardTemplate::ID_STEP);
             }
         }
     }
 }
 /**
  * Register the required javascript libraries.
  */
 function onPreRender($param)
 {
     parent::onPreRender($param);
     $this->Page->registerClientScript('logger');
     $this->renderMessage();
 }