summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxue <>2007-05-22 02:46:34 +0000
committerxue <>2007-05-22 02:46:34 +0000
commit68216d2e15c5ddda995fb55d0d75729004776439 (patch)
tree6212d8ff6189f288eb5eef135fb71d7a01cb21fb
parent4f150299bd476330fe87a72bd1d86e30fb376c0a (diff)
Fixed #621
-rw-r--r--.gitattributes1
-rw-r--r--HISTORY1
-rw-r--r--framework/Web/UI/WebControls/TWizard.php138
-rw-r--r--framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php156
4 files changed, 159 insertions, 137 deletions
diff --git a/.gitattributes b/.gitattributes
index b81b92d4..85c7e436 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -2189,6 +2189,7 @@ framework/Web/UI/WebControls/TValidationSummary.php -text
framework/Web/UI/WebControls/TWebControl.php -text
framework/Web/UI/WebControls/TWebControlAdapter.php -text
framework/Web/UI/WebControls/TWizard.php -text
+framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php -text
framework/Web/UI/WebControls/TXmlTransform.php -text
framework/Xml/TXmlDocument.php -text
framework/interfaces.php -text
diff --git a/HISTORY b/HISTORY
index e638e1e1..b110239c 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,5 +1,6 @@
Version 3.1.0 To Be Released
============================
+BUG: Ticket#621 - TWizardNavigationButtonStyle could not be found (Qiang)
Version 3.1.0 RC May 14, 2007
=============================
diff --git a/framework/Web/UI/WebControls/TWizard.php b/framework/Web/UI/WebControls/TWizard.php
index 33b30de0..2f7d75d6 100644
--- a/framework/Web/UI/WebControls/TWizard.php
+++ b/framework/Web/UI/WebControls/TWizard.php
@@ -16,6 +16,7 @@ Prado::using('System.Web.UI.WebControls.TButton');
Prado::using('System.Web.UI.WebControls.TLinkButton');
Prado::using('System.Web.UI.WebControls.TImageButton');
Prado::using('System.Web.UI.WebControls.TDataList');
+Prado::using('System.Web.UI.WebControls.TWizardNavigationButtonStyle');
/**
* Class TWizard.
@@ -1416,143 +1417,6 @@ class TWizard extends TWebControl implements INamingContainer
}
}
-/**
- * TWizardNavigationButtonStyle class.
- * TWizardNavigationButtonStyle defines the style applied to a wizard navigation button.
- * The button type can be specified via {@link setButtonType ButtonType}, which
- * can be 'Button', 'Image' or 'Link'.
- * If the button is an image button, {@link setImageUrl ImageUrl} will be
- * used to load the image for the button.
- * Otherwise, {@link setButtonText ButtonText} will be displayed as the button caption.
- *
- * @author Qiang Xue <qiang.xue@gmail.com>
- * @version $Id$
- * @package System.Web.UI.WebControls
- * @since 3.0
- */
-class TWizardNavigationButtonStyle extends TStyle
-{
- private $_imageUrl=null;
- private $_buttonText=null;
- private $_buttonType=null;
-
- /**
- * Sets the style attributes to default values.
- * This method overrides the parent implementation by
- * resetting additional TWizardNavigationButtonStyle specific attributes.
- */
- public function reset()
- {
- parent::reset();
- $this->_imageUrl=null;
- $this->_buttonText=null;
- $this->_buttonType=null;
- }
-
- /**
- * Copies the fields in a new style to this style.
- * If a style field is set in the new style, the corresponding field
- * in this style will be overwritten.
- * @param TStyle the new style
- */
- public function copyFrom($style)
- {
- parent::copyFrom($style);
- if($style instanceof TWizardNavigationButtonStyle)
- {
- if($this->_imageUrl===null && $style->_imageUrl!==null)
- $this->_imageUrl=$style->_imageUrl;
- if($this->_buttonText===null && $style->_buttonText!==null)
- $this->_buttonText=$style->_buttonText;
- if($this->_buttonType===null && $style->_buttonType!==null)
- $this->_buttonType=$style->_buttonType;
- }
- }
-
- /**
- * Merges the style with a new one.
- * If a style field is not set in this style, it will be overwritten by
- * the new one.
- * @param TStyle the new style
- */
- public function mergeWith($style)
- {
- parent::mergeWith($style);
- if($style instanceof TWizardNavigationButtonStyle)
- {
- if($style->_imageUrl!==null)
- $this->_imageUrl=$style->_imageUrl;
- if($style->_buttonText!==null)
- $this->_buttonText=$style->_buttonText;
- if($style->_buttonType!==null)
- $this->_buttonType=$style->_buttonType;
- }
- }
-
- /**
- * @return string image URL for the image button
- */
- public function getImageUrl()
- {
- return $this->_imageUrl===null?'':$this->_imageUrl;
- }
-
- /**
- * @param string image URL for the image button
- */
- public function setImageUrl($value)
- {
- $this->_imageUrl=$value;
- }
-
- /**
- * @return string button caption
- */
- public function getButtonText()
- {
- return $this->_buttonText===null?'':$this->_buttonText;
- }
-
- /**
- * @param string button caption
- */
- public function setButtonText($value)
- {
- $this->_buttonText=$value;
- }
-
- /**
- * @return TWizardNavigationButtonType button type. Default to TWizardNavigationButtonType::Button.
- */
- public function getButtonType()
- {
- return $this->_buttonType===null? TWizardNavigationButtonType::Button :$this->_buttonType;
- }
-
- /**
- * @param TWizardNavigationButtonType button type.
- */
- public function setButtonType($value)
- {
- $this->_buttonType=TPropertyValue::ensureEnum($value,'TWizardNavigationButtonType');
- }
-
- /**
- * Applies this style to the specified button
- * @param mixed button to be applied with this style
- */
- public function apply($button)
- {
- if($button instanceof TImageButton)
- {
- if($button->getImageUrl()==='')
- $button->setImageUrl($this->getImageUrl());
- }
- if($button->getText()==='')
- $button->setText($this->getButtonText());
- $button->getStyle()->mergeWith($this);
- }
-}
/**
* TWizardStep class.
diff --git a/framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php b/framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php
new file mode 100644
index 00000000..6da27aa8
--- /dev/null
+++ b/framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php
@@ -0,0 +1,156 @@
+<?php
+/**
+ * TWizardNavigationButtonStyle class file.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2005-2007 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @version $Id $
+ * @package System.Web.UI.WebControls
+ */
+
+/**
+ * Includes TStyle class file
+ */
+Prado::using('System.Web.UI.WebControls.TStyle');
+
+/**
+ * TWizardNavigationButtonStyle class.
+ * TWizardNavigationButtonStyle defines the style applied to a wizard navigation button.
+ * The button type can be specified via {@link setButtonType ButtonType}, which
+ * can be 'Button', 'Image' or 'Link'.
+ * If the button is an image button, {@link setImageUrl ImageUrl} will be
+ * used to load the image for the button.
+ * Otherwise, {@link setButtonText ButtonText} will be displayed as the button caption.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @version $Id: TWizard.php 1574 2006-12-15 16:09:53Z xue $
+ * @package System.Web.UI.WebControls
+ * @since 3.0
+ */
+class TWizardNavigationButtonStyle extends TStyle
+{
+ private $_imageUrl=null;
+ private $_buttonText=null;
+ private $_buttonType=null;
+
+ /**
+ * Sets the style attributes to default values.
+ * This method overrides the parent implementation by
+ * resetting additional TWizardNavigationButtonStyle specific attributes.
+ */
+ public function reset()
+ {
+ parent::reset();
+ $this->_imageUrl=null;
+ $this->_buttonText=null;
+ $this->_buttonType=null;
+ }
+
+ /**
+ * Copies the fields in a new style to this style.
+ * If a style field is set in the new style, the corresponding field
+ * in this style will be overwritten.
+ * @param TStyle the new style
+ */
+ public function copyFrom($style)
+ {
+ parent::copyFrom($style);
+ if($style instanceof TWizardNavigationButtonStyle)
+ {
+ if($this->_imageUrl===null && $style->_imageUrl!==null)
+ $this->_imageUrl=$style->_imageUrl;
+ if($this->_buttonText===null && $style->_buttonText!==null)
+ $this->_buttonText=$style->_buttonText;
+ if($this->_buttonType===null && $style->_buttonType!==null)
+ $this->_buttonType=$style->_buttonType;
+ }
+ }
+
+ /**
+ * Merges the style with a new one.
+ * If a style field is not set in this style, it will be overwritten by
+ * the new one.
+ * @param TStyle the new style
+ */
+ public function mergeWith($style)
+ {
+ parent::mergeWith($style);
+ if($style instanceof TWizardNavigationButtonStyle)
+ {
+ if($style->_imageUrl!==null)
+ $this->_imageUrl=$style->_imageUrl;
+ if($style->_buttonText!==null)
+ $this->_buttonText=$style->_buttonText;
+ if($style->_buttonType!==null)
+ $this->_buttonType=$style->_buttonType;
+ }
+ }
+
+ /**
+ * @return string image URL for the image button
+ */
+ public function getImageUrl()
+ {
+ return $this->_imageUrl===null?'':$this->_imageUrl;
+ }
+
+ /**
+ * @param string image URL for the image button
+ */
+ public function setImageUrl($value)
+ {
+ $this->_imageUrl=$value;
+ }
+
+ /**
+ * @return string button caption
+ */
+ public function getButtonText()
+ {
+ return $this->_buttonText===null?'':$this->_buttonText;
+ }
+
+ /**
+ * @param string button caption
+ */
+ public function setButtonText($value)
+ {
+ $this->_buttonText=$value;
+ }
+
+ /**
+ * @return TWizardNavigationButtonType button type. Default to TWizardNavigationButtonType::Button.
+ */
+ public function getButtonType()
+ {
+ return $this->_buttonType===null? TWizardNavigationButtonType::Button :$this->_buttonType;
+ }
+
+ /**
+ * @param TWizardNavigationButtonType button type.
+ */
+ public function setButtonType($value)
+ {
+ $this->_buttonType=TPropertyValue::ensureEnum($value,'TWizardNavigationButtonType');
+ }
+
+ /**
+ * Applies this style to the specified button
+ * @param mixed button to be applied with this style
+ */
+ public function apply($button)
+ {
+ if($button instanceof TImageButton)
+ {
+ if($button->getImageUrl()==='')
+ $button->setImageUrl($this->getImageUrl());
+ }
+ if($button->getText()==='')
+ $button->setText($this->getButtonText());
+ $button->getStyle()->mergeWith($this);
+ }
+}
+
+?> \ No newline at end of file