From 0f332e6564ed67ef7eb4d715ce3bcb5ff54c50cf Mon Sep 17 00:00:00 2001 From: Ciro Mattia Gonano Date: Wed, 24 Jul 2013 12:22:49 +0200 Subject: Upgrade to newly released 3.2.2 --- framework/Web/UI/WebControls/THyperLink.php | 31 ++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'framework/Web/UI/WebControls/THyperLink.php') diff --git a/framework/Web/UI/WebControls/THyperLink.php b/framework/Web/UI/WebControls/THyperLink.php index bc6c3642..56aa5391 100644 --- a/framework/Web/UI/WebControls/THyperLink.php +++ b/framework/Web/UI/WebControls/THyperLink.php @@ -6,7 +6,7 @@ * @link http://www.xisc.com/ * @copyright Copyright © 2005-2013 PradoSoft * @license http://www.opensource.org/licenses/bsd-license.php BSD License - * @version $Id: THyperLink.php 3245 2013-01-07 20:23:32Z ctrlaltca $ + * @version $Id: THyperLink.php 3286 2013-04-18 06:09:19Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -17,13 +17,16 @@ * via the {@link setNavigateUrl NavigateUrl} property, and link text is via * the {@link setText Text} property. It is also possible to display an image * by setting the {@link setImageUrl ImageUrl} property. In this case, - * {@link getText Text} is displayed as the alternate text of the image. + * the alignment of the image displayed is set by the + * {@link setImageAlign ImageAlign} property and {@link getText Text} is + * displayed as the alternate text of the image. + * * The link target is specified via the {@link setTarget Target} property. * If both {@link getImageUrl ImageUrl} and {@link getText Text} are empty, * the content enclosed within the control tag will be rendered. * * @author Qiang Xue - * @version $Id: THyperLink.php 3245 2013-01-07 20:23:32Z ctrlaltca $ + * @version $Id: THyperLink.php 3286 2013-04-18 06:09:19Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -92,6 +95,8 @@ class THyperLink extends TWebControl implements IDataRenderer $image->setToolTip($toolTip); if(($text=$this->getText())!=='') $image->setAlternateText($text); + if(($align=$this->getImageAlign())!=='') + $image->setImageAlign($align); $image->setBorderWidth('0'); return $image; } @@ -113,6 +118,26 @@ class THyperLink extends TWebControl implements IDataRenderer $this->setViewState('Text',$value,''); } + /** + * @return string the alignment of the image with respective to other elements on the page, defaults to empty. + */ + public function getImageAlign() + { + return $this->getViewState('ImageAlign',''); + } + + /** + * Sets the alignment of the image with respective to other elements on the page. + * Possible values include: absbottom, absmiddle, baseline, bottom, left, + * middle, right, texttop, and top. If an empty string is passed in, + * imagealign attribute will not be rendered. + * @param string the alignment of the image + */ + public function setImageAlign($value) + { + $this->setViewState('ImageAlign',$value,''); + } + /** * @return string height of the image in the THyperLink */ -- cgit v1.2.3