Index: library/ZendX/JQuery/View/Helper/JQuery/Container.php =================================================================== --- library/ZendX/JQuery/View/Helper/JQuery/Container.php (revision 24400) +++ library/ZendX/JQuery/View/Helper/JQuery/Container.php (working copy) @@ -23,12 +23,12 @@ /** * @see ZendX_JQuery */ -require_once "ZendX/JQuery.php"; +require_once 'ZendX/JQuery.php'; /** * jQuery View Helper. Transports all jQuery stack and render information across all views. * - * @uses ZendX_JQuery_View_Helper_JQuery_Container + * @uses ZendX_JQuery_View_Helper_JQuery_Container * @package ZendX_JQuery * @subpackage View * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) @@ -317,7 +317,7 @@ public function setUiVersion($version) { $this->_uiVersion = $version; - return $this; + return $this; } /** @@ -337,7 +337,7 @@ * @param String $version * @return ZendX_JQuery_View_Helper_JQuery_Container */ - public function setUiCdnVersion($version="1.5.2") + public function setUiCdnVersion($version = '1.5.2') { return $this->setUiVersion($version); } @@ -361,8 +361,8 @@ */ public function setUiLocalPath($path) { - $this->_uiPath = (string) $path; - return $this; + $this->_uiPath = (string) $path; + return $this; } /** @@ -372,7 +372,7 @@ */ public function getUiPath() { - return $this->_uiPath; + return $this->_uiPath; } /** @@ -392,7 +392,7 @@ */ public function useUiLocal() { - return (null===$this->_uiPath ? false : true); + return (null===$this->_uiPath ? false : true); } /** @@ -402,7 +402,7 @@ */ public function useUiCdn() { - return !$this->useUiLocal(); + return !$this->useUiLocal(); } /** @@ -549,7 +549,7 @@ /** * Clear arbitrary javascript stack * - * @return ZendX_JQuery_View_Helper_JQuery_Container + * @return ZendX_JQuery_View_Helper_JQuery_Container */ public function clearJavascript() { @@ -583,6 +583,17 @@ } /** + * Clear all currently registered stylesheets files + * + * @return ZendX_JQuery_View_Helper_JQuery_Container + */ + public function clearStylesheets() + { + $this->_stylesheets = array(); + return $this; + } + + /** * Add a script to execute onLoad * * @param string $callback Lambda @@ -670,9 +681,9 @@ */ protected function _renderStylesheets() { - if( ($this->getRenderMode() & ZendX_JQuery::RENDER_STYLESHEETS) == 0) { + if( ($this->getRenderMode() & ZendX_JQuery::RENDER_STYLESHEETS) == 0) { return ''; - } + } foreach ($this->getStylesheets() as $stylesheet) { $stylesheets[] = $stylesheet; @@ -683,7 +694,7 @@ } array_reverse($stylesheets); - $style = ""; + $style = ''; foreach($stylesheets AS $stylesheet) { if ($this->view instanceof Zend_View_Abstract) { $closingBracket = ($this->view->doctype()->isXhtml()) ? ' />' : '>'; @@ -803,11 +814,11 @@ return $baseUri; } - /** - * Internal function that constructs the include path of the jQuery library. - * - * @return string - */ + /** + * Internal function that constructs the include path of the jQuery library. + * + * @return string + */ protected function _getJQueryLibraryPath() { if($this->_jqueryLibraryPath != null) { @@ -817,7 +828,7 @@ $source = $baseUri . ZendX_JQuery::CDN_SUBFOLDER_JQUERY . $this->getCdnVersion() . - ZendX_JQuery::CDN_JQUERY_PATH_GOOGLE; + ZendX_JQuery::CDN_JQUERY_PATH_GOOGLE; } return $source; @@ -833,7 +844,7 @@ $uiPath = $baseUri. ZendX_JQuery::CDN_SUBFOLDER_JQUERYUI . $this->getUiCdnVersion() . - "/jquery-ui.min.js"; + '/jquery-ui.min.js'; } else if($this->useUiLocal()) { $uiPath = $this->getUiPath(); }