summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorctrlaltca <>2012-08-06 16:47:25 +0000
committerctrlaltca <>2012-08-06 16:47:25 +0000
commite7b4d1466524258585711be76d525b1c8441f4d2 (patch)
tree12aaa34a5b9356fe24b54d9abbc540287476c871 /framework
parent0dce832bc6111fb97621ffb2ae0c5501482f903c (diff)
patch for #419
Diffstat (limited to 'framework')
-rw-r--r--framework/Web/UI/WebControls/TPager.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/framework/Web/UI/WebControls/TPager.php b/framework/Web/UI/WebControls/TPager.php
index 11de5233..9551476f 100644
--- a/framework/Web/UI/WebControls/TPager.php
+++ b/framework/Web/UI/WebControls/TPager.php
@@ -32,6 +32,9 @@
* - PushButton: a normal button
* - ImageButton: an image button (please set XXXPageImageUrl properties accordingly to specify the button images.)
*
+ * Since Prado 3.2.1, you can use the {@link setButtonCssClass ButtonCssClass} property to specify a css class
+ * that will be applied to each button created by the pager in NextPrev or Numeric mode.
+ *
* TPager raises an {@link onPageIndexChanged OnPageIndexChanged} event when
* the end-user interacts with it and specifies a new page (e.g. clicking
* on a page button that leads to a new page.) The new page index may be obtained
@@ -94,6 +97,24 @@ class TPager extends TWebControl implements INamingContainer
}
/**
+ * @return string the css class of the buttons.
+ * @since 3.2.1
+ */
+ public function getButtonCssClass()
+ {
+ return $this->getViewState('ButtonCssClass','');
+ }
+
+ /**
+ * @param Sets the css class of the buttons that will be rendered by this pager.
+ * @since 3.2.1
+ */
+ public function setButtonCssClass($value)
+ {
+ $this->setViewState('ButtonCssClass',TPropertyValue::ensureString($value,''),'');
+ }
+
+ /**
* @return TPagerMode pager mode. Defaults to TPagerMode::NextPrev.
*/
public function getMode()
@@ -439,6 +460,7 @@ class TPager extends TWebControl implements INamingContainer
{
$button=new TLabel;
$button->setText($text);
+ $button->setCssClass($this->getButtonCssClass());
return $button;
}
}
@@ -458,6 +480,7 @@ class TPager extends TWebControl implements INamingContainer
$button->setCommandName($commandName);
$button->setCommandParameter($commandParameter);
$button->setCausesValidation(false);
+ $button->setCssClass($this->getButtonCssClass());
return $button;
}