Esempio n. 1
0
 public function registerClientScripts()
 {
     parent::registerClientScripts();
     if ($this->useEasing) {
         $this->clientScript->registerScriptFile($this->baseUrl . '/external/easing/jquery.easing.1.3.js');
     }
 }
Esempio n. 2
0
 public function registerClientScripts()
 {
     parent::registerClientScripts();
     if ($this->language !== '') {
         $this->clientScript->registerScriptFile("{$this->baseUrl}/js/i18n/ui.datepicker-{$this->language}.js");
     }
 }
Esempio n. 3
0
 /**
  * Registers the external javascript files
  */
 public function registerClientScripts()
 {
     if ($this->_baseUrl === '') {
         throw new CException(Yii::t('EJqGrid', 'baseUrl must be set. This is done automatically by calling publishAssets()'));
     }
     parent::registerClientScripts();
     $files = array();
     $subdir = '';
     $subfile = '';
     $this->_clientScript = Yii::app()->getClientScript();
     $this->_clientScript->registerCoreScript('jquery');
     $this->_clientScript->registerCssFile($this->_baseUrl . '/css/ui.jqgrid.css');
     if ($this->getCompression() === 'none') {
         $this->_clientScript->registerScriptFile($this->_baseUrl . '/i18n/grid.locale-' . $this->getLanguage() . '.js');
     } else {
         $subdir = 'min/';
         $subfile = '-min';
         $this->_clientScript->registerScriptFile($this->_baseUrl . '/i18n/min/grid.locale-' . $this->getLanguage() . '.js');
     }
     $this->_clientScript->registerScriptFile($this->_baseUrl . '/js/jqModal.js');
     $this->_clientScript->registerScriptFile($this->_baseUrl . '/js/jqDnR.js');
     $files[] = "{$subdir}grid.base{$subfile}.js";
     // jqGrid base
     $files[] = "{$subdir}grid.common{$subfile}.js";
     // jqGrid common for editing
     $files[] = "{$subdir}grid.formedit{$subfile}.js";
     // jqGrid Form editing
     $files[] = "{$subdir}grid.inlinedit{$subfile}.js";
     // jqGrid inline editing
     $files[] = "{$subdir}grid.celledit{$subfile}.js";
     // jqGrid cell editing
     $files[] = "{$subdir}grid.subgrid{$subfile}.js";
     // jqGrid subgrid
     $files[] = "{$subdir}grid.treegrid{$subfile}.js";
     // jqGrid treegrid
     $files[] = "{$subdir}grid.custom{$subfile}.js";
     // jqGrid custom
     $files[] = "{$subdir}grid.postext{$subfile}.js";
     // jqGrid postext
     $files[] = "{$subdir}grid.setcolumns{$subfile}.js";
     // jqGrid setcolumns
     $files[] = "{$subdir}grid.import{$subfile}.js";
     // jqGrid import
     $files[] = "{$subdir}jquery.fmatter{$subfile}.js";
     // jqGrid formater
     $files[] = "{$subdir}json2{$subfile}.js";
     // json utils
     $files[] = "{$subdir}JsonXml{$subfile}.js";
     // xmljson utils
     $plugins[] = "jquery.contextmenu.js";
     // jqGrid table to grid
     $plugins[] = "jquery.tablednd.js";
     // jqGrid table to grid
     foreach ($files as $file) {
         $this->_clientScript->registerScriptFile($this->_baseUrl . '/js/' . $file);
     }
     foreach ($plugins as $file) {
         $this->_clientScript->registerScriptFile($this->_baseUrl . '/plugins/' . $file);
     }
 }