Exemple #1
0
 /**
  * Publish the color picker Css asset files.
  */
 public function onPreRender($param)
 {
     parent::onPreRender($param);
     $this->publishColorPickerAssets();
 }
 /**
  * Publish the date picker Css asset files.
  */
 public function onPreRender($param)
 {
     parent::onPreRender($param);
     if ($this->getInputMode() === TDatePickerInputMode::DropDownList) {
         $page = $this->getPage();
         $uniqueID = $this->getUniqueID();
         $page->registerPostDataLoader($uniqueID . TControl::ID_SEPARATOR . 'day');
         $page->registerPostDataLoader($uniqueID . TControl::ID_SEPARATOR . 'month');
         $page->registerPostDataLoader($uniqueID . TControl::ID_SEPARATOR . 'year');
     }
     $this->publishCalendarStyle();
 }
Exemple #3
0
 /**
  * Publish the date picker Css asset files.
  */
 public function onPreRender($param)
 {
     parent::onPreRender($param);
     $this->publishCalendarStyle();
     $this->registerCalendarClientScriptPre();
 }
 /**
  * Registers the script and style files
  * @return void
  */
 public function onPreRender($param)
 {
     if ($this->isShowCalendar()) {
         $page = $this->getPage();
         if (!$page->isScriptFileRegistered('TDatePicker1')) {
             $scriptPath = $this->Application->getResourceLocator()->getJsPath() . '/' . self::JS_DATEPICKER;
             $lang = $this->getLanguageSuffix($this->getCulture());
             $page->registerStyleFile('TDatePicker', $scriptPath . '/css/calendar-system.css');
             $page->registerScriptFile('TDatePicker1', $scriptPath . '/calendar.js');
             $page->registerScriptFile('TDatePicker2', $scriptPath . "/lang/calendar-{$lang}.js");
             $page->registerScriptFile('TDatePicker3', $scriptPath . '/calendar-setup.js');
             $script = "\n    if (typeof(Calendar) == \"undefined\")\n    \talert(\"Unable to find script library '{$scriptPath}'. Try placing this directory manually, or redefine constant JS_DATEPICKER in TDatePicker.php.\");\n    ";
             $page->registerEndScript('TDatePicker', $script);
         }
     }
     parent::onPreRender($param);
 }