public function init() { // Put togehther options for plugin $options_default = array('checkAllText' => Yii::t('EchMultiSelect.EchMultiSelect', 'Check all'), 'uncheckAllText' => Yii::t('EchMultiSelect.EchMultiSelect', 'Uncheck all'), 'selectedText' => Yii::t('EchMultiSelect.EchMultiSelect', '# selected'), 'noneSelectedText' => '--' . Yii::t('EchMultiSelectEchMultiSelect', 'Select') . '--', 'multiple' => true, 'filter' => false, 'ajaxRefresh' => false); $filterOptions_default = array('label' => Yii::t('EchMultiSelect.EchMultiSelect', 'Filter:'), 'placeholder' => Yii::t('EchMultiSelect.EchMultiSelect', 'Enter keywords')); $opt = array_merge($options_default, $this->options); $fopt = array_merge($filterOptions_default, $this->filterOptions); if ($opt['multiple'] === false && !isset($this->options['noneSelectedText'])) { $opt['noneSelectedText'] = '-- ' . Yii::t('EchMultiSelect.EchMultiSelect', 'Select an Option') . ' --'; } $this->options = $opt; $this->filterOptions = $fopt; // make sure multiple="multiple" is set for drop down list if ($this->options['multiple']) { $this->dropDownHtmlOptions['multiple'] = true; } $cs = Yii::app()->getClientScript(); $assets = Yii::app()->getAssetManager()->publish(dirname(__FILE__) . '/assets'); $cs->registerScriptFile($assets . '/jquery.ui.widget.min.js'); $cs->registerScriptFile($assets . '/jquery.multiselect.js'); $cs->registerCssFile($assets . '/jquery.multiselect.css'); if ($this->options['filter'] === true) { $cs->registerScriptFile($assets . '/jquery.multiselect.filter.js'); $cs->registerCssFile($assets . '/jquery.multiselect.filter.css'); } parent::init(); }
public function init() { list($this->name, $this->id) = $this->resolveNameID(); $this->attachBehaviors($this->behaviors()); parent::init(); }
public function init() { $cs = Yii::app()->getClientScript(); $assets = Yii::app()->getAssetManager()->publish(dirname(__FILE__) . '/assets'); $cs->registerScriptFile($assets . '/jquery.ui.widget.min.js'); $cs->registerScriptFile($assets . '/jquery.ui.combobox.js'); parent::init(); }
/** * (non-PHPdoc) * @see framework/zii/widgets/jui/CJuiWidget::init() */ public function init() { parent::init(); if ($this->buttonType == 'buttonset') { if (!isset($this->htmlOptions['id'])) { $this->htmlOptions['id'] = $this->getId(); } echo CHtml::openTag($this->htmlTag, $this->htmlOptions); } }
public function init() { /* x2modstart */ // mobile app has its own datepicker styling if (Yii::app()->params->isMobileApp) { $this->cssFile = null; } /* x2modend */ parent::init(); }
public function init() { parent::init(); // Register the extension script and needed Css - different $baseUrl from the zii stuff $basePath = Yii::getPathOfAlias('application.extensions.timepicker.assets'); $baseUrl = Yii::app()->getAssetManager()->publish($basePath); $cs = Yii::app()->getClientScript(); $cs->registerCssFile($baseUrl . '/' . $this->extraCssFile); // NOTE CJuiWidget registers the ui js at POS_END so we should too, otherwise the inclusion order is wrong $cs->registerScriptFile($baseUrl . '/' . $this->extraScriptFile, CClientScript::POS_END); }
public function init() { parent::init(); $path = pathinfo(__FILE__); $basePath = $path['dirname'] . '/assets'; $baseUrl = Yii::app()->getAssetManager()->publish($basePath); $cs = Yii::app()->getClientScript(); $cs->registerCssFile($baseUrl . '/' . $this->extraCssFile); $cs->registerScriptFile($baseUrl . '/' . $this->extraScriptFile, CClientScript::POS_END); $cs->registerScriptFile($baseUrl . '/' . $this->extraScriptFile2, CClientScript::POS_END); }
public function init() { parent::init(); // Register the extension script and needed Css - different $baseUrl from the zii stuff $path = dirname(__FILE__); // changed to enable various extension Paths - GOsha $basePath = $path . DIRECTORY_SEPARATOR . 'assets'; $baseUrl = Yii::app()->getAssetManager()->publish($basePath); $cs = Yii::app()->getClientScript(); $cs->registerCssFile($baseUrl . '/' . $this->extraCssFile); $cs->registerScriptFile($baseUrl . '/' . $this->extraScriptFile, CClientScript::POS_END); }
public function init() { parent::init(); // Register the extension script and needed Css - different $baseUrl from the zii stuff $path = pathinfo(__FILE__); // changed to enable various extension Paths - GOsha $basePath = $path['dirname']. '/assets'; $baseUrl=Yii::app()->getAssetManager()->publish($basePath); $cs=Yii::app()->getClientScript(); $cs->registerCssFile($baseUrl.'/'.$this->extraCssFile); // NOTE CJuiWidget registers the ui js at POS_END so we should too, otherwise the inclusion order is wrong $cs->registerScriptFile($baseUrl.'/'.$this->extraScriptFile, CClientScript::POS_END); }
/** * Widget initialization */ public function init() { if ($this->uploadTemplate === null) { $this->uploadTemplate = "#template-upload"; } if ($this->downloadTemplate === null) { $this->downloadTemplate = "#template-download"; } if (!isset($this->htmlOptions['enctype'])) { $this->htmlOptions['enctype'] = 'multipart/form-data'; } parent::init(); }
/** * Widget initialization */ public function init() { $this->attachBehavior('ywplugin', array('class' => 'yiiwheels.behaviors.WhPlugin')); if ($this->uploadTemplate === null) { $this->uploadTemplate = "#template-upload"; } if ($this->downloadTemplate === null) { $this->downloadTemplate = "#template-download"; } if (!isset($this->htmlOptions['enctype'])) { $this->htmlOptions['enctype'] = 'multipart/form-data'; } parent::init(); }
public function init() { // Put togehther options for plugin $cs = Yii::app()->getClientScript(); $assets = Yii::app()->getAssetManager()->publish(dirname(__FILE__) . '/assets'); $cs->registerScriptFile($assets . '/jquery.ui.monthpicker.js'); // Default options for the jQuery widget $default_options = array('monthNames' => array(Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'January'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'February'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'March'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'April'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'May'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'June'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'July'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'August'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'September'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'October'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'November'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'December')), 'monthNamesShort' => array(Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'Jan'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'Feb'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'Mar'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'Apr'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'May'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'Jun'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'Jul'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'Aug'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'Sep'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'Oct'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'Nov'), Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'Dec')), 'prevText' => Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'Prev'), 'nextText' => Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'Next'), 'showOn' => 'focus', 'yearRange' => '-5:+15', 'dateFormat' => 'yy-mm', 'changeYear' => true, 'buttonImageOnly' => false, 'buttonImage' => $assets . "/images/calendar.png", 'buttonText' => Yii::t('EJuiMonthPicker.EJuiMonthPicker', 'Select Month')); if (!empty($this->options)) { $opt = array_merge($default_options, $this->options); } else { $opt = $default_options; } $this->options = $opt; parent::init(); }
/** * (non-PHPdoc) * @see framework/zii/widgets/jui/CJuiWidget::init() */ public function init() { parent::init(); if ($this->buttonType == 'buttonset') { list($name, $id) = $this->resolveNameID(); if (isset($this->htmlOptions['id'])) { $id = $this->htmlOptions['id']; } else { $this->htmlOptions['id'] = $id; } if (isset($this->htmlOptions['name'])) { $name = $this->htmlOptions['name']; } else { $this->htmlOptions['name'] = $name; } echo CHtml::openTag($this->htmlTag, $this->htmlOptions); } }
/** * Initializes everything * * @return void */ public function init() { parent::init(); list($name, $id) = $this->resolveNameID(); if (isset($this->htmlOptions['id'])) { $id = $this->htmlOptions['id']; } else { $this->htmlOptions['id'] = $id; } $basePath = Yii::getPathOfAlias('ext.SRelationWidgets.assets'); $baseUrl = Yii::app()->getAssetManager()->publish($basePath); $cs = Yii::app()->getClientScript(); $cs->registerCssFile($baseUrl . '/' . 'ui.multiselect.css'); $this->scriptUrl = $baseUrl; $this->registerScriptFile('ui.multiselect.js'); $options = CJavaScript::encode($this->options); $cs->registerScript('sjuilistbox-' . $id, '$("#' . $id . '").multiselect(' . $options . ');', CClientScript::POS_READY); }
/** * Widget initialization */ public function init() { if ($this->uploadTemplate === null) { $this->uploadTemplate = "#template-upload"; } if ($this->downloadTemplate === null) { $this->downloadTemplate = "#template-download"; } if ($this->uploadView === null) { $this->uploadView = "bootstrap.views.fileupload.upload"; } if ($this->downloadView === null) { $this->downloadView = "bootstrap.views.fileupload.download"; } if ($this->formView === null) { $this->formView = "bootstrap.views.fileupload.form"; } if (!isset($this->htmlOptions['enctype'])) { $this->htmlOptions['enctype'] = 'multipart/form-data'; } parent::init(); }
public function init() { // make sure multiple="multiple" is set for dropdown list if (!isset($this->options['multiple']) || $this->options['multiple'] === true) { $this->htmlOptions['multiple'] = true; } $cs = Yii::app()->getClientScript(); $assets = Yii::app()->getAssetManager()->publish(dirname(__FILE__) . '/assets'); $cs->registerScriptFile($assets . '/jquery.ui.widget.min.js'); $cs->registerScriptFile($assets . '/jquery.multiselect.js'); $cs->registerCssFile($assets . '/jquery.multiselect.css'); if ($this->filter === true) { $cs->registerScriptFile($assets . '/jquery.multiselect.filter.js'); $cs->registerCssFile($assets . '/jquery.multiselect.filter.css'); } parent::init(); }
/** * Publishes the required assets */ public function init() { parent::init(); $this->publishAssets(); }
public function init() { $this->themeUrl = Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('application.assets.css.jui')); $this->theme = Yii::app()->params['juiTheme']; parent::init(); }
/** * Registers the JS and CSS Files */ protected function registerScripts() { parent::registerCoreScripts(); $assets = Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('ext.multiselect') . '/assets'); $cs = Yii::app()->getClientScript(); $cs->registerCoreScript('jquery.ui'); $cs->registerScriptFile($assets . '/jquery.multiselect.min.js'); $cs->registerCssFile($assets . '/jquery.multiselect.css'); }
public function init() { parent::init(); }
/** * Initialize the Calendar Widget */ public function init() { $this->themeUrl = Yii::app()->themeManager->baseUrl; $this->theme = Yii::app()->theme->name; parent::init(); }
/** * Initialize the Calendar Widget */ public function init() { $this->themeUrl = Yii::app()->baseUrl . '/themes'; $this->theme = Yii::app()->theme->name; parent::init(); }
public function init() { parent::init(); $this->registerScripts(); }