/** * Set view and enable jQuery Core and UI libraries * * @param Zend_View_Interface $view * @return ZendX_JQuery_View_Helper_Widget */ public function setView(Zend_View_Interface $view) { parent::setView($view); $this->jquery = $this->view->jQuery(); $this->jquery->enable()->uiEnable(); return $this; }
public function setUp() { Zend_Registry::_unsetInstance(); $this->view = $this->getView(); $this->jquery = new ZendX_JQuery_View_Helper_JQuery_Container(); $this->jquery->setView($this->view); Zend_Registry::set('ZendX_JQuery_View_Helper_JQuery', $this->jquery); }
protected function _renderScriptTags() { if ($this->_checkProcessing() === false) { return parent::_renderScriptTags(); } if (count($this->getJavascriptFiles()) == 0) { return ''; } $scriptsMinifyUrl = implode(',', $this->getJavascriptFiles()); $this->clearJavascriptFiles(); parent::addJavascriptFile('/minify/?f=' . $scriptsMinifyUrl); return parent::_renderScriptTags(); }
/** * Return the javascript file used to localize the datePicker component * * @param Zend_Locale $locale the given locale * @param ZendX_JQuery_View_Helper_JQuery_Container $instance the jquery helper * * @return string */ public function getDatePickerLocaleJavascriptFile(Zend_Locale $locale, $instance) { if ($instance->useUiCdn()) { $baseUri = $instance->_getJQueryLibraryBaseCdnUri(); $uiPath = $baseUri . ZendX_JQuery::CDN_SUBFOLDER_JQUERYUI . $instance->getUiVersion() . "/i18n/jquery.ui.datepicker-{$locale->getLanguage()}.js"; } else { if ($instance->useUiLocal()) { $uiPath = $instance->getUiPath() . "/i18n/jquery.ui.datepicker-{$locale->getLanguage()}.js"; } } return $uiPath; }