From 4f8b5fd3b1e9436c1c2d904ecdb881972698dad6 Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Thu, 16 Jun 2011 11:42:22 +0000 Subject: Merged a bit TPager's view style with TDataGridPager's one adding first/last buttons to TDataGridPagerStyle --- .../Web/UI/WebControls/TDataGridPagerStyle.php | 38 ++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) (limited to 'framework/Web/UI/WebControls/TDataGridPagerStyle.php') diff --git a/framework/Web/UI/WebControls/TDataGridPagerStyle.php b/framework/Web/UI/WebControls/TDataGridPagerStyle.php index e29b9dc9..6d31e72d 100644 --- a/framework/Web/UI/WebControls/TDataGridPagerStyle.php +++ b/framework/Web/UI/WebControls/TDataGridPagerStyle.php @@ -4,7 +4,7 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2008 PradoSoft + * @copyright Copyright © 2005-2008 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ * @package System.Web.UI.WebControls @@ -27,6 +27,8 @@ class TDataGridPagerStyle extends TPanelStyle private $_mode=null; private $_nextText=null; private $_prevText=null; + private $_firstText=null; + private $_lastText=null; private $_buttonCount=null; private $_position=null; private $_visible=null; @@ -89,13 +91,45 @@ class TDataGridPagerStyle extends TPanelStyle } /** - * @param string text for the next page button. + * @param string text for the previous page button. */ public function setPrevPageText($value) { $this->_prevText=$value; } + /** + * @return string text for the first page button. Defaults to '<<'. + */ + public function getFirstPageText() + { + return $this->_firstText===null?'<<':$this->_firstText; + } + + /** + * @param string text for the first page button. + */ + public function setFirstPageText($value) + { + $this->_firstText=$value; + } + + /** + * @return string text for the last page button. Defaults to '>>'. + */ + public function getLastPageText() + { + return $this->_lastText===null?'>>':$this->_lastText; + } + + /** + * @param string text for the last page button. + */ + public function setLastPageText($value) + { + $this->_lastText=$value; + } + /** * @return integer maximum number of pager buttons to be displayed. Defaults to 10. */ -- cgit v1.2.3