From 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 Mon Sep 17 00:00:00 2001 From: ctrlaltca <> Date: Thu, 12 Jul 2012 11:21:01 +0000 Subject: standardize the use of unix eol; use svn properties to enforce native eol --- demos/blog/protected/Common/XListMenu.php | 252 +++++++++++++++--------------- 1 file changed, 126 insertions(+), 126 deletions(-) (limited to 'demos/blog/protected/Common/XListMenu.php') diff --git a/demos/blog/protected/Common/XListMenu.php b/demos/blog/protected/Common/XListMenu.php index 7dadfbe4..92ab2984 100644 --- a/demos/blog/protected/Common/XListMenu.php +++ b/demos/blog/protected/Common/XListMenu.php @@ -1,127 +1,127 @@ - - * @link http://www.pradosoft.com/ - * @copyright Copyright © 2006 PradoSoft - * @license http://www.pradosoft.com/license/ - * @version $Id$ - */ - -Prado::using('System.Web.UI.WebControls.TListControl'); - -/** - * XListMenu class - * - * XListMenu displays a list of hyperlinks that can be used for page menus. - * Menu items adjust their css class automatically according to the current - * page displayed. In particular, a menu item is considered as active if - * the URL it represents is for the page currently displayed. - * - * Usage of XListMenu is similar to PRADO list controls. Each list item has - * two extra properties: {@link XListMenuItem::setPagePath PagePath} and - * {@link XListMenuItem::setNavigateUrl NavigateUrl}. The former is used to - * determine if the item is active or not, while the latter specifies the - * URL for the item. If the latter is not specified, a URL to the page is - * generated automatically. - * - * In template, you may use the following tags to specify a menu: - * - * - * - * - * - * - * - * @author Qiang Xue - * @link http://www.pradosoft.com/ - * @copyright Copyright © 2006 PradoSoft - * @license http://www.pradosoft.com/license/ - */ -class XListMenu extends TListControl -{ - public function addParsedObject($object) - { - if($object instanceof XListMenuItem) - parent::addParsedObject($object); - } - - public function getActiveCssClass() - { - return $this->getViewState('ActiveCssClass',''); - } - - public function setActiveCssClass($value) - { - $this->setViewState('ActiveCssClass',$value,''); - } - - public function getInactiveCssClass() - { - return $this->getViewState('InactiveCssClass',''); - } - - public function setInactiveCssClass($value) - { - $this->setViewState('InactiveCssClass',$value,''); - } - - public function render($writer) - { - if(($activeClass=$this->getActiveCssClass())!=='') - $activeClass=' class="'.$activeClass.'"'; - if(($inactiveClass=$this->getInactiveCssClass())!=='') - $inactiveClass=' class="'.$inactiveClass.'"'; - $currentPagePath=$this->getPage()->getPagePath(); - $writer->write(""); - } -} - -class XListMenuItem extends TListItem -{ - public function getPagePath() - { - return $this->getValue(); - } - - public function setPagePath($value) - { - $this->setValue($value); - } - - public function getNavigateUrl() - { - return $this->hasAttribute('NavigateUrl')?$this->getAttribute('NavigateUrl'):''; - } - - public function setNavigateUrl($value) - { - $this->setAttribute('NavigateUrl',$value); - } -} - + + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2006 PradoSoft + * @license http://www.pradosoft.com/license/ + * @version $Id$ + */ + +Prado::using('System.Web.UI.WebControls.TListControl'); + +/** + * XListMenu class + * + * XListMenu displays a list of hyperlinks that can be used for page menus. + * Menu items adjust their css class automatically according to the current + * page displayed. In particular, a menu item is considered as active if + * the URL it represents is for the page currently displayed. + * + * Usage of XListMenu is similar to PRADO list controls. Each list item has + * two extra properties: {@link XListMenuItem::setPagePath PagePath} and + * {@link XListMenuItem::setNavigateUrl NavigateUrl}. The former is used to + * determine if the item is active or not, while the latter specifies the + * URL for the item. If the latter is not specified, a URL to the page is + * generated automatically. + * + * In template, you may use the following tags to specify a menu: + * + * + * + * + * + * + * + * @author Qiang Xue + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2006 PradoSoft + * @license http://www.pradosoft.com/license/ + */ +class XListMenu extends TListControl +{ + public function addParsedObject($object) + { + if($object instanceof XListMenuItem) + parent::addParsedObject($object); + } + + public function getActiveCssClass() + { + return $this->getViewState('ActiveCssClass',''); + } + + public function setActiveCssClass($value) + { + $this->setViewState('ActiveCssClass',$value,''); + } + + public function getInactiveCssClass() + { + return $this->getViewState('InactiveCssClass',''); + } + + public function setInactiveCssClass($value) + { + $this->setViewState('InactiveCssClass',$value,''); + } + + public function render($writer) + { + if(($activeClass=$this->getActiveCssClass())!=='') + $activeClass=' class="'.$activeClass.'"'; + if(($inactiveClass=$this->getInactiveCssClass())!=='') + $inactiveClass=' class="'.$inactiveClass.'"'; + $currentPagePath=$this->getPage()->getPagePath(); + $writer->write(""); + } +} + +class XListMenuItem extends TListItem +{ + public function getPagePath() + { + return $this->getValue(); + } + + public function setPagePath($value) + { + $this->setValue($value); + } + + public function getNavigateUrl() + { + return $this->hasAttribute('NavigateUrl')?$this->getAttribute('NavigateUrl'):''; + } + + public function setNavigateUrl($value) + { + $this->setAttribute('NavigateUrl',$value); + } +} + ?> \ No newline at end of file -- cgit v1.2.3