diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2014-04-03 08:18:19 +0200 |
---|---|---|
committer | David <ottodavid@gmx.net> | 2014-08-21 17:32:53 +0200 |
commit | 33f2359f4375852dd92ef43f0f02dc4faad21e7f (patch) | |
tree | 7d0ce0b3c939e2d30675542e478ac6f4b0271a94 | |
parent | 9e4676c6e36b8590e1b1e6e4e2978c65b05ef394 (diff) |
Respect ButtonCssClass property in TActivePager. fix #511
(cherry picked from commit 6784c512fdccd03aee8864b7c94758909d3cd3d0)
-rwxr-xr-x | demos/quickstart/protected/pages/ActiveControls/Samples/TActivePager/Home.page | 17 | ||||
-rw-r--r-- | framework/Web/UI/ActiveControls/TActivePager.php | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActivePager/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActivePager/Home.page index 0af051fb..eb5ef821 100755 --- a/demos/quickstart/protected/pages/ActiveControls/Samples/TActivePager/Home.page +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActivePager/Home.page @@ -99,4 +99,21 @@ Choose page: Element.hide('wait') </prop:ClientSide.OnComplete> </com:TActivePager> +<br/> +Use of a css class for buttons: +<com:TStyleSheet> +.greenbold_button { + background-color: #0f0; + font-weight: bold; +} +</com:TStyleSheet> +<com:TActivePager ID="Pager4" + ControlToPaginate="DataList" + PageButtonCount="3" + Mode="Numeric" + ButtonType="PushButton" + OnPageIndexChanged="pageChanged" + OnCallBack="RenderCallback" + ButtonCssClass="greenbold_button" + /> </com:TContent> diff --git a/framework/Web/UI/ActiveControls/TActivePager.php b/framework/Web/UI/ActiveControls/TActivePager.php index b49faa37..078bd5be 100644 --- a/framework/Web/UI/ActiveControls/TActivePager.php +++ b/framework/Web/UI/ActiveControls/TActivePager.php @@ -124,6 +124,7 @@ class TActivePager extends TPager implements IActiveControl, ICallbackEventHandl { $button=new TLabel; $button->setText($text); + $button->setCssClass($this->getButtonCssClass()); return $button; } } @@ -152,6 +153,7 @@ class TActivePager extends TPager implements IActiveControl, ICallbackEventHandl $button->setCommandName($commandName); $button->setCommandParameter($commandParameter); $button->setCausesValidation(false); + $button->setCssClass($this->getButtonCssClass()); $button->attachEventHandler('OnCallback', array($this, 'handleCallback')); $button->getAdapter()->getBaseActiveControl()->setClientSide( |