diff --git a/.gitignore b/.gitignore index 93cbf3f59..f5479d198 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,5 @@ bin/coveralls bin/dbunit.php #OSX -.DS_Store \ No newline at end of file +.DS_Store +bin/dbunit diff --git a/.travis.yml b/.travis.yml index f9d65a829..b6badb3d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,10 +9,9 @@ before_script: - composer self-update - composer install --prefer-source --dev - export PATH=./bin/:$PATH - - phpenv config-add travis.php.ini script: - - ./bin/phing coverage + - bash -c 'if [ "$TRAVIS_PHP_VERSION" == "5.3" ]; then phing test; else phing coverage ; fi;' after_script: - - php ./bin/coveralls -v \ No newline at end of file + - php ./bin/coveralls -v diff --git a/COPYRIGHT b/COPYRIGHT index daa3d02cc..4d7a65d83 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,7 +1,7 @@ The PRADO framework and the included demos are free software. They are released under the terms of the following BSD License. -Copyright 2004-2013, The PRADO Group (http://www.pradosoft.com) +Copyright 2004-2014, The PRADO Group (http://www.pradosoft.com) All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/HISTORY b/HISTORY index ef7b7d60f..4ba7d972e 100644 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,30 @@ +Version 3.2.4 Aug 26, 2014 + +BUG: Issue #492 - Prado generates json_error when encoding an exception with non UTF-8 data (david0) +ENH: Issue #494 - Adding toArray() and toJSON() to TActiveRecord (dmarko484) +BUG: Issue #498 - Typo in TActiveFileUpload (Jens-mB) +BUG: Issue #499 - Avoid scrolling when calling TControl::focus() (david0) +BUG: Issue #502 - TSlider behaves strangely in TTabView (ctrlaltca) +BUG: Issue #504 - Default Button cannot be referenced by . (ctrlaltca) +BUG: Issue #506 - Unused lines of code in TLiteralColumn::initializeCell (cross) +BUG: Issue #511 - TActivePager's ButtonCssClass property is not rendered in buttons (ctrlaltca) +BUG: Issue #515 - THtmlArea should override Readonly property (ctrlaltca) +BUG: Issue #516 - Check Validators in TActiveEditCommandColumn (ctrlaltca) +BUG: Issue #517 - TXmlDocument adjustment (gnit) +BUG: Issue #518 - Runtime Notice in Gettext::factory() (ctrlaltca) +BUG: Issue #519 - For MySQL in case PDO::CASE_LOWER creating table info does not work (ganiuszka) +BUG: Issue #246 - Refix: User date() instead of gmdate() in TLogRoute (drigolin) +BUG: Issue #520 - Unknown runtime error with Internet Explorer 8 (david0) +BUG: Issue #524 - JSON error (5): Malformed UTF-8 characters when encoding callback response (david0) +BUG: Issue #526 - TJsonRpcProtocol::callMethod, requested method is called twice (jojoinside) +BUG: Issue #527 - TJsonRpcProtocol::callMethod, semicolon must be removed (jojoinside) +ENH: Ported tests to Selenium2 +BUG: Avoid an exception loop on callback error when headers have already been sent (ctrlaltca) +BUG: Avoid rendering EOS; - + exit(); } } - + /** * @return string the path where the uploaded file will be stored temporarily, in namespace format * default "Application.runtime.*" @@ -140,7 +138,7 @@ public function onFileUpload($param) public function getTempPath(){ return $this->getViewState('TempPath', 'Application.runtime.*'); } - + /** * @param string the path where the uploaded file will be stored temporarily in namespace format * default "Application.runtime.*" @@ -148,7 +146,7 @@ public function getTempPath(){ public function setTempPath($value){ $this->setViewState('TempPath',$value,'Application.runtime.*'); } - + /** * @return boolean a value indicating whether an automatic callback to the server will occur whenever the user modifies the text in the TTextBox control and then tabs out of the component. Defaults to true. * Note: When set to false, you will need to trigger the callback yourself. @@ -156,7 +154,7 @@ public function setTempPath($value){ public function getAutoPostBack(){ return $this->getViewState('AutoPostBack', true); } - + /** * @param boolean a value indicating whether an automatic callback to the server will occur whenever the user modifies the text in the TTextBox control and then tabs out of the component. Defaults to true. * Note: When set to false, you will need to trigger the callback yourself. @@ -164,49 +162,49 @@ public function getAutoPostBack(){ public function setAutoPostBack($value){ $this->setViewState('AutoPostBack',TPropertyValue::ensureBoolean($value),true); } - + /** * @return string A chuck of javascript that will need to be called if {{@link getAutoPostBack AutoPostBack} is set to false} - */ + */ public function getCallbackJavascript(){ return "Prado.WebUI.TActiveFileUpload.fileChanged(\"{$this->getClientID()}\")"; } - + /** * @throws TInvalidDataValueException if the {@link getTempPath TempPath} is not writable. */ public function onInit($sender){ parent::onInit($sender); - + if (!Prado::getApplication()->getCache()) if (!Prado::getApplication()->getSecurityManager()) throw new Exception('TActiveFileUpload needs either an application level cache or a security manager to work securely'); - + if (!is_writable(Prado::getPathOfNamespace($this->getTempPath()))){ throw new TInvalidDataValueException("activefileupload_temppath_invalid", $this->getTempPath()); } } - + /** * Raises OnFileUpload event. - * - * This method is required by {@link ICallbackEventHandler} interface. + * + * This method is required by {@link ICallbackEventHandler} interface. * This method is mainly used by framework and control developers. * @param TCallbackEventParameter the event parameter */ public function raiseCallbackEvent($param){ $cp = $param->getCallbackParameter(); if ($key = $cp->targetID == $this->_target->getUniqueID()){ - + $params = $this->popParamsByToken($cp->callbackToken); - + $_FILES[$key]['name'] = $params->fileName; $_FILES[$key]['size'] = intval($params->fileSize); $_FILES[$key]['type'] = $params->fileType; $_FILES[$key]['error'] = intval($params->errorCode); $_FILES[$key]['tmp_name'] = $params->localName; $this->loadPostData($key, null); - + $this->raiseEvent('OnFileUpload', $this, $param); } } @@ -220,7 +218,7 @@ public function raisePostDataChangedEvent() { $this->onFileUpload($this->getPage()->getRequest()->itemAt('TActiveFileUpload_TargetId')); } - + protected function pushParamsAndGetToken(TActiveFileUploadCallbackParams $params) { if ($cache = Prado::getApplication()->getCache()) @@ -237,10 +235,10 @@ protected function pushParamsAndGetToken(TActiveFileUploadCallbackParams $params } else throw new Exception('TActiveFileUpload needs either an application level cache or a security manager to work securely'); - + return $token; } - + protected function popParamsByToken($token) { if ($cache = Prado::getApplication()->getCache()) @@ -260,7 +258,7 @@ protected function popParamsByToken($token) throw new Exception('TActiveFileUpload needs either an application level cache or a security manager to work securely'); assert($params instanceof TActiveFileUploadCallbackParams); - + return $params; } @@ -277,14 +275,14 @@ public function onPreRender($param) $this->_errorCode = UPLOAD_ERR_FORM_SIZE; $localName = str_replace('\\', '/', tempnam(Prado::getPathOfNamespace($this->getTempPath()),'')); $fileName = addslashes($this->getFileName()); - + $params = new TActiveFileUploadCallbackParams; $params->localName = $localName; $params->fileName = $fileName; $params->fileSize = $this->getFileSize(); $params->fileType = $this->getFileType(); $params->errorCode = $this->getErrorCode(); - + echo << Options = new Object(); @@ -295,35 +293,35 @@ public function onPreRender($param) Options.fileType = '{$params->fileType}'; Options.errorCode = '{$params->errorCode}'; Options.callbackToken = '{$this->pushParamsAndGetToken($params)}'; - parent.Prado.WebUI.TactiveFileUpload.onFileUpload(Options); + parent.Prado.WebUI.TActiveFileUpload.onFileUpload(Options); EOS; } } - + public function createChildControls(){ $this->_flag = Prado::createComponent('THiddenField'); $this->_flag->setID('Flag'); $this->getControls()->add($this->_flag); - + $this->_busy = Prado::createComponent('TImage'); $this->_busy->setID('Busy'); $this->_busy->setImageUrl($this->getAssetUrl('ActiveFileUploadIndicator.gif')); $this->_busy->setStyle("display:none"); $this->getControls()->add($this->_busy); - + $this->_success = Prado::createComponent('TImage'); $this->_success->setID('Success'); $this->_success->setImageUrl($this->getAssetUrl('ActiveFileUploadComplete.png')); $this->_success->setStyle("display:none"); $this->getControls()->add($this->_success); - + $this->_error = Prado::createComponent('TImage'); $this->_error->setID('Error'); $this->_error->setImageUrl($this->getAssetUrl('ActiveFileUploadError.png')); $this->_error->setStyle("display:none"); $this->getControls()->add($this->_error); - + $this->_target = Prado::createComponent('TInlineFrame'); $this->_target->setID('Target'); $this->_target->setFrameUrl($this->getAssetUrl('ActiveFileUploadBlank.html')); @@ -331,14 +329,14 @@ public function createChildControls(){ $this->_target->setShowBorder(false); $this->getControls()->add($this->_target); } - - + + /** - * Removes localfile on ending of the callback. + * Removes localfile on ending of the callback. */ public function onUnload($param){ - if ($this->getPage()->getIsCallback() && - $this->getHasFile() && + if ($this->getPage()->getIsCallback() && + $this->getHasFile() && file_exists($this->getLocalName())){ unlink($this->getLocalName()); } @@ -367,7 +365,7 @@ public function getClientSide() public function addAttributesToRender($writer){ parent::addAttributesToRender($writer); $writer->addAttribute('id',$this->getClientID()); - + $this->getPage()->getClientScript()->registerPradoScript('activefileupload'); $this->getActiveControl()->registerCallbackClientScript($this->getClientClassName(),$this->getClientOptions()); } @@ -392,7 +390,7 @@ protected function getClientClassName(){ protected function getClientOptions(){ $options['ID'] = $this->getClientID(); $options['EventTarget'] = $this->getUniqueID(); - + $options['inputID'] = $this->getClientID(); $options['flagID'] = $this->_flag->getClientID(); $options['targetID'] = $this->_target->getUniqueID(); @@ -422,25 +420,25 @@ public function saveAs($fileName,$deleteTempFile=true){ } /** - * @return TImage the image displayed when an upload + * @return TImage the image displayed when an upload * completes successfully. */ public function getSuccessImage(){ $this->ensureChildControls(); return $this->_success; } - + /** - * @return TImage the image displayed when an upload + * @return TImage the image displayed when an upload * does not complete successfully. */ public function getErrorImage(){ $this->ensureChildControls(); return $this->_error; } - + /** - * @return TImage the image displayed when an upload + * @return TImage the image displayed when an upload * is in progress. */ public function getBusyImage(){ @@ -451,10 +449,9 @@ public function getBusyImage(){ /** * TActiveFileUploadCallbackParams is an internal class used by {@link TActiveFileUpload}. - * + * * @author Bradley Booms * @author Christophe Boulain - * @version $Id: TActiveFileUpload.php 3232 2013-01-02 14:42:24Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ class TActiveFileUploadCallbackParams diff --git a/framework/Web/UI/ActiveControls/TActiveHiddenField.php b/framework/Web/UI/ActiveControls/TActiveHiddenField.php index 0d4b3737e..28be574ab 100644 --- a/framework/Web/UI/ActiveControls/TActiveHiddenField.php +++ b/framework/Web/UI/ActiveControls/TActiveHiddenField.php @@ -4,7 +4,7 @@ * * @author Carl G. Mathisen * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ * @package System.Web.UI.ActiveControls diff --git a/framework/Web/UI/ActiveControls/TActiveHyperLink.php b/framework/Web/UI/ActiveControls/TActiveHyperLink.php index 6ba8a8015..13161eecd 100644 --- a/framework/Web/UI/ActiveControls/TActiveHyperLink.php +++ b/framework/Web/UI/ActiveControls/TActiveHyperLink.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActiveHyperLink.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -21,7 +20,6 @@ * {@link setNavigateUrl NavigateUrl} and {@link setTarget Target}. * * @author Wei Zhuo - * @version $Id: TActiveHyperLink.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TActiveImage.php b/framework/Web/UI/ActiveControls/TActiveImage.php index 752c7a045..27ec337e8 100644 --- a/framework/Web/UI/ActiveControls/TActiveImage.php +++ b/framework/Web/UI/ActiveControls/TActiveImage.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActiveImage.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -19,7 +18,6 @@ * a callback request. * * @author Wei Zhuo - * @version $Id: TActiveImage.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TActiveImageButton.php b/framework/Web/UI/ActiveControls/TActiveImageButton.php index b2aa99605..e8f1d0548 100644 --- a/framework/Web/UI/ActiveControls/TActiveImageButton.php +++ b/framework/Web/UI/ActiveControls/TActiveImageButton.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActiveImageButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -21,7 +20,6 @@ * and it is raise after the {@link onClick OnClick} event. * * @author Wei Zhuo - * @version $Id: TActiveImageButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TActiveLabel.php b/framework/Web/UI/ActiveControls/TActiveLabel.php index 4fd19a56e..0a20e2b06 100644 --- a/framework/Web/UI/ActiveControls/TActiveLabel.php +++ b/framework/Web/UI/ActiveControls/TActiveLabel.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActiveLabel.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -26,7 +25,6 @@ * the client-side "for" attribute on the label. * * @author Wei Zhuo - * @version $Id: TActiveLabel.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TActiveLinkButton.php b/framework/Web/UI/ActiveControls/TActiveLinkButton.php index d8a8ffcbf..304d1cef9 100644 --- a/framework/Web/UI/ActiveControls/TActiveLinkButton.php +++ b/framework/Web/UI/ActiveControls/TActiveLinkButton.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActiveLinkButton.php 3292 2013-05-31 08:51:42Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -29,7 +28,6 @@ * will update the link text upon callback response completion. * * @author Wei Zhuo - * @version $Id: TActiveLinkButton.php 3292 2013-05-31 08:51:42Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -145,7 +143,7 @@ public function setEnabled($value) $this->getClientClassName(), $this->getPostBackOptions()); } else { - $this->getPage()->getCallbackClient()->setAttribute($this, 'href', false); + $this->getPage()->getCallbackClient()->setAttribute($this, 'href', false); } } } diff --git a/framework/Web/UI/ActiveControls/TActiveListBox.php b/framework/Web/UI/ActiveControls/TActiveListBox.php index dfb4bf6e3..36335cf60 100644 --- a/framework/Web/UI/ActiveControls/TActiveListBox.php +++ b/framework/Web/UI/ActiveControls/TActiveListBox.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActiveListBox.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -21,7 +20,6 @@ * List items can be added dynamically during a callback request. * * @author Wei Zhuo - * @version $Id: TActiveListBox.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TActiveListControlAdapter.php b/framework/Web/UI/ActiveControls/TActiveListControlAdapter.php index e48b93648..ca88477da 100644 --- a/framework/Web/UI/ActiveControls/TActiveListControlAdapter.php +++ b/framework/Web/UI/ActiveControls/TActiveListControlAdapter.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActiveListControlAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -23,7 +22,6 @@ * during callback response. * * @author Wei Zhuo - * @version $Id: TActiveListControlAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -170,7 +168,6 @@ public function updateListItems() * repopulate the client-side options. * * @author Wei Zhuo - * @version $Id: TActiveListControlAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TActivePageAdapter.php b/framework/Web/UI/ActiveControls/TActivePageAdapter.php index 03fe2f169..cc32376a7 100644 --- a/framework/Web/UI/ActiveControls/TActivePageAdapter.php +++ b/framework/Web/UI/ActiveControls/TActivePageAdapter.php @@ -5,9 +5,8 @@ * @author Wei Zhuo * @author Gabor Berczi (lazyload additions & progressive rendering) * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActivePageAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -25,7 +24,6 @@ * * @author Wei Zhuo * @author Gabor Berczi (lazyload additions & progressive rendering) - * @version $Id: TActivePageAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -150,7 +148,6 @@ protected function redirect($url) { Prado::trace("ActivePage redirect()",'System.Web.UI.ActiveControls.TActivePageAdapter'); $this->appendContentPart($this->getResponse(), self::CALLBACK_REDIRECT, $url); - //$this->getResponse()->appendHeader(self::CALLBACK_REDIRECT.': '.$url); } /** @@ -176,7 +173,6 @@ protected function renderResponse($writer) $data = TJavaScript::jsonEncode($responseData); $this->appendContentPart($response, self::CALLBACK_DATA_HEADER, $data); - //$response->appendHeader(self::CALLBACK_DATA_HEADER.': '.$data); } } @@ -187,7 +183,6 @@ protected function renderResponse($writer) { $pagestate = $this->getPage()->getClientState(); $this->appendContentPart($response, self::CALLBACK_PAGESTATE_HEADER, $pagestate); - //$response->appendHeader(self::CALLBACK_PAGESTATE_HEADER.': '.$pagestate); } } @@ -206,7 +201,6 @@ protected function renderResponse($writer) $executeJavascript = $this->getCallbackClientHandler()->getClientFunctionsToExecute(); $actions = TJavaScript::jsonEncode($executeJavascript); $this->appendContentPart($response, self::CALLBACK_ACTION_HEADER, $actions); - //$response->appendHeader(self::CALLBACK_ACTION_HEADER.': '.$actions); $cs = $this->Page->getClientScript(); @@ -296,7 +290,7 @@ public function setCallbackEventTarget(TControl $control) } /** - * Gets callback parameter. JSON encoding is assumed. + * Gets callback parameter. * @return string postback event parameter */ public function getCallbackEventParameter() @@ -304,8 +298,7 @@ public function getCallbackEventParameter() if($this->_callbackEventParameter===null) { $param = $this->getRequest()->itemAt(TPage::FIELD_CALLBACK_PARAMETER); - if(strlen($param) > 0) - $this->_callbackEventParameter=TJavaScript::jsonDecode((string)$param); + $this->_callbackEventParameter=$param; } return $this->_callbackEventParameter; } @@ -340,7 +333,6 @@ public function getCallbackClientHandler() * the error stack trace. * * @author Wei Zhuo - * @version $Id: TActivePageAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -357,14 +349,22 @@ protected function displayException($exception) { $response = $this->getApplication()->getResponse(); $trace = $this->getExceptionStackTrace($exception); + // avoid error on non-utf8 strings try { $trace = TJavaScript::jsonEncode($trace); } catch (Exception $e) { // strip everythin not 7bit ascii $trace = preg_replace('/[^(\x20-\x7F)]*/','', serialize($trace)); } - $response->setStatusCode(500, 'Internal Server Error'); - $response->appendHeader(TActivePageAdapter::CALLBACK_ERROR_HEADER.': '.$trace); + + // avoid exception loop if headers have already been sent + try { + $response->setStatusCode(500, 'Internal Server Error'); + } catch (Exception $e) { } + + $content = $response->createHtmlWriter(); + $content->getWriter()->setBoundary(TActivePageAdapter::CALLBACK_ERROR_HEADER); + $content->write($trace); } else { @@ -406,7 +406,6 @@ private function getExceptionStackTrace($exception) * TInvalidCallbackException class. * * @author Wei Zhuo - * @version $Id: TActivePageAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TActivePager.php b/framework/Web/UI/ActiveControls/TActivePager.php index 7dcd32129..078bd5bed 100644 --- a/framework/Web/UI/ActiveControls/TActivePager.php +++ b/framework/Web/UI/ActiveControls/TActivePager.php @@ -4,9 +4,8 @@ * * @author "gevik" (forum contributor) and Christophe Boulain (Christophe.Boulain@gmail.com) * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActivePager.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -17,15 +16,14 @@ /** * TActivePager is the active control counter part of TPager. - * + * * When a page change is requested, TActivePager raises a callback instead of the * traditional postback. * * The {@link onCallback OnCallback} event is raised during a callback request * and it is raise after the {@link onPageIndexChanged OnPageIndexChanged} event. - * + * * @author "gevik" (forum contributor) and Christophe Boulain (Christophe.Boulain@gmail.com) - * @version $Id: TActivePager.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1.2 */ @@ -41,7 +39,7 @@ public function __construct() parent::__construct(); $this->setAdapter(new TActiveControlAdapter($this)); } - + /** * @return TBaseActiveControl standard active control options. */ @@ -60,11 +58,11 @@ public function getClientSide() /** * Raises the callback event. This method is required by {@link - * ICallbackEventHandler} interface. + * ICallbackEventHandler} interface. * This method is mainly used by framework and control developers. * @param TCallbackEventParameter the event parameter */ - + public function raiseCallbackEvent($param) { $this->onCallback($param); @@ -82,7 +80,7 @@ public function onCallback($param) { $this->raiseEvent('OnCallback', $this, $param); } - + /** * Builds a dropdown list pager * Override parent implementation to build Active dropdown lists. @@ -90,25 +88,25 @@ public function onCallback($param) protected function buildListPager() { $list=new TActiveDropDownList; - + $list->getAdapter()->getBaseActiveControl()->setClientSide( $this->getClientSide() ); - + $this->getControls()->add($list); $list->setDataSource(range(1,$this->getPageCount())); $list->dataBind(); $list->setSelectedIndex($this->getCurrentPageIndex()); $list->setAutoPostBack(true); $list->attachEventHandler('OnSelectedIndexChanged',array($this,'listIndexChanged')); - $list->attachEventHandler('OnCallback', array($this, 'handleCallback')); - } - + $list->attachEventHandler('OnCallback', array($this, 'handleCallback')); + } + /** * Creates a pager button. * Override parent implementation to create, depending on the button type, a TActiveLinkButton, * a TActiveButton or a TActiveImageButton may be created. - * + * * @param string button type, either LinkButton or PushButton * @param boolean whether the button should be enabled * @param string caption of the button @@ -126,6 +124,7 @@ protected function createPagerButton($buttonType,$enabled,$text,$commandName,$co { $button=new TLabel; $button->setText($text); + $button->setCssClass($this->getButtonCssClass()); return $button; } } @@ -144,28 +143,29 @@ protected function createPagerButton($buttonType,$enabled,$text,$commandName,$co if(!$enabled) $button->setEnabled(false); } - + if($buttonType===TPagerButtonType::ImageButton) { $button->ImageUrl = $text; } - + $button->setText($text); $button->setCommandName($commandName); $button->setCommandParameter($commandParameter); $button->setCausesValidation(false); - - $button->attachEventHandler('OnCallback', array($this, 'handleCallback')); + $button->setCssClass($this->getButtonCssClass()); + + $button->attachEventHandler('OnCallback', array($this, 'handleCallback')); $button->getAdapter()->getBaseActiveControl()->setClientSide( $this->getClientSide() ); - + return $button; } - + /** * Event handler to the OnCallback active buttons or active dropdownlist. - * This handler will raise the {@link onCallback OnCallback} event + * This handler will raise the {@link onCallback OnCallback} event * * @param mixed $sender * @param TCallbackEventParameter $param @@ -181,14 +181,14 @@ public function handleCallback ($sender,$param) { $control->render($param->getNewWriter()); // FIXME : With some very fast machine, the getNewWriter() consecutive calls are in the same microsecond, resulting - // of getting the same boundaries in ajax response. Wait 1 microsecond to avoid this. + // of getting the same boundaries in ajax response. Wait 1 microsecond to avoid this. usleep(1); } } // Raise callback event $this->onCallback($param); - } - + } + public function render ($writer) { if($this->getHasPreRendered()) diff --git a/framework/Web/UI/ActiveControls/TActivePanel.php b/framework/Web/UI/ActiveControls/TActivePanel.php index 39636cad0..4b00b013c 100644 --- a/framework/Web/UI/ActiveControls/TActivePanel.php +++ b/framework/Web/UI/ActiveControls/TActivePanel.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActivePanel.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -32,7 +31,6 @@ * * * @author Wei Zhuo - * @version $Id: TActivePanel.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -87,7 +85,7 @@ public function render($writer) if ($this->getHasControls()) { // If we update a TActivePanel on callback, - // We shouldn't update all childs, because the whole content will be replaced by + // We shouldn't update all childs, because the whole content will be replaced by // the parent foreach ($this->findControlsByType('IActiveControl', false) as $control) { diff --git a/framework/Web/UI/ActiveControls/TActiveRadioButton.php b/framework/Web/UI/ActiveControls/TActiveRadioButton.php index d192536a7..46dbbaf7f 100644 --- a/framework/Web/UI/ActiveControls/TActiveRadioButton.php +++ b/framework/Web/UI/ActiveControls/TActiveRadioButton.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActiveRadioButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -25,7 +24,6 @@ * and can not be changed using javascript. * * @author Wei Zhuo - * @version $Id: TActiveRadioButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -121,7 +119,7 @@ protected function renderClientControlScript($writer) * Ensure that the ID attribute is rendered and registers the javascript code * for initializing the active control. * Since 3.1.4, the javascript code is not rendered if {@link setAutoPostBack AutoPostBack} is false - * + * */ protected function renderInputTag($writer,$clientID,$onclick) { diff --git a/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php b/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php index 3244ce11c..5c76aed10 100644 --- a/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php +++ b/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActiveRadioButtonList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -31,7 +30,6 @@ * List items can not be changed dynamically during a callback request. * * @author Wei Zhuo - * @version $Id: TActiveRadioButtonList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TActiveRatingList.php b/framework/Web/UI/ActiveControls/TActiveRatingList.php index 022efe653..2b1c764c1 100644 --- a/framework/Web/UI/ActiveControls/TActiveRatingList.php +++ b/framework/Web/UI/ActiveControls/TActiveRatingList.php @@ -5,7 +5,7 @@ * @author Wei Zhuo * @author Bradley Booms * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ * @package System.Web.UI.ActiveControls @@ -116,7 +116,7 @@ protected function callClientFunction($func,$value) public function setCaption($value) { parent::setCaption($value); - // if it's an active control, this should not be needed. + // if it's an active control, this should not be needed. $this->callClientFunction('setCaption',$value); } diff --git a/framework/Web/UI/ActiveControls/TActiveRepeater.php b/framework/Web/UI/ActiveControls/TActiveRepeater.php index 08e6f93ad..08aeefabb 100644 --- a/framework/Web/UI/ActiveControls/TActiveRepeater.php +++ b/framework/Web/UI/ActiveControls/TActiveRepeater.php @@ -5,7 +5,6 @@ * @author LANDWEHR Computer und Software GmbH * @package System.Web.UI.ActiveControls * @since 3.1.9 - * @version $Id: TActiveRepeater.php 2707 2009-09-29 10:33:30Z Christophe.Boulain $ */ /** diff --git a/framework/Web/UI/ActiveControls/TActiveTextBox.php b/framework/Web/UI/ActiveControls/TActiveTextBox.php index 5f96ff291..1b8791fd8 100644 --- a/framework/Web/UI/ActiveControls/TActiveTextBox.php +++ b/framework/Web/UI/ActiveControls/TActiveTextBox.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActiveTextBox.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -25,7 +24,6 @@ * event. * * @author Wei Zhuo - * @version $Id: TActiveTextBox.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TAutoComplete.php b/framework/Web/UI/ActiveControls/TAutoComplete.php index 5e1440401..88b98172f 100644 --- a/framework/Web/UI/ActiveControls/TAutoComplete.php +++ b/framework/Web/UI/ActiveControls/TAutoComplete.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TAutoComplete.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -77,7 +76,6 @@ * "informal" are ignored as text for suggestions. * * @author Wei Zhuo - * @version $Id: TAutoComplete.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -375,7 +373,6 @@ protected function getClientClassName() * suggestion selected by the user, -1 if not suggestion is selected. * * @author Wei Zhuo - * @version $Id: TAutoComplete.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -416,7 +413,6 @@ public function getToken() * item template. * * @author Wei Zhuo - * @version $Id: TAutoComplete.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TBaseActiveControl.php b/framework/Web/UI/ActiveControls/TBaseActiveControl.php index 61230719f..3c0a938e5 100644 --- a/framework/Web/UI/ActiveControls/TBaseActiveControl.php +++ b/framework/Web/UI/ActiveControls/TBaseActiveControl.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TBaseActiveControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -23,7 +22,6 @@ * response returns. * * @author Wei Zhuo - * @version $Id: TBaseActiveControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -155,7 +153,6 @@ public function canUpdateClientSide($bDontRequireVisibility=false) * * * @author Wei Zhuo - * @version $Id: TBaseActiveControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TCallback.php b/framework/Web/UI/ActiveControls/TCallback.php index 2c20567cb..557001b21 100644 --- a/framework/Web/UI/ActiveControls/TCallback.php +++ b/framework/Web/UI/ActiveControls/TCallback.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TCallback.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -37,7 +36,6 @@ * * * @author Wei Zhuo - * @version $Id: TCallback.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TCallbackClientScript.php b/framework/Web/UI/ActiveControls/TCallbackClientScript.php index 40051f768..5496470fe 100644 --- a/framework/Web/UI/ActiveControls/TCallbackClientScript.php +++ b/framework/Web/UI/ActiveControls/TCallbackClientScript.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TCallbackClientScript.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -28,7 +27,6 @@ * * * @author Wei Zhuo - * @version $Id: TCallbackClientScript.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -127,7 +125,7 @@ private function getSelectionControlIsListType($control) /** * Client script to click on an element. This client-side function is unpredictable. - * + * * @param TControl control element or element id */ public function click($control) @@ -182,14 +180,14 @@ public function setListItems($control, $items) { $promptText = $control->getPromptText(); $promptValue = $control->getPromptValue(); - + if($promptValue==='') $promptValue = $promptText; - + if($promptValue!=='') $options[] = array($promptText, $promptValue); } - + foreach($items as $item) { if($item->getHasAttributes()) @@ -301,6 +299,7 @@ public function removeCssClass($element, $cssClass) /** * Scroll the top of the browser viewing area to the location of the * element. + * * @param TControl control element or element id */ public function scrollTo($element) @@ -449,7 +448,7 @@ public function appendScriptBlock($content) { $boundary = $this->getResponseContentBoundary($content); } - + $this->callClientFunction('Prado.Element.appendScriptBlock', array($boundary)); } diff --git a/framework/Web/UI/ActiveControls/TCallbackClientSide.php b/framework/Web/UI/ActiveControls/TCallbackClientSide.php index ec993c149..449bea80a 100644 --- a/framework/Web/UI/ActiveControls/TCallbackClientSide.php +++ b/framework/Web/UI/ActiveControls/TCallbackClientSide.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TCallbackClientSide.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -28,8 +27,8 @@ * * * Note that theses 2 events are not fired correctly by Opera. To make * them work in this browser, Prado will fire them just after onPreDispatch. - * - * In a general way, onUninitialized, onLoading, onLoaded and onInteractive events + * + * In a general way, onUninitialized, onLoading, onLoaded and onInteractive events * are not implemented consistently in all browsers.When cross browser compatibility is * needed, it is best to avoid use them * @@ -46,7 +45,6 @@ * viewstate update. This will automatically set HasPriority to true when enabled. * * @author Wei Zhuo - * @version $Id: TCallbackClientSide.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TCallbackEventParameter.php b/framework/Web/UI/ActiveControls/TCallbackEventParameter.php index 728ebbbae..2d4451a81 100644 --- a/framework/Web/UI/ActiveControls/TCallbackEventParameter.php +++ b/framework/Web/UI/ActiveControls/TCallbackEventParameter.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ * @package System.Web.UI.ActiveControls @@ -28,7 +28,6 @@ * callback handler function) can be set using {@link setResponseData ResponseData} property. * * @author Wei Zhuo - * @version $Id: TActivePageAdapter.php 1648 2007-01-24 05:52:22Z wei $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TCallbackOptions.php b/framework/Web/UI/ActiveControls/TCallbackOptions.php index 19d53aeb8..0d929ed16 100644 --- a/framework/Web/UI/ActiveControls/TCallbackOptions.php +++ b/framework/Web/UI/ActiveControls/TCallbackOptions.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TCallbackOptions.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -17,7 +16,6 @@ * to be attached to other active controls. * * @author Wei Zhuo - * @version $Id: TCallbackOptions.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TCallbackResponseAdapter.php b/framework/Web/UI/ActiveControls/TCallbackResponseAdapter.php index 47b5fae47..cad3c9eeb 100755 --- a/framework/Web/UI/ActiveControls/TCallbackResponseAdapter.php +++ b/framework/Web/UI/ActiveControls/TCallbackResponseAdapter.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TCallbackResponseAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -22,7 +21,6 @@ * property. * * @author Wei Zhuo - * @version $Id: TCallbackResponseAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -110,7 +108,6 @@ public function getRedirectedUrl() * is generated using microtime. * * @author Wei Zhuo - * @version $Id: TCallbackResponseAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TDraggable.php b/framework/Web/UI/ActiveControls/TDraggable.php index df92bec5f..fe2ac4cc6 100755 --- a/framework/Web/UI/ActiveControls/TDraggable.php +++ b/framework/Web/UI/ActiveControls/TDraggable.php @@ -1,17 +1,16 @@ {@link setRevert Revert}: Set to True if you want your dragged element to revert to its initial position if not dropped on a valid area. * {@link setConstraint Constraint}: Set this to Horizontal or Vertical if you want to constraint your move in one direction. * {@link setHandle Handle}: - * + * * @author Christophe BOULAIN (Christophe.Boulain@gmail.com) * @copyright Copyright © 2008, PradoSoft * @license http://www.pradosoft.com/license * @package System.Web.UI.ActiveControls - * @version $Id: TDraggable.php 3285 2013-04-11 07:28:07Z ctrlaltca $ */ -class TDraggable extends TPanel +class TDraggable extends TPanel { /** * Set the handle id or css class @@ -38,7 +36,7 @@ public function setHandle ($value) { $this->setViewState('DragHandle', TPropertyValue::ensureString($value), null); } - + /** * Get the handle id or css class * @return string @@ -47,7 +45,7 @@ public function getHandle () { return $this->getViewState('DragHandle', null); } - + /** * Determine if draggable element should revert to it orginal position * upon release in an non-droppable container. @@ -61,7 +59,7 @@ public function getRevert() { return $this->getViewState('Revert', TDraggableRevertOptions::Revert); } - + /** * Sets whether the draggable element should revert to it orginal position * upon release in an non-droppable container. @@ -79,7 +77,7 @@ public function setRevert($value) $value=TDraggableRevertOptions::None; $this->setViewState('Revert', TPropertyValue::ensureEnum($value, 'TDraggableRevertOptions'), true); } - + /** * Determine if the element should be cloned when dragged * If true, Clones the element and drags the clone, leaving the original in place until the clone is dropped. @@ -96,7 +94,7 @@ public function getGhosting () { return $this->getViewState('Ghosting', TDraggableGhostingOptions::None); } - + /** * Sets wether the element should be cloned when dragged * If true, Clones the element and drags the clone, leaving the original in place until the clone is dropped. @@ -117,7 +115,7 @@ public function setGhosting ($value) $value=TDraggableGhostingOptions::None; $this->setViewState('Ghosting', TPropertyValue::ensureEnum($value, 'TDraggableGhostingOptions'), TDraggableGhostingOptions::None); } - + /** * Determine if the element should be constrainted in one direction or not * @return CDraggableConstraint @@ -126,7 +124,7 @@ public function getConstraint() { return $this->getViewState('Constraint', TDraggableConstraint::None); } - + /** * Set wether the element should be constrainted in one direction * @param CDraggableConstraint @@ -135,7 +133,7 @@ public function setConstraint($value) { $this->setViewState('Constraint', TPropertyValue::ensureEnum($value, 'TDraggableConstraint'), TDraggableConstraint::None); } - + /** * Registers clientscripts * @@ -166,7 +164,7 @@ protected function addAttributesToRender($writer) $code="new {$class}('{$this->getClientId()}', {$options}) "; $cs->registerEndScript(sprintf('%08X', crc32($code)), $code); } - + /** * Gets the name of the javascript class responsible for performing postback for this control. * This method overrides the parent implementation. @@ -176,7 +174,7 @@ protected function getClientClassName () { return 'Draggable'; } - + /** * Gets the post back options for this textbox. * @return array @@ -193,7 +191,7 @@ protected function getPostBackOptions() else $options['revert']=strtolower($revert); if (($constraint=$this->getConstraint())!==TDraggableConstraint::None) $options['constraint']=strtolower($constraint); - switch ($this->getGhosting()) + switch ($this->getGhosting()) { case TDraggableGhostingOptions::SuperGhosting: $options['superghosting']=true; @@ -205,7 +203,7 @@ protected function getPostBackOptions() return $options; } - + } /** @@ -213,7 +211,6 @@ protected function getPostBackOptions() * @copyright Copyright © 2008, PradoSoft * @license http://www.pradosoft.com/license * @package System.Web.UI.ActiveControls - * @version $Id: TDraggable.php 3285 2013-04-11 07:28:07Z ctrlaltca $ */ class TDraggableConstraint extends TEnumerable { @@ -227,7 +224,6 @@ class TDraggableConstraint extends TEnumerable * @copyright Copyright © 2008, PradoSoft * @license http://www.pradosoft.com/license * @package System.Web.UI.ActiveControls - * @version $Id: TDraggable.php 3285 2013-04-11 07:28:07Z ctrlaltca $ */ class TDraggableGhostingOptions extends TEnumerable { @@ -241,7 +237,6 @@ class TDraggableGhostingOptions extends TEnumerable * @copyright Copyright © 2008, PradoSoft * @license http://www.pradosoft.com/license * @package System.Web.UI.ActiveControls - * @version $Id: TDraggable.php 3285 2013-04-11 07:28:07Z ctrlaltca $ */ class TDraggableRevertOptions extends TEnumerable { diff --git a/framework/Web/UI/ActiveControls/TDropContainer.php b/framework/Web/UI/ActiveControls/TDropContainer.php index 43e8017c3..00ebf4611 100755 --- a/framework/Web/UI/ActiveControls/TDropContainer.php +++ b/framework/Web/UI/ActiveControls/TDropContainer.php @@ -5,9 +5,7 @@ * @author Christophe BOULAIN (Christophe.Boulain@gmail.com) * @copyright Copyright © 2008, PradoSoft * @license http://www.pradosoft.com/license - * @version $Id: TDropContainer.php 3159 2012-2013 PradoSoft * @license http://www.pradosoft.com/license - * @version $Id: TDropContainer.php 3285 2013-04-11 07:28:07Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -40,7 +38,6 @@ * @author Christophe BOULAIN (Christophe.Boulain@gmail.com) * @copyright Copyright © 2008, PradoSoft * @license http://www.pradosoft.com/license - * @version $Id: TDropContainer.php 3285 2013-04-11 07:28:07Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ class TDropContainer extends TPanel implements IActiveControl, ICallbackEventHandler @@ -258,7 +255,6 @@ public function render ($writer) * @author Christophe BOULAIN (Christophe.Boulain@ceram.fr) * @copyright Copyright © 2008, PradoSoft * @license http://www.pradosoft.com/license - * @version $Id: TDropContainer.php 3285 2013-04-11 07:28:07Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ class TDropContainerEventParameter extends TEventParameter diff --git a/framework/Web/UI/ActiveControls/TEventTriggeredCallback.php b/framework/Web/UI/ActiveControls/TEventTriggeredCallback.php index 4f1dbbf84..53d6aead1 100644 --- a/framework/Web/UI/ActiveControls/TEventTriggeredCallback.php +++ b/framework/Web/UI/ActiveControls/TEventTriggeredCallback.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TEventTriggeredCallback.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -22,7 +21,6 @@ * {@link setPreventDefaultAction PreventDefaultAction} is set to true. * * @author Wei Zhuo - * @version $Id: TEventTriggeredCallback.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TInPlaceTextBox.php b/framework/Web/UI/ActiveControls/TInPlaceTextBox.php index 5309b7e87..012f2da3f 100644 --- a/framework/Web/UI/ActiveControls/TInPlaceTextBox.php +++ b/framework/Web/UI/ActiveControls/TInPlaceTextBox.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TInPlaceTextBox.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -38,9 +37,8 @@ * * Since 3.1.2, you can set the {@link setReadOnly ReadOnly} property to make * the control not editable. This property can be also changed on callback - * + * * @author Wei Zhuo - * @version $Id: TInPlaceTextBox.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -145,7 +143,7 @@ public function setText($value) $client->setValue($this, $value); } } - + /** * Update ClientSide Readonly property * @param boolean value @@ -232,7 +230,7 @@ protected function getPostBackOptions() if($this->hasEventHandler('OnLoadingText')) $options['LoadTextOnEdit'] = true; - + $options['ReadOnly']=$this->getReadOnly(); return $options; } diff --git a/framework/Web/UI/ActiveControls/TTimeTriggeredCallback.php b/framework/Web/UI/ActiveControls/TTimeTriggeredCallback.php index 46df7a223..bc2505214 100644 --- a/framework/Web/UI/ActiveControls/TTimeTriggeredCallback.php +++ b/framework/Web/UI/ActiveControls/TTimeTriggeredCallback.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TTimeTriggeredCallback.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -26,7 +25,6 @@ * {@link setStartTimerOnLoad StartTimerOnLoad} is true. * * @author Wei Zhuo - * @version $Id: TTimeTriggeredCallback.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TTriggeredCallback.php b/framework/Web/UI/ActiveControls/TTriggeredCallback.php index 2365326bc..544707b04 100644 --- a/framework/Web/UI/ActiveControls/TTriggeredCallback.php +++ b/framework/Web/UI/ActiveControls/TTriggeredCallback.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TTriggeredCallback.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -18,7 +17,6 @@ * property sets the control ID to observe the trigger. * * @author Wei Zhuo - * @version $Id: TTriggeredCallback.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TValueTriggeredCallback.php b/framework/Web/UI/ActiveControls/TValueTriggeredCallback.php index e9db1bed8..0b323066c 100644 --- a/framework/Web/UI/ActiveControls/TValueTriggeredCallback.php +++ b/framework/Web/UI/ActiveControls/TValueTriggeredCallback.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TValueTriggeredCallback.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -25,7 +24,6 @@ * observed, the polling interval is reset to the original value. * * @author Wei Zhuo - * @version $Id: TValueTriggeredCallback.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/TCachePageStatePersister.php b/framework/Web/UI/TCachePageStatePersister.php index 4f3d60ccb..0914c650b 100644 --- a/framework/Web/UI/TCachePageStatePersister.php +++ b/framework/Web/UI/TCachePageStatePersister.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TCachePageStatePersister.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI */ @@ -54,7 +53,6 @@ * * * @author Qiang Xue - * @version $Id: TCachePageStatePersister.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.1.1 */ diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index ea828187f..cc59292a6 100644 --- a/framework/Web/UI/TClientScriptManager.php +++ b/framework/Web/UI/TClientScriptManager.php @@ -5,9 +5,8 @@ * @author Qiang Xue * @author Gabor Berczi (lazyload additions & progressive rendering) * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TClientScriptManager.php 3280 2013-03-13 20:19:30Z ctrlaltca $ * @package System.Web.UI */ @@ -18,7 +17,6 @@ * * @author Qiang Xue * @author Gabor Berczi (lazyload additions & progressive rendering) - * @version $Id: TClientScriptManager.php 3280 2013-03-13 20:19:30Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -150,7 +148,7 @@ protected function registerPradoScriptInternal($name) $this->_registeredPradoScripts[$name]=true; else throw new TInvalidOperationException('csmanager_pradoscript_invalid',$name); - + if(($packages=array_keys($this->_registeredPradoScripts))!==array()) { $base = Prado::getFrameworkPath().DIRECTORY_SEPARATOR.self::SCRIPT_PATH; @@ -347,7 +345,7 @@ public function registerFocusControl($target) if($target instanceof TControl) $target=$target->getClientID(); $id = TJavaScript::quoteString($target); - $this->_endScripts['prado:focus'] = 'new Effect.ScrollTo('.$id.'); Prado.Element.focus('.$id.');'; + $this->_endScripts['prado:focus'] = 'Prado.Element.focus('.$id.');'; $params=func_get_args(); $this->_page->registerCachingAction('Page.ClientScript','registerFocusControl',$params); @@ -369,7 +367,6 @@ public function registerFocusControl($target) * $this->Page->ClientScript->registerStyleSheetFile($url, $url); * } * } - * ?> * * * @param string a unique key identifying the file @@ -466,7 +463,7 @@ public function registerHeadScript($key,$script) public function registerScriptFile($key, $url) { $this->_scriptFiles[$key]=$url; - + $params=func_get_args(); $this->_page->registerCachingAction('Page.ClientScript','registerScriptFile',$params); } @@ -717,8 +714,11 @@ public function renderHiddenFieldsEnd($writer) */ public function flushScriptFiles($writer, $control=null) { - $this->_page->ensureRenderInForm($control); - $this->renderAllPendingScriptFiles($writer); + if(!$this->_page->getIsCallback()) + { + $this->_page->ensureRenderInForm($control); + $this->renderAllPendingScriptFiles($writer); + } } /** @@ -747,7 +747,7 @@ protected function renderHiddenFieldsInt($writer, $initial) $writer->write("
\n".$str."
\n"); } - public function getHiddenFields() + public function getHiddenFields() { return $this->_hiddenFields; } @@ -770,7 +770,6 @@ protected function checkIfNotInRender() * between ActiveControls and validators. * * @author - * @version $Id: TClientScriptManager.php 3280 2013-03-13 20:19:30Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ diff --git a/framework/Web/UI/TCompositeControl.php b/framework/Web/UI/TCompositeControl.php index 21e4c46ff..5a54271df 100644 --- a/framework/Web/UI/TCompositeControl.php +++ b/framework/Web/UI/TCompositeControl.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TCompositeControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI */ @@ -16,7 +15,6 @@ * by other controls. * * @author Qiang Xue - * @version $Id: TCompositeControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php index 5ee20d61d..3037a4d96 100644 --- a/framework/Web/UI/TControl.php +++ b/framework/Web/UI/TControl.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI */ @@ -64,7 +63,6 @@ * They work together with page lifecycles to process a page request. * * @author Qiang Xue - * @version $Id: TControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -1771,7 +1769,6 @@ private function fillNameTable($container,$controls) * controls to maintain a list of their child controls. * * @author Qiang Xue - * @version $Id: TControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -1856,7 +1853,6 @@ public function clear() * controls to it. This is useful for controls that do not allow child controls. * * @author Qiang Xue - * @version $Id: TControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -1889,7 +1885,6 @@ public function insertAt($index,$item) * INamingContainer marks a control as a naming container. * * @author Qiang Xue - * @version $Id: TControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -1903,7 +1898,6 @@ interface INamingContainer * If a control wants to respond to postback event, it must implement this interface. * * @author Qiang Xue - * @version $Id: TControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -1924,7 +1918,6 @@ public function raisePostBackEvent($param); * If a control wants to load post data, it must implement this interface. * * @author Qiang Xue - * @version $Id: TControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -1958,7 +1951,6 @@ public function getDataChanged(); * If a control wants to validate user input, it must implement this interface. * * @author Qiang Xue - * @version $Id: TControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -1996,7 +1988,6 @@ public function setErrorMessage($value); * If a control wants to be validated by a validator, it must implement this interface. * * @author Qiang Xue - * @version $Id: TControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -2022,7 +2013,6 @@ public function setIsValid($value); * If a control wants to check broadcast event, it must implement this interface. * * @author Qiang Xue - * @version $Id: TControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -2046,7 +2036,6 @@ public function broadcastEventReceived($sender,$param); * This interface must be implemented by theme. * * @author Qiang Xue - * @version $Id: TControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -2066,7 +2055,6 @@ public function applySkin($control); * parsed template structures. * * @author Qiang Xue - * @version $Id: TControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -2089,7 +2077,6 @@ public function instantiateIn($parent); * {@link TImageButton}. * * @author Qiang Xue - * @version $Id: TControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -2194,7 +2181,6 @@ public function getSurroundingTagID(); * {@link setParameter Parameter} property. * * @author Qiang Xue - * @version $Id: TControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -2256,7 +2242,6 @@ public function setParameter($value) * with the command via {@link getCommandParameter CommandParameter} property. * * @author Qiang Xue - * @version $Id: TControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -2301,7 +2286,6 @@ public function getCommandParameter() * consecutive static strings, expressions and statements. * * @author Qiang Xue - * @version $Id: TControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ diff --git a/framework/Web/UI/TControlAdapter.php b/framework/Web/UI/TControlAdapter.php index 1ef2d1fb0..2e89e5e7b 100644 --- a/framework/Web/UI/TControlAdapter.php +++ b/framework/Web/UI/TControlAdapter.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TControlAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI */ @@ -17,7 +16,6 @@ * various behaviors for the control to which the adapter is attached. * * @author Qiang Xue - * @version $Id: TControlAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ diff --git a/framework/Web/UI/TForm.php b/framework/Web/UI/TForm.php index 9db8682c7..c9280e9a8 100644 --- a/framework/Web/UI/TForm.php +++ b/framework/Web/UI/TForm.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TForm.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI */ @@ -23,7 +22,6 @@ * URLs. * * @author Qiang Xue - * @version $Id: TForm.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -87,7 +85,7 @@ public function render($writer) $this->renderChildren($writer); $cs->renderHiddenFieldsEnd($writer); $page->endFormRender($writer); - + $cs->renderScriptFilesEnd($writer); $cs->renderEndScripts($writer); } diff --git a/framework/Web/UI/THtmlWriter.php b/framework/Web/UI/THtmlWriter.php index 9f070d5f9..0339ac83d 100644 --- a/framework/Web/UI/THtmlWriter.php +++ b/framework/Web/UI/THtmlWriter.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: THtmlWriter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI */ @@ -32,7 +31,6 @@ * tags in HTML and XHTML. * * @author Qiang Xue - * @version $Id: THtmlWriter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -87,7 +85,7 @@ public function getWriter() { return $this->_writer; } - + public function setWriter($writer) { $this->_writer = $writer; diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php index 39656e13d..412d14b6c 100644 --- a/framework/Web/UI/TPage.php +++ b/framework/Web/UI/TPage.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TPage.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI */ @@ -22,7 +21,6 @@ * TPage class * * @author Qiang Xue - * @version $Id: TPage.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -297,7 +295,7 @@ protected static function decodeUTF8($data, $enc) return $data; } } - + /** * Sets Adapter to TActivePageAdapter and calls apter to process the * callback request. @@ -308,6 +306,10 @@ protected function processCallbackRequest($writer) $this->setAdapter(new TActivePageAdapter($this)); + $callbackEventParameter = $this->getRequest()->itemAt(TPage::FIELD_CALLBACK_PARAMETER); + if(strlen($callbackEventParameter) > 0) + $this->_postData[TPage::FIELD_CALLBACK_PARAMETER]=TJavaScript::jsonDecode((string)$callbackEventParameter); + // Decode Callback postData from UTF-8 to current Charset if (($g=$this->getApplication()->getGlobalization(false))!==null && strtoupper($enc=$g->getCharset())!='UTF-8') @@ -1245,7 +1247,6 @@ public function flushWriter() * classes. * * @author Qiang Xue - * @version $Id: TPage.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.1 */ diff --git a/framework/Web/UI/TPageStatePersister.php b/framework/Web/UI/TPageStatePersister.php index 7d2330b75..bbb20098c 100644 --- a/framework/Web/UI/TPageStatePersister.php +++ b/framework/Web/UI/TPageStatePersister.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TPageStatePersister.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI */ @@ -22,7 +21,6 @@ * traffic for transmitting bulky page state. * * @author Qiang Xue - * @version $Id: TPageStatePersister.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ diff --git a/framework/Web/UI/TSessionPageStatePersister.php b/framework/Web/UI/TSessionPageStatePersister.php index 5448fd229..a1a1f6010 100644 --- a/framework/Web/UI/TSessionPageStatePersister.php +++ b/framework/Web/UI/TSessionPageStatePersister.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TSessionPageStatePersister.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI */ @@ -39,7 +38,6 @@ * * * @author Qiang Xue - * @version $Id: TSessionPageStatePersister.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.1 */ diff --git a/framework/Web/UI/TTemplateControl.php b/framework/Web/UI/TTemplateControl.php index f5780928e..df6482c6c 100644 --- a/framework/Web/UI/TTemplateControl.php +++ b/framework/Web/UI/TTemplateControl.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TTemplateControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI */ @@ -23,7 +22,6 @@ * different extension name. For template file, the extension name is ".tpl". * * @author Qiang Xue - * @version $Id: TTemplateControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php index 91630241b..0ffb6becc 100644 --- a/framework/Web/UI/TTemplateManager.php +++ b/framework/Web/UI/TTemplateManager.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TTemplateManager.php 3251 2013-01-15 18:37:04Z ctrlaltca $ * @package System.Web.UI */ @@ -32,7 +31,6 @@ * template manager module that can be accessed via {@link TPageService::getTemplateManager()}. * * @author Qiang Xue - * @version $Id: TTemplateManager.php 3251 2013-01-15 18:37:04Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -162,7 +160,6 @@ protected function getLocalizedTemplate($filename) * set their parent as $control. * * @author Qiang Xue - * @version $Id: TTemplateManager.php 3251 2013-01-15 18:37:04Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ diff --git a/framework/Web/UI/TThemeManager.php b/framework/Web/UI/TThemeManager.php index ba007dc06..f8c86bb7b 100644 --- a/framework/Web/UI/TThemeManager.php +++ b/framework/Web/UI/TThemeManager.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TThemeManager.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI */ @@ -34,7 +33,6 @@ * and {@link getBufferOutput BufferOutput} are configurable properties of THttpResponse. * * @author Qiang Xue - * @version $Id: TThemeManager.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -206,7 +204,6 @@ public function setBaseUrl($value) * To apply a theme to a particular control, call {@link applySkin}. * * @author Qiang Xue - * @version $Id: TThemeManager.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TAccordion.php b/framework/Web/UI/WebControls/TAccordion.php index dbf761a23..fc794cd4d 100644 --- a/framework/Web/UI/WebControls/TAccordion.php +++ b/framework/Web/UI/WebControls/TAccordion.php @@ -4,9 +4,8 @@ * * @author Gabor Berczi, DevWorx Hungary * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TAccordion.php 2915 2011-05-15 16:26:11Z ctrlaltca@gmail.com $ * @package System.Web.UI.WebControls * @since 3.2 */ @@ -59,7 +58,6 @@ * * * @author Gabor Berczi, DevWorx Hungary - * @version $Id: TAccordion.php 2915 2011-05-15 16:26:11Z ctrlaltca@gmail.com $ * @package System.Web.UI.WebControls * @since 3.2 */ @@ -198,7 +196,7 @@ public function setCssUrl($value) } /** - * @return string CSS class for the whole accordion control div. + * @return string CSS class for the whole accordion control div. */ public function getCssClass() { @@ -426,15 +424,15 @@ public function onPreRender($param) protected function registerStyleSheet() { $url = $this->getCssUrl(); - + if($url === '') { return; } - + if($url === 'default') { $url = $this->getApplication()->getAssetManager()->publishFilePath(dirname(__FILE__).DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'accordion.css'); } - + if($url !== '') { $this->getPage()->getClientScript()->registerStyleSheetFile($url, $url); } @@ -540,13 +538,12 @@ public function renderContents($writer) * Class TAccordionView. * * TAccordionView represents a single view in a {@link TAccordion}. - * + * * TAccordionView is represented inside the {@link TAccordion} with an header label whose text is defined by * the {@link setCaption Caption} property; optionally the label can be an hyperlink: use the * {@link setNavigateUrl NavigateUrl} property to define the destination url. * * @author Gabor Berczi, DevWorx Hungary - * @version $Id: TAccordion.php 2915 2011-05-15 16:26:11Z ctrlaltca@gmail.com $ * @package System.Web.UI.WebControls * @since 3.2 */ @@ -669,7 +666,7 @@ public function renderHeader($writer) $writer->addAttribute('id',$this->getClientID().'_0'); $style=$this->getActive()?$this->getParent()->getActiveHeaderStyle():$this->getParent()->getHeaderStyle(); - + $style->addAttributesToRender($writer); $writer->renderBeginTag($this->getTagName()); @@ -690,7 +687,7 @@ protected function renderHeaderContent($writer) $url = $this->getNavigateUrl(); if(($caption=$this->getCaption())==='') $caption=' '; - + if ($url!='') $writer->write(""); $writer->write("{$caption}"); @@ -703,9 +700,8 @@ protected function renderHeaderContent($writer) * Class TAccordionViewCollection. * * TAccordionViewCollection is a collection of {@link TAccordionView} to be used inside a {@link TAccordion}. - * + * * @author Gabor Berczi, DevWorx Hungary - * @version $Id: TAccordion.php 2915 2011-05-15 16:26:11Z ctrlaltca@gmail.com $ * @package System.Web.UI.WebControls * @since 3.2 */ diff --git a/framework/Web/UI/WebControls/TBaseDataList.php b/framework/Web/UI/WebControls/TBaseDataList.php index 0ef22752c..9ebe551ee 100644 --- a/framework/Web/UI/WebControls/TBaseDataList.php +++ b/framework/Web/UI/WebControls/TBaseDataList.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TBaseDataList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -37,7 +36,6 @@ * content can be specified via {@link setHorizontalAlign HorizontalAlign}. * * @author Qiang Xue - * @version $Id: TBaseDataList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php index 074939c19..a23e21040 100644 --- a/framework/Web/UI/WebControls/TBaseValidator.php +++ b/framework/Web/UI/WebControls/TBaseValidator.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TBaseValidator.php 3319 2013-09-08 20:59:44Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -70,7 +69,6 @@ * override the method {@link evaluateIsValid}. * * @author Qiang Xue - * @version $Id: TBaseValidator.php 3319 2013-09-08 20:59:44Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -513,7 +511,7 @@ public function validate() $target=$this->getValidationTarget(); // if the target is not a disabled web control if($target===null || - ($target!==null && + ($target!==null && !($target instanceof TWebControl && !$target->getEnabled(true)))) { if($this->evaluateIsValid()) @@ -625,7 +623,6 @@ public function renderContents($writer) * See the quickstart documentation for further details. * * @author Wei Zhuo - * @version $Id: TBaseValidator.php 3319 2013-09-08 20:59:44Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -715,7 +712,6 @@ public function getObserveChanges() * - Fixed: Similar to Dynamic except that the error message physically occupies the page layout (even though it may not be visible) * * @author Qiang Xue - * @version $Id: TBaseValidator.php 3319 2013-09-08 20:59:44Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ @@ -738,7 +734,6 @@ class TValidatorDisplayStyle extends TEnumerable * - String * * @author Qiang Xue - * @version $Id: TBaseValidator.php 3319 2013-09-08 20:59:44Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ diff --git a/framework/Web/UI/WebControls/TBoundColumn.php b/framework/Web/UI/WebControls/TBoundColumn.php index 7534fcbcf..d7ac77507 100644 --- a/framework/Web/UI/WebControls/TBoundColumn.php +++ b/framework/Web/UI/WebControls/TBoundColumn.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TBoundColumn.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -42,7 +41,6 @@ * For more details, see {@link TRepeater} and {@link TDataList}. * * @author Qiang Xue - * @version $Id: TBoundColumn.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TBulletedList.php b/framework/Web/UI/WebControls/TBulletedList.php index e5c17b381..9cd3654ea 100644 --- a/framework/Web/UI/WebControls/TBulletedList.php +++ b/framework/Web/UI/WebControls/TBulletedList.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TBulletedList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -33,7 +32,6 @@ * will be raised under such a circumstance. * * @author Qiang Xue - * @version $Id: TBulletedList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -414,7 +412,6 @@ public function setSelectedValues($values) * of the item that is currently being clicked. * * @author Qiang Xue - * @version $Id: TBulletedList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -449,7 +446,6 @@ public function getIndex() * for a {@link TBulletedList} control. * * @author Qiang Xue - * @version $Id: TBulletedList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ @@ -479,7 +475,6 @@ class TBulletStyle extends TEnumerable * - LinkButton: the bulleted list items are displayed as link buttons that can cause postbacks * * @author Qiang Xue - * @version $Id: TBulletedList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ diff --git a/framework/Web/UI/WebControls/TButton.php b/framework/Web/UI/WebControls/TButton.php index e7d0f5bfd..f24985e69 100644 --- a/framework/Web/UI/WebControls/TButton.php +++ b/framework/Web/UI/WebControls/TButton.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -43,7 +42,6 @@ * if the button does not cause a postback. * * @author Qiang Xue - * @version $Id: TButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -355,7 +353,6 @@ public function setButtonType($value) * - Button: a client button (normally does not perform form submission) * * @author Qiang Xue - * @version $Id: TButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ diff --git a/framework/Web/UI/WebControls/TButtonColumn.php b/framework/Web/UI/WebControls/TButtonColumn.php index 258fecf2e..939fc7219 100644 --- a/framework/Web/UI/WebControls/TButtonColumn.php +++ b/framework/Web/UI/WebControls/TButtonColumn.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TButtonColumn.php 3287 2013-04-30 10:10:16Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -48,7 +47,6 @@ * datagrid cell is the first child. * * @author Qiang Xue - * @version $Id: TButtonColumn.php 3287 2013-04-30 10:10:16Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TCaptcha.php b/framework/Web/UI/WebControls/TCaptcha.php index 79f402a50..4523ea407 100644 --- a/framework/Web/UI/WebControls/TCaptcha.php +++ b/framework/Web/UI/WebControls/TCaptcha.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TCaptcha.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -57,7 +56,6 @@ * * * @author Qiang Xue - * @version $Id: TCaptcha.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.1.1 */ diff --git a/framework/Web/UI/WebControls/TCaptchaValidator.php b/framework/Web/UI/WebControls/TCaptchaValidator.php index c8cc7aea2..2758cac77 100644 --- a/framework/Web/UI/WebControls/TCaptchaValidator.php +++ b/framework/Web/UI/WebControls/TCaptchaValidator.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TCaptchaValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -31,7 +30,6 @@ * the CAPTCHA control that the user input should be compared with. * * @author Qiang Xue - * @version $Id: TCaptchaValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.1.1 */ diff --git a/framework/Web/UI/WebControls/TCheckBox.php b/framework/Web/UI/WebControls/TCheckBox.php index e12946be8..a28beac72 100644 --- a/framework/Web/UI/WebControls/TCheckBox.php +++ b/framework/Web/UI/WebControls/TCheckBox.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TCheckBox.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -36,7 +35,6 @@ * that may bring security vulnerabilities. * * @author Qiang Xue - * @version $Id: TCheckBox.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -127,7 +125,7 @@ public function getValidationPropertyValue() } /** - * Returns true if this control validated successfully. + * Returns true if this control validated successfully. * Defaults to true. * @return bool wether this control validated successfully. */ @@ -412,7 +410,7 @@ public function setEnableClientScript($value) /** * Check if we need a span tag to surround this control. The span tag will be created if - * the Text property is set for this control. + * the Text property is set for this control. * * @return bool wether this control needs a surrounding span tag */ @@ -519,7 +517,6 @@ protected function getPostBackOptions() * - Right: right aligned * * @author Qiang Xue - * @version $Id: TCheckBox.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ diff --git a/framework/Web/UI/WebControls/TCheckBoxColumn.php b/framework/Web/UI/WebControls/TCheckBoxColumn.php index c0206676a..8f67df55d 100644 --- a/framework/Web/UI/WebControls/TCheckBoxColumn.php +++ b/framework/Web/UI/WebControls/TCheckBoxColumn.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TCheckBoxColumn.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -38,7 +37,6 @@ * datagrid cell is the first child. * * @author Qiang Xue - * @version $Id: TCheckBoxColumn.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TCheckBoxList.php b/framework/Web/UI/WebControls/TCheckBoxList.php index 5122432cd..af59545c7 100644 --- a/framework/Web/UI/WebControls/TCheckBoxList.php +++ b/framework/Web/UI/WebControls/TCheckBoxList.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TCheckBoxList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -43,7 +42,6 @@ * The alignment of the text besides each checkbox can be specified via {@link setTextAlign TextAlign}. * * @author Qiang Xue - * @version $Id: TCheckBoxList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -256,7 +254,7 @@ public function getHasSeparators() { return false; } - + /** * @param boolean whether the control is to be enabled. */ @@ -264,8 +262,8 @@ public function setEnabled($value) { parent::setEnabled($value); $value = !TPropertyValue::ensureBoolean($value); - // if this is an active control, - // and it's a callback, + // if this is an active control, + // and it's a callback, // and we can update clientside, // then update the 'disabled' attribute of the items. if(($this instanceof IActiveControl) && @@ -389,14 +387,14 @@ public function onPreRender($param) /** * Wether the list should be rendered inside a span or not - * + * *@return boolean true if we need a span */ protected function getSpanNeeded () { return $this->getRepeatLayout()===TRepeatLayout::Raw; } - + /** * Renders the checkbox list control. * This method overrides the parent implementation. @@ -459,7 +457,7 @@ public function getValidationPropertyValue() } /** - * Returns true if this control validated successfully. + * Returns true if this control validated successfully. * Defaults to true. * @return bool wether this control validated successfully. */ @@ -498,6 +496,6 @@ protected function getPostBackOptions() $options['ItemCount'] = $this->getItemCount(); return $options; } - + } diff --git a/framework/Web/UI/WebControls/TClientScript.php b/framework/Web/UI/WebControls/TClientScript.php index f28a507a7..6fca14d34 100644 --- a/framework/Web/UI/WebControls/TClientScript.php +++ b/framework/Web/UI/WebControls/TClientScript.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TClientScript.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -38,9 +37,8 @@ * set the {@link setFlushScriptFiles FlushScriptFiles} property to false, so Prado * can postpone the loading of all the referenced script files further down the page * generation cycle. - * + * * @author Wei Zhuo - * @version $Id: TClientScript.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TColorPicker.php b/framework/Web/UI/WebControls/TColorPicker.php index fcb129b9b..7b20318c4 100644 --- a/framework/Web/UI/WebControls/TColorPicker.php +++ b/framework/Web/UI/WebControls/TColorPicker.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TColorPicker.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -23,17 +22,16 @@ * # Simple - Grid with 12 simple colors. * # Basic - Grid with the most common 70 colors. This is the default mode. * # Full - Full-featured color picker. - * + * * The CssClass property can be used to override the CSS class name * for the color picker panel. The ColorStyle property sets the packages * styles available. E.g. default. - * + * * If the Mode property is set to Full, the color picker panel will * display an "Ok" and "Cancel" buttons. You can customize the button labels setting the OKButtonText * and CancelButtonText properties. - * + * * @author Wei Zhuo - * @version $Id: TColorPicker.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -248,7 +246,6 @@ protected function getClientClassName() * # Full - Full-featured color picker. * * @author Qiang Xue - * @version $Id: TColorPicker.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ @@ -265,7 +262,6 @@ class TColorPickerMode extends TEnumerable * Client-side javascript code options. * * @author Wei Zhuo - * @version $Id: TColorPicker.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.1 */ diff --git a/framework/Web/UI/WebControls/TCompareValidator.php b/framework/Web/UI/WebControls/TCompareValidator.php index eaaa8f51d..b902b67be 100644 --- a/framework/Web/UI/WebControls/TCompareValidator.php +++ b/framework/Web/UI/WebControls/TCompareValidator.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TCompareValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -40,7 +39,6 @@ * LessThan and LessThanEqual. * * @author Qiang Xue - * @version $Id: TCompareValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -249,7 +247,6 @@ protected function getClientScriptOptions() * - LessThanEqual * * @author Qiang Xue - * @version $Id: TCompareValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ diff --git a/framework/Web/UI/WebControls/TConditional.php b/framework/Web/UI/WebControls/TConditional.php index 054e1a76a..61cc39884 100644 --- a/framework/Web/UI/WebControls/TConditional.php +++ b/framework/Web/UI/WebControls/TConditional.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TConditional.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -39,7 +38,6 @@ * or {@link getFalseTemplate FalseTemplate}, but never both. And the condition is evaluated only once. * * @author Qiang Xue - * @version $Id: TConditional.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.1.1 */ diff --git a/framework/Web/UI/WebControls/TContent.php b/framework/Web/UI/WebControls/TContent.php index f0a67674f..a2f15e3d0 100644 --- a/framework/Web/UI/WebControls/TContent.php +++ b/framework/Web/UI/WebControls/TContent.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TContent.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -25,7 +24,6 @@ * {@link TContent} and {@link TContentPlaceHolder} controls. * * @author Qiang Xue - * @version $Id: TContent.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TContentPlaceHolder.php b/framework/Web/UI/WebControls/TContentPlaceHolder.php index d9464fa3d..8a4d72847 100644 --- a/framework/Web/UI/WebControls/TContentPlaceHolder.php +++ b/framework/Web/UI/WebControls/TContentPlaceHolder.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TContentPlaceHolder.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -24,7 +23,6 @@ * {@link TContent} and {@link TContentPlaceHolder} controls. * * @author Qiang Xue - * @version $Id: TContentPlaceHolder.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TCustomValidator.php b/framework/Web/UI/WebControls/TCustomValidator.php index b4987f06c..6966a075e 100644 --- a/framework/Web/UI/WebControls/TCustomValidator.php +++ b/framework/Web/UI/WebControls/TCustomValidator.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TCustomValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -48,7 +47,6 @@ * with the TCustomValidator. * * @author Qiang Xue - * @version $Id: TCustomValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -153,7 +151,6 @@ protected function registerClientScriptValidator() * OnServerValidate event of TCustomValidator components. * * @author Qiang Xue - * @version $Id: TCustomValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TDataBoundControl.php b/framework/Web/UI/WebControls/TDataBoundControl.php index 08d130c13..2a287aac1 100644 --- a/framework/Web/UI/WebControls/TDataBoundControl.php +++ b/framework/Web/UI/WebControls/TDataBoundControl.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TDataBoundControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -39,7 +38,6 @@ * custom paging, set {@link setAllowCustomPaging AllowCustomPaging} to true. * * @author Qiang Xue - * @version $Id: TDataBoundControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -527,7 +525,6 @@ public function getSelectParameters() * - Pager: pager * * @author Qiang Xue - * @version $Id: TDataBoundControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ @@ -553,7 +550,6 @@ class TListItemType extends TEnumerable * {@link getItemType ItemType} property. * * @author Qiang Xue - * @version $Id: TDataBoundControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.1.0 */ diff --git a/framework/Web/UI/WebControls/TDataGrid.php b/framework/Web/UI/WebControls/TDataGrid.php index 249d81083..96e799aa6 100644 --- a/framework/Web/UI/WebControls/TDataGrid.php +++ b/framework/Web/UI/WebControls/TDataGrid.php @@ -9,9 +9,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TDataGrid.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -145,7 +144,6 @@ * - Save the data in viewstate and get it back during postbacks. * * @author Qiang Xue - * @version $Id: TDataGrid.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -1233,7 +1231,7 @@ protected function buildPager($pager) * Depending on the button type, a TLinkButton or a TButton may be created. * If it is enabled (clickable), its command name and parameter will also be set. * Derived classes may override this method to create additional types of buttons, such as TImageButton. - * @param mixed the container pager instance of TActiveDatagridPager + * @param mixed the container pager instance of TActiveDatagridPager * @param string button type, either LinkButton or PushButton * @param boolean whether the button should be enabled * @param string caption of the button @@ -1680,7 +1678,6 @@ protected function renderTable($writer) * The {@link getItem Item} property indicates the datagrid item related with the event. * * @author Qiang Xue - * @version $Id: TDataGrid.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -1718,7 +1715,6 @@ public function getItem() * The {@link getPager Pager} property indicates the datagrid pager related with the event. * * @author Qiang Xue - * @version $Id: TDataGrid.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -1759,7 +1755,6 @@ public function getPager() * raises the Command event. * * @author Qiang Xue - * @version $Id: TDataGrid.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -1815,7 +1810,6 @@ public function getCommandSource() * gives the sort expression carried with the sort command. * * @author Qiang Xue - * @version $Id: TDataGrid.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -1869,7 +1863,6 @@ public function getSortExpression() * returns the new page index carried with the page command. * * @author Qiang Xue - * @version $Id: TDataGrid.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -1923,7 +1916,6 @@ public function getNewPageIndex() * gives the index of the item from the bound data source. * * @author Qiang Xue - * @version $Id: TDataGrid.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -2060,7 +2052,6 @@ public function bubbleEvent($sender,$param) * TDataGridPager represents a datagrid pager. * * @author Qiang Xue - * @version $Id: TDataGrid.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -2119,7 +2110,6 @@ public function getItemType() * TDataGridItemCollection represents a collection of data grid items. * * @author Qiang Xue - * @version $Id: TDataGrid.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -2147,7 +2137,6 @@ public function insertAt($index,$item) * TDataGridColumnCollection represents a collection of data grid columns. * * @author Qiang Xue - * @version $Id: TDataGrid.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -2204,7 +2193,6 @@ public function insertAt($index,$item) * - Numeric: pager buttons are displayed as numeric page numbers * * @author Qiang Xue - * @version $Id: TDataGrid.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ @@ -2224,7 +2212,6 @@ class TDataGridPagerMode extends TEnumerable * - PushButton: form submit buttons * * @author Qiang Xue - * @version $Id: TDataGrid.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ @@ -2245,7 +2232,6 @@ class TDataGridPagerButtonType extends TEnumerable * - TopAndBottom: pager appears on both top and bottom of the data grid. * * @author Qiang Xue - * @version $Id: TDataGrid.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ diff --git a/framework/Web/UI/WebControls/TDataGridColumn.php b/framework/Web/UI/WebControls/TDataGridColumn.php index ad3be81fe..1c8831d23 100644 --- a/framework/Web/UI/WebControls/TDataGridColumn.php +++ b/framework/Web/UI/WebControls/TDataGridColumn.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TDataGridColumn.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -58,7 +57,6 @@ * which is the major logic for managing the data and presentation of cells in the column. * * @author Qiang Xue - * @version $Id: TDataGridColumn.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -554,7 +552,6 @@ protected function formatDataValue($formatString,$value) * - ImageButton: image buttons * * @author Qiang Xue - * @version $Id: TDataGridColumn.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ diff --git a/framework/Web/UI/WebControls/TDataGridItemRenderer.php b/framework/Web/UI/WebControls/TDataGridItemRenderer.php index 6e37a7395..376eea178 100644 --- a/framework/Web/UI/WebControls/TDataGridItemRenderer.php +++ b/framework/Web/UI/WebControls/TDataGridItemRenderer.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TDataGridItemRenderer.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -20,7 +19,6 @@ * define an item renderer class specific for {@link TDataGrid}. * * @author Qiang Xue - * @version $Id: TDataGridItemRenderer.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.1.0 */ diff --git a/framework/Web/UI/WebControls/TDataGridPagerStyle.php b/framework/Web/UI/WebControls/TDataGridPagerStyle.php index 31c0380b6..4e143e055 100644 --- a/framework/Web/UI/WebControls/TDataGridPagerStyle.php +++ b/framework/Web/UI/WebControls/TDataGridPagerStyle.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TDataGridPagerStyle.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -18,7 +17,6 @@ * TDataGridPagerStyle specifies the styles available for a datagrid pager. * * @author Qiang Xue - * @version $Id: TDataGridPagerStyle.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TDataList.php b/framework/Web/UI/WebControls/TDataList.php index 6b3c4a739..021fdf6db 100644 --- a/framework/Web/UI/WebControls/TDataList.php +++ b/framework/Web/UI/WebControls/TDataList.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TDataList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -146,7 +145,6 @@ * complex data may also have serializing problem if saved in viewstate. * * @author Qiang Xue - * @version $Id: TDataList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -1499,7 +1497,6 @@ public function render($writer) * The {@link getItem Item} property indicates the DataList item related with the event. * * @author Qiang Xue - * @version $Id: TDataList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -1540,7 +1537,6 @@ public function getItem() * raises the Command event. * * @author Qiang Xue - * @version $Id: TDataList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -1595,7 +1591,6 @@ public function getCommandSource() * is given by {@link getItemType ItemType} property. * * @author Qiang Xue - * @version $Id: TDataList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -1742,7 +1737,6 @@ public function bubbleEvent($sender,$param) * TDataListItemCollection represents a collection of data list items. * * @author Qiang Xue - * @version $Id: TDataList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TDataListItemRenderer.php b/framework/Web/UI/WebControls/TDataListItemRenderer.php index df63c1f24..cf42c9a45 100644 --- a/framework/Web/UI/WebControls/TDataListItemRenderer.php +++ b/framework/Web/UI/WebControls/TDataListItemRenderer.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TDataListItemRenderer.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -26,7 +25,6 @@ * which allows TDataList to apply CSS styles to the renders. * * @author Qiang Xue - * @version $Id: TDataListItemRenderer.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.1.0 */ diff --git a/framework/Web/UI/WebControls/TDataRenderer.php b/framework/Web/UI/WebControls/TDataRenderer.php index 8bde01522..0e98a1b4a 100644 --- a/framework/Web/UI/WebControls/TDataRenderer.php +++ b/framework/Web/UI/WebControls/TDataRenderer.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TDataRenderer.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.1.2 */ @@ -22,7 +21,6 @@ * - {@link getData Data}: data associated with this renderer. * @author Qiang Xue - * @version $Id: TDataRenderer.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.1.2 */ diff --git a/framework/Web/UI/WebControls/TDataSourceControl.php b/framework/Web/UI/WebControls/TDataSourceControl.php index 93037c03d..afe4de2d5 100644 --- a/framework/Web/UI/WebControls/TDataSourceControl.php +++ b/framework/Web/UI/WebControls/TDataSourceControl.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TDataSourceControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -14,7 +13,6 @@ * IDataSource class * * @author Qiang Xue - * @version $Id: TDataSourceControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -29,7 +27,6 @@ public function onDataSourceChanged($param); * TDataSourceControl class * * @author Qiang Xue - * @version $Id: TDataSourceControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -90,7 +87,6 @@ public function setVisible($value) * TDataSourceControl class * * @author Qiang Xue - * @version $Id: TDataSourceControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TDataSourceView.php b/framework/Web/UI/WebControls/TDataSourceView.php index 1e1ad7a9a..b9a76a329 100644 --- a/framework/Web/UI/WebControls/TDataSourceView.php +++ b/framework/Web/UI/WebControls/TDataSourceView.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TDataSourceView.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -14,7 +13,6 @@ * TDataSourceSelectParameters class * * @author Qiang Xue - * @version $Id: TDataSourceView.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -76,7 +74,6 @@ public function setTotalRowCount($value) * TDataSourceView class * * @author Qiang Xue - * @version $Id: TDataSourceView.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -179,7 +176,6 @@ public function onDataSourceViewChanged($param) * TReadOnlyDataSourceView class * * @author Qiang Xue - * @version $Id: TDataSourceView.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TDataTypeValidator.php b/framework/Web/UI/WebControls/TDataTypeValidator.php index b9ddbf6cf..3881bb844 100644 --- a/framework/Web/UI/WebControls/TDataTypeValidator.php +++ b/framework/Web/UI/WebControls/TDataTypeValidator.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TDataTypeValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -30,7 +29,6 @@ * provided, the string will be assumed to be in GNU datetime format. * * @author Wei Zhuo - * @version $Id: TDataTypeValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TDatePicker.php b/framework/Web/UI/WebControls/TDatePicker.php index 0e8d7bda8..112b2f743 100644 --- a/framework/Web/UI/WebControls/TDatePicker.php +++ b/framework/Web/UI/WebControls/TDatePicker.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TDatePicker.php 3318 2013-09-04 14:04:51Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -73,7 +72,6 @@ * * @author Wei Zhuo * @author Carl G. Mathisen - * @version $Id: TDatePicker.php 3318 2013-09-04 14:04:51Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -276,7 +274,7 @@ public function getUpToYear() { return $this->getViewState('UpToYear', intval(@date('Y'))+10); } - + /** * @param TDatePickerPositionMode calendar UI position */ @@ -902,9 +900,8 @@ protected function renderClientControlScript($writer) * is changed. * The formatted date according to {@link TDatePicker::getDateFormat DateFormat} is sent * as parameter to this event - * + * * @author Wei Zhuo - * @version $Id: TDatePicker.php 3318 2013-09-04 14:04:51Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ @@ -938,7 +935,6 @@ public function getOnDateChanged() * - DropDownList: dropdown lists are used to pick up date values * * @author Qiang Xue - * @version $Id: TDatePicker.php 3318 2013-09-04 14:04:51Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ @@ -960,7 +956,6 @@ class TDatePickerInputMode extends TEnumerable * - ImageButton: Shows an image next to the text input, clicking on the image shows the date picker, * * @author Qiang Xue - * @version $Id: TDatePicker.php 3318 2013-09-04 14:04:51Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ diff --git a/framework/Web/UI/WebControls/TDropDownList.php b/framework/Web/UI/WebControls/TDropDownList.php index 8dda857b5..ab56bc7a8 100644 --- a/framework/Web/UI/WebControls/TDropDownList.php +++ b/framework/Web/UI/WebControls/TDropDownList.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TDropDownList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -39,7 +38,6 @@ * available item in the dropdown list will be selected. * * @author Qiang Xue - * @version $Id: TDropDownList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -136,7 +134,7 @@ public function getValidationPropertyValue() } /** - * Returns true if this control validated successfully. + * Returns true if this control validated successfully. * Defaults to true. * @return bool wether this control validated successfully. */ diff --git a/framework/Web/UI/WebControls/TDropDownListColumn.php b/framework/Web/UI/WebControls/TDropDownListColumn.php index 40e07aef1..13a47aa7f 100644 --- a/framework/Web/UI/WebControls/TDropDownListColumn.php +++ b/framework/Web/UI/WebControls/TDropDownListColumn.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TDropDownListColumn.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -54,7 +53,6 @@ * datagrid cell is the first child. * * @author Qiang Xue - * @version $Id: TDropDownListColumn.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ diff --git a/framework/Web/UI/WebControls/TEditCommandColumn.php b/framework/Web/UI/WebControls/TEditCommandColumn.php index 2f69c001f..d8db8059e 100644 --- a/framework/Web/UI/WebControls/TEditCommandColumn.php +++ b/framework/Web/UI/WebControls/TEditCommandColumn.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TEditCommandColumn.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -47,7 +46,6 @@ * datagrid cell is the first child. * * @author Qiang Xue - * @version $Id: TEditCommandColumn.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TEmailAddressValidator.php b/framework/Web/UI/WebControls/TEmailAddressValidator.php index dffe912e0..b5ed78c65 100644 --- a/framework/Web/UI/WebControls/TEmailAddressValidator.php +++ b/framework/Web/UI/WebControls/TEmailAddressValidator.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TEmailAddressValidator.php 3283 2013-03-24 10:19:08Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -24,7 +23,6 @@ * checkdnsrr() is available in the installed PHP. * * @author Qiang Xue - * @version $Id: TEmailAddressValidator.php 3283 2013-03-24 10:19:08Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TExpression.php b/framework/Web/UI/WebControls/TExpression.php index 3cb1aa8cf..f1fea77bc 100644 --- a/framework/Web/UI/WebControls/TExpression.php +++ b/framework/Web/UI/WebControls/TExpression.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TExpression.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -22,7 +21,6 @@ * make sure {@link setExpression Expression} does not come directly from user input. * * @author Qiang Xue - * @version $Id: TExpression.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TFileUpload.php b/framework/Web/UI/WebControls/TFileUpload.php index c6dc595af..af2ad3f20 100644 --- a/framework/Web/UI/WebControls/TFileUpload.php +++ b/framework/Web/UI/WebControls/TFileUpload.php @@ -4,9 +4,8 @@ * * @author Marcus Nyeholt , Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TFileUpload.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -28,7 +27,6 @@ * (whether it succeeds or not). * * @author Marcus Nyeholt , Qiang Xue - * @version $Id: TFileUpload.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -261,7 +259,7 @@ public function getValidationPropertyValue() } /** - * Returns true if this control validated successfully. + * Returns true if this control validated successfully. * Defaults to true. * @return bool wether this control validated successfully. */ diff --git a/framework/Web/UI/WebControls/TFlushOutput.php b/framework/Web/UI/WebControls/TFlushOutput.php index dba35c790..0dbe06920 100644 --- a/framework/Web/UI/WebControls/TFlushOutput.php +++ b/framework/Web/UI/WebControls/TFlushOutput.php @@ -5,7 +5,6 @@ * @author Berczi Gabor * @link http://www.pradosoft.com/ * @license http://www.pradosoft.com/license/ - * @version $Id: TFlushOutput.php $ * @package System.Web.UI.WebControls */ @@ -23,17 +22,16 @@ * * * - * You can specify whether you want to keep buffering of the output + * You can specify whether you want to keep buffering of the output * (if it was enabled) till the next occourence of a - * or the end of the page rendering, or stop buffering, by using the + * or the end of the page rendering, or stop buffering, by using the * {@link setContinueBuffering ContinueBuffering}. * * @author Berczi Gabor - * @version $Id: TFlushOutput.php $ * @package System.Web.UI.WebControls * @since 3.1 */ -class TFlushOutput extends TControl +class TFlushOutput extends TControl { /** * @var boolean whether to continue buffering of output @@ -73,7 +71,7 @@ public function setContinueBuffering($value) public function render($writer) { //$writer->write(''); - // ajax responses can't be parsed by the client side before loaded and returned completely, + // ajax responses can't be parsed by the client side before loaded and returned completely, // so don't bother with flushing output somewhere mid-page if refreshing in a callback if (!$this->Page->IsCallback) { diff --git a/framework/Web/UI/WebControls/TFont.php b/framework/Web/UI/WebControls/TFont.php index 12da993b5..a07b8621f 100644 --- a/framework/Web/UI/WebControls/TFont.php +++ b/framework/Web/UI/WebControls/TFont.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TFont.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -16,7 +15,6 @@ * TFont encapsulates the CSS style fields related with font settings. * * @author Qiang Xue - * @version $Id: TFont.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/THead.php b/framework/Web/UI/WebControls/THead.php index 52ce30134..707bbfcc4 100644 --- a/framework/Web/UI/WebControls/THead.php +++ b/framework/Web/UI/WebControls/THead.php @@ -4,9 +4,8 @@ * * @author Marcus Nyeholt and Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: THead.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI */ @@ -37,7 +36,6 @@ * theme will not be rendered. * * @author Marcus Nyeholt and Qiang Xue - * @version $Id: THead.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI * @since 3.0 */ @@ -186,7 +184,6 @@ public function render($writer) * attributes for a meta tag, respectively. * * @author Qiang Xue - * @version $Id: THead.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -321,7 +318,6 @@ public function render($writer) * contained in a {@link THead} control. * * @author Qiang Xue - * @version $Id: THead.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/THeader1.php b/framework/Web/UI/WebControls/THeader1.php index db516679d..8aa635b5a 100644 --- a/framework/Web/UI/WebControls/THeader1.php +++ b/framework/Web/UI/WebControls/THeader1.php @@ -4,9 +4,8 @@ * * @author Brad Anderson * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: THeader1.php 2590 2008-12-10 11:34:24Z carlgmathisen $ * @package System.Web.UI.WebControls */ @@ -18,13 +17,12 @@ * This is also useful for the {@link TWebControlDecorator} (used by themes). * * @author Brad Anderson - * @version $Id: THeader1.php 2541 2008-10-21 15:05:13Z javalizard $ * @package System.Web.UI.WebControls * @since 3.2a */ - -class THeader1 extends THtmlElement { - + +class THeader1 extends THtmlElement { + /** * @return string tag name */ @@ -32,5 +30,5 @@ public function getDefaultTagName() { return 'h1'; } - + } diff --git a/framework/Web/UI/WebControls/THeader2.php b/framework/Web/UI/WebControls/THeader2.php index be1d76ae5..16631312d 100644 --- a/framework/Web/UI/WebControls/THeader2.php +++ b/framework/Web/UI/WebControls/THeader2.php @@ -4,9 +4,8 @@ * * @author Brad Anderson * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: THeader2.php 2590 2008-12-10 11:34:24Z carlgmathisen $ * @package System.Web.UI.WebControls */ @@ -18,13 +17,12 @@ * This is also useful for the {@link TWebControlDecorator} (used by themes). * * @author Brad Anderson - * @version $Id: THeader2.php 2541 2008-10-21 15:05:13Z javalizard $ * @package System.Web.UI.WebControls * @since 3.2a */ - -class THeader2 extends THtmlElement { - + +class THeader2 extends THtmlElement { + /** * @return string tag name */ @@ -32,5 +30,5 @@ public function getDefaultTagName() { return 'h2'; } - + } diff --git a/framework/Web/UI/WebControls/THeader3.php b/framework/Web/UI/WebControls/THeader3.php index ff96a190b..64e483667 100644 --- a/framework/Web/UI/WebControls/THeader3.php +++ b/framework/Web/UI/WebControls/THeader3.php @@ -4,9 +4,8 @@ * * @author Brad Anderson * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: THeader3.php 2590 2008-12-10 11:34:24Z carlgmathisen $ * @package System.Web.UI.WebControls */ @@ -18,13 +17,12 @@ * This is also useful for the {@link TWebControlDecorator} (used by themes). * * @author Brad Anderson - * @version $Id: THeader3.php 2541 2008-10-21 15:05:13Z javalizard $ * @package System.Web.UI.WebControls * @since 3.2a */ - -class THeader3 extends THtmlElement { - + +class THeader3 extends THtmlElement { + /** * @return string tag name */ @@ -32,5 +30,5 @@ public function getDefaultTagName() { return 'h3'; } - + } diff --git a/framework/Web/UI/WebControls/THeader4.php b/framework/Web/UI/WebControls/THeader4.php index 1374c7004..6622dd34b 100644 --- a/framework/Web/UI/WebControls/THeader4.php +++ b/framework/Web/UI/WebControls/THeader4.php @@ -4,9 +4,8 @@ * * @author Brad Anderson * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: THeader4.php 2590 2008-12-10 11:34:24Z carlgmathisen $ * @package System.Web.UI.WebControls */ @@ -18,13 +17,12 @@ * This is also useful for the {@link TWebControlDecorator} (used by themes). * * @author Brad Anderson - * @version $Id: THeader4.php 2541 2008-10-21 15:05:13Z javalizard $ * @package System.Web.UI.WebControls * @since 3.2 */ - -class THeader4 extends THtmlElement { - + +class THeader4 extends THtmlElement { + /** * @return string tag name */ @@ -32,5 +30,5 @@ public function getDefaultTagName() { return 'h4'; } - + } diff --git a/framework/Web/UI/WebControls/THeader5.php b/framework/Web/UI/WebControls/THeader5.php index 911e17edb..4d061943a 100644 --- a/framework/Web/UI/WebControls/THeader5.php +++ b/framework/Web/UI/WebControls/THeader5.php @@ -4,9 +4,8 @@ * * @author Brad Anderson * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: THeader5.php 2590 2008-12-10 11:34:24Z carlgmathisen $ * @package System.Web.UI.WebControls */ @@ -18,13 +17,12 @@ * This is also useful for the {@link TWebControlDecorator} (used by themes). * * @author Brad Anderson - * @version $Id: THeader5.php 2541 2008-10-21 15:05:13Z javalizard $ * @package System.Web.UI.WebControls * @since 3.2 */ - -class THeader5 extends THtmlElement { - + +class THeader5 extends THtmlElement { + /** * @return string tag name */ @@ -32,5 +30,5 @@ public function getDefaultTagName() { return 'h5'; } - + } diff --git a/framework/Web/UI/WebControls/THeader6.php b/framework/Web/UI/WebControls/THeader6.php index a2891c3f6..164c391cf 100644 --- a/framework/Web/UI/WebControls/THeader6.php +++ b/framework/Web/UI/WebControls/THeader6.php @@ -4,9 +4,8 @@ * * @author Brad Anderson * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: THeader6.php 2590 2008-12-10 11:34:24Z carlgmathisen $ * @package System.Web.UI.WebControls */ @@ -18,13 +17,12 @@ * This is also useful for the {@link TWebControlDecorator} (used by themes). * * @author Brad Anderson - * @version $Id: THeader6.php 2541 2008-10-21 15:05:13Z javalizard $ * @package System.Web.UI.WebControls * @since 3.2 */ - -class THeader6 extends THtmlElement { - + +class THeader6 extends THtmlElement { + /** * @return string tag name */ @@ -32,5 +30,5 @@ public function getDefaultTagName() { return 'h6'; } - + } diff --git a/framework/Web/UI/WebControls/THiddenField.php b/framework/Web/UI/WebControls/THiddenField.php index 041acdb24..d887a5e6a 100644 --- a/framework/Web/UI/WebControls/THiddenField.php +++ b/framework/Web/UI/WebControls/THiddenField.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.xisc.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.opensource.org/licenses/bsd-license.php BSD License - * @version $Id: THiddenField.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -19,7 +18,6 @@ * event will be raised. * * @author Qiang Xue - * @version $Id: THiddenField.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -113,7 +111,7 @@ public function getValidationPropertyValue() } /** - * Returns true if this control validated successfully. + * Returns true if this control validated successfully. * Defaults to true. * @return bool wether this control validated successfully. */ diff --git a/framework/Web/UI/WebControls/THtmlArea.php b/framework/Web/UI/WebControls/THtmlArea.php index 9d9ff3fab..6c2985f83 100644 --- a/framework/Web/UI/WebControls/THtmlArea.php +++ b/framework/Web/UI/WebControls/THtmlArea.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: THtmlArea.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -72,7 +71,6 @@ * * * @author Wei Zhuo - * @version $Id: THtmlArea.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -471,6 +469,8 @@ protected function getEditorOptions() $options['theme_advanced_toolbar_align'] = 'left'; $options['theme_advanced_path_location'] = 'bottom'; $options['extended_valid_elements'] = 'a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]'; + if($this->getReadOnly()) + $options['readonly'] = true; $options = array_merge($options, $this->parseEditorOptions($this->getOptions())); return $options; @@ -491,7 +491,7 @@ protected function parseEditorOptions($string) if(count($option) == 2) { $value=trim(trim($option[1]),"'\""); - if (($s=strtolower($value))==='false') + if (($s=strtolower($value))==='false') $value=false; elseif ($s==='true') $value=true; diff --git a/framework/Web/UI/WebControls/THtmlArea4.php b/framework/Web/UI/WebControls/THtmlArea4.php index f98c2ddf6..d5410eae1 100644 --- a/framework/Web/UI/WebControls/THtmlArea4.php +++ b/framework/Web/UI/WebControls/THtmlArea4.php @@ -4,9 +4,8 @@ * * @author Fabio Bas * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: THtmlArea4.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -20,7 +19,7 @@ * * THtmlArea4 wraps the visual editing functionalities provided by the * version 4 of TinyMCE project {@link http://tinymce.com/}. It has been - * developed as a plug'n'play substitute for {@link THtmlArea}, that is + * developed as a plug'n'play substitute for {@link THtmlArea}, that is * based on the previous iteration (version 3) of the same project. * Please note that both components can't be used together in the same page. * @@ -53,7 +52,6 @@ * * * @author Wei Zhuo - * @version $Id: THtmlArea.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -408,6 +406,13 @@ protected function getEditorOptions() $options['height'] = $this->getHeight(); $options['resize'] = 'both'; $options['menubar'] = false; + if($this->getReadOnly()) + { + $options['readonly'] = true; + $options['toolbar'] = false; + $options['menubar'] = false; + $options['statusbar'] = false; + } $options['extended_valid_elements'] = 'a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]'; @@ -430,7 +435,7 @@ protected function parseEditorOptions($string) if(count($option) == 2) { $value=trim(trim($option[1]),"'\""); - if (($s=strtolower($value))==='false') + if (($s=strtolower($value))==='false') $value=false; elseif ($s==='true') $value=true; diff --git a/framework/Web/UI/WebControls/THtmlElement.php b/framework/Web/UI/WebControls/THtmlElement.php index 5646a6ff3..f5bee915f 100644 --- a/framework/Web/UI/WebControls/THtmlElement.php +++ b/framework/Web/UI/WebControls/THtmlElement.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: THtmlElement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -23,7 +22,6 @@ * * @author Qiang Xue * @author Brad Anderson - * @version $Id: THtmlElement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.1.2 */ @@ -49,18 +47,18 @@ public function setTagName($value) { $this->_tagName=TPropertyValue::ensureString($value); } - + /** * This is the default tag when no other is specified - * @return string the default tag + * @return string the default tag */ public function getDefaultTagName() { return 'span'; } - + /** * This tells you if this TagName has deviated from the original - * @return boolean true if TagName has deviated from the default. + * @return boolean true if TagName has deviated from the default. */ public function getIsMutated() { return $this->_tagName !== null && $this->_tagName != $this->getDefaultTagName(); diff --git a/framework/Web/UI/WebControls/THyperLink.php b/framework/Web/UI/WebControls/THyperLink.php index 56aa5391e..3cda0c486 100644 --- a/framework/Web/UI/WebControls/THyperLink.php +++ b/framework/Web/UI/WebControls/THyperLink.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.xisc.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.opensource.org/licenses/bsd-license.php BSD License - * @version $Id: THyperLink.php 3286 2013-04-18 06:09:19Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -20,13 +19,12 @@ * 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 3286 2013-04-18 06:09:19Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -145,7 +143,7 @@ public function getImageHeight() { return $this->getViewState('ImageHeight',''); } - + /** * Sets the height of the image in the THyperLink * @param string height of the image in the THyperLink @@ -171,7 +169,7 @@ public function setImageUrl($value) { $this->setViewState('ImageUrl',$value,''); } - + /** * @return string width of the image in the THyperLink */ @@ -179,7 +177,7 @@ public function getImageWidth() { return $this->getViewState('ImageWidth',''); } - + /** * Sets the width of the image in the THyperLink * @param string width of the image diff --git a/framework/Web/UI/WebControls/THyperLinkColumn.php b/framework/Web/UI/WebControls/THyperLinkColumn.php index 171accada..05060ea6f 100644 --- a/framework/Web/UI/WebControls/THyperLinkColumn.php +++ b/framework/Web/UI/WebControls/THyperLinkColumn.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: THyperLinkColumn.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -45,7 +44,6 @@ * datagrid cell is the first child. * * @author Qiang Xue - * @version $Id: THyperLinkColumn.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -107,7 +105,7 @@ public function getImageHeight() { return $this->getViewState('ImageHeight',''); } - + /** * @param string height of the image in the THyperLink */ @@ -123,7 +121,7 @@ public function getImageUrl() { return $this->getViewState('ImageUrl',''); } - + /** * @param string url of the image in the THyperLink */ @@ -131,7 +129,7 @@ public function setImageUrl($value) { $this->setViewState('ImageUrl',$value,''); } - + /** * @return string width of the image in the THyperLink */ @@ -139,7 +137,7 @@ public function getImageWidth() { return $this->getViewState('ImageWidth',''); } - + /** * @param string width of the image in the THyperLink */ diff --git a/framework/Web/UI/WebControls/TImage.php b/framework/Web/UI/WebControls/TImage.php index 04a6d1162..6ebbca5d5 100644 --- a/framework/Web/UI/WebControls/TImage.php +++ b/framework/Web/UI/WebControls/TImage.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TImage.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -21,7 +20,6 @@ * or {@link setDescriptionUrl DescriptionUrl} property, respectively. * * @author Qiang Xue - * @version $Id: TImage.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TImageButton.php b/framework/Web/UI/WebControls/TImageButton.php index 0ee52a944..ff876b07a 100644 --- a/framework/Web/UI/WebControls/TImageButton.php +++ b/framework/Web/UI/WebControls/TImageButton.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TImageButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -52,7 +51,6 @@ * TImageButton displays the {@link setText Text} property as the hint text to the displayed image. * * @author Qiang Xue - * @version $Id: TImageButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -378,7 +376,6 @@ public function renderContents($writer) * {@link TImageButton::onClick Click} event of {@link TImageButton} controls. * * @author Qiang Xue - * @version $Id: TImageButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TImageMap.php b/framework/Web/UI/WebControls/TImageMap.php index 340f5089d..23409b1c8 100644 --- a/framework/Web/UI/WebControls/TImageMap.php +++ b/framework/Web/UI/WebControls/TImageMap.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TImageMap.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -33,7 +32,6 @@ * * * @author Qiang Xue - * @version $Id: TImageMap.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -230,7 +228,6 @@ public function onClick($param) * access {@link getPostBackValue PostBackValue}. * * @author Qiang Xue - * @version $Id: TImageMap.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -262,7 +259,6 @@ public function getPostBackValue() * THotSpotCollection represents a collection of hotspots in an imagemap. * * @author Qiang Xue - * @version $Id: TImageMap.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -293,7 +289,6 @@ public function insertAt($index,$item) * and {@link TRectangleHotSpot}. * * @author Qiang Xue - * @version $Id: TImageMap.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -604,7 +599,6 @@ public function render($writer) * control. * * @author Qiang Xue - * @version $Id: TImageMap.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -682,7 +676,6 @@ public function setY($value) * TImageMap} control. * * @author Qiang Xue - * @version $Id: TImageMap.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -776,7 +769,6 @@ public function setTop($value) * TImageMap} control. * * @author Qiang Xue - * @version $Id: TImageMap.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -823,7 +815,6 @@ public function setCoordinates($value) * - Inactive: the hotspot is inactive (not clickable) * * @author Qiang Xue - * @version $Id: TImageMap.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ diff --git a/framework/Web/UI/WebControls/TInlineFrame.php b/framework/Web/UI/WebControls/TInlineFrame.php index 2c1371aa1..09e823153 100644 --- a/framework/Web/UI/WebControls/TInlineFrame.php +++ b/framework/Web/UI/WebControls/TInlineFrame.php @@ -5,9 +5,8 @@ * @author Jason Ragsdale * @author Harry Pottash * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TInlineFrame.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -27,7 +26,6 @@ * Original Prado v2 IFrame Author Information * @author Jason Ragsdale * @author Harry Pottash - * @version $Id: TInlineFrame.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -239,7 +237,6 @@ protected function addAttributesToRender($writer) * - Bottom: bottom aligned * * @author Qiang Xue - * @version $Id: TInlineFrame.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ @@ -264,7 +261,6 @@ class TInlineFrameAlign extends TEnumerable * - Both: show both horizontal and vertical scroll bars all the time. * * @author Qiang Xue - * @version $Id: TInlineFrame.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ diff --git a/framework/Web/UI/WebControls/TItemDataRenderer.php b/framework/Web/UI/WebControls/TItemDataRenderer.php index 2809e046f..eb6fabef5 100644 --- a/framework/Web/UI/WebControls/TItemDataRenderer.php +++ b/framework/Web/UI/WebControls/TItemDataRenderer.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TItemDataRenderer.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.1.2 */ @@ -28,7 +27,6 @@ * - {@link getData Data}: data associated with this renderer * @author Qiang Xue - * @version $Id: TItemDataRenderer.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.1.2 */ diff --git a/framework/Web/UI/WebControls/TJavascriptLogger.php b/framework/Web/UI/WebControls/TJavascriptLogger.php index a2f1c1c29..f9f9a37d4 100644 --- a/framework/Web/UI/WebControls/TJavascriptLogger.php +++ b/framework/Web/UI/WebControls/TJavascriptLogger.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TJavascriptLogger.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -26,14 +25,13 @@ * http://web.archive.org/web/20060512041505/gleepglop.com/javascripts/logger/ * * @author Wei Zhuo - * @version $Id: TJavascriptLogger.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ class TJavascriptLogger extends TWebControl { private static $_keyCodes = array( - '0'=>48, '1'=>49, '2'=>50, '3'=>51, '4'=>52, '5'=>53, '6'=>54, '7'=>55, '8'=>56, '9'=>57, + '0'=>48, '1'=>49, '2'=>50, '3'=>51, '4'=>52, '5'=>53, '6'=>54, '7'=>55, '8'=>56, '9'=>57, 'a'=>65, 'b'=>66, 'c'=>67, 'd'=>68, 'e'=>69, 'f'=>70, 'g'=>71, 'h'=>72, 'i'=>73, 'j'=>74, 'k'=>75, 'l'=>76, 'm'=>77, 'n'=>78, 'o'=>79, 'p'=>80, 'q'=>81, 'r'=>82, 's'=>83, 't'=>84, 'u'=>85, 'v'=>86, 'w'=>87, 'x'=>88, 'y'=>89, 'z'=>90); diff --git a/framework/Web/UI/WebControls/TKeyboard.php b/framework/Web/UI/WebControls/TKeyboard.php index 1260c5aff..d423107a2 100644 --- a/framework/Web/UI/WebControls/TKeyboard.php +++ b/framework/Web/UI/WebControls/TKeyboard.php @@ -4,9 +4,8 @@ * * @author Sergey Morkovkin and Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TKeyboard.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.1.1 */ @@ -33,7 +32,6 @@ * also be changed by specifying {@link setKeyboardCssClass KeyboardCssClass}. * * @author Sergey Morkovkin and Qiang Xue - * @version $Id: TKeyboard.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.1.1 */ diff --git a/framework/Web/UI/WebControls/TLabel.php b/framework/Web/UI/WebControls/TLabel.php index 4552b1a5e..6ffd025be 100644 --- a/framework/Web/UI/WebControls/TLabel.php +++ b/framework/Web/UI/WebControls/TLabel.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TLabel.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -26,7 +25,6 @@ * Make sure it does not contain dangerous characters that you want to avoid. * * @author Qiang Xue - * @version $Id: TLabel.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TLinkButton.php b/framework/Web/UI/WebControls/TLinkButton.php index a9e6f4cff..fe1ae33b9 100644 --- a/framework/Web/UI/WebControls/TLinkButton.php +++ b/framework/Web/UI/WebControls/TLinkButton.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TLinkButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -50,7 +49,6 @@ * as an image button by enclosing an <img> tag as the body of TLinkButton. * * @author Qiang Xue - * @version $Id: TLinkButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TListBox.php b/framework/Web/UI/WebControls/TListBox.php index a616a2be0..1d72f0c2e 100644 --- a/framework/Web/UI/WebControls/TListBox.php +++ b/framework/Web/UI/WebControls/TListBox.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TListBox.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -32,7 +31,6 @@ * * * @author Qiang Xue - * @version $Id: TListBox.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -223,7 +221,7 @@ public function getValidationPropertyValue() } /** - * Returns true if this control validated successfully. + * Returns true if this control validated successfully. * Defaults to true. * @return bool wether this control validated successfully. */ @@ -250,7 +248,6 @@ public function setIsValid($value) * - Multiple: allow multiple selection * * @author Qiang Xue - * @version $Id: TListBox.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.4 */ diff --git a/framework/Web/UI/WebControls/TListControl.php b/framework/Web/UI/WebControls/TListControl.php index f9fdd77fa..f86557616 100644 --- a/framework/Web/UI/WebControls/TListControl.php +++ b/framework/Web/UI/WebControls/TListControl.php @@ -6,9 +6,8 @@ * @author Robin J. Rogge * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TListControl.php 3288 2013-04-30 10:36:50Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -79,7 +78,6 @@ * be used to add a dummy list item that will be rendered first. * * @author Qiang Xue - * @version $Id: TListControl.php 3288 2013-04-30 10:36:50Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ @@ -794,7 +792,7 @@ protected function renderPrompt($writer) public function renderContents($writer) { $this->renderPrompt($writer); - + if($this->_items) { $writer->writeLine(); diff --git a/framework/Web/UI/WebControls/TListControlValidator.php b/framework/Web/UI/WebControls/TListControlValidator.php index 7d9801ef3..04cc6ef61 100644 --- a/framework/Web/UI/WebControls/TListControlValidator.php +++ b/framework/Web/UI/WebControls/TListControlValidator.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TListControlValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -57,7 +56,6 @@ * * * @author Xiang Wei Zhuo - * @version $Id: TListControlValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TListItem.php b/framework/Web/UI/WebControls/TListItem.php index e9bfa1751..cf5e487a0 100644 --- a/framework/Web/UI/WebControls/TListItem.php +++ b/framework/Web/UI/WebControls/TListItem.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TListItem.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -21,7 +20,6 @@ * if the list control supports so. * * @author Qiang Xue - * @version $Id: TListItem.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TLiteral.php b/framework/Web/UI/WebControls/TLiteral.php index da195f50a..35d35e02c 100644 --- a/framework/Web/UI/WebControls/TLiteral.php +++ b/framework/Web/UI/WebControls/TLiteral.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TLiteral.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -27,7 +26,6 @@ * does not contain unwanted characters that may bring security vulnerabilities. * * @author Qiang Xue - * @version $Id: TLiteral.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0 */ diff --git a/framework/Web/UI/WebControls/TLiteralColumn.php b/framework/Web/UI/WebControls/TLiteralColumn.php index f40f8f4e0..4b2c39fcd 100644 --- a/framework/Web/UI/WebControls/TLiteralColumn.php +++ b/framework/Web/UI/WebControls/TLiteralColumn.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TLiteralColumn.php 1397 2006-09-07 07:55:53Z wei $ * @package System.Web.UI.WebControls */ @@ -29,7 +28,6 @@ * If {@link setEncode Encode} is true, the static texts will be HTML-encoded. * * @author Qiang Xue - * @version $Id: TLiteralColumn.php 1397 2006-09-07 07:55:53Z wei $ * @package System.Web.UI.WebControls * @since 3.0.5 */ @@ -111,18 +109,13 @@ public function initializeCell($cell,$columnIndex,$itemType) if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::EditItem || $itemType===TListItemType::SelectedItem) { if($this->getDataField()!=='') - $cell->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); - else { - if(($dataField=$this->getDataField())!=='') - $control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); - else - { - $text=$this->getText(); - if($this->getEncode()) - $text=THttpUtility::htmlEncode($text); - $cell->setText($text); - } + $cell->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); + } else { + $text=$this->getText(); + if($this->getEncode()) + $text=THttpUtility::htmlEncode($text); + $cell->setText($text); } } else diff --git a/framework/Web/UI/WebControls/TMarkdown.php b/framework/Web/UI/WebControls/TMarkdown.php index 1a2855ebf..75c8ec1bb 100644 --- a/framework/Web/UI/WebControls/TMarkdown.php +++ b/framework/Web/UI/WebControls/TMarkdown.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TMarkdown.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls */ @@ -14,7 +13,7 @@ * Using TTextHighlighter and MarkdownParser classes */ Prado::using('System.Web.UI.WebControls.TTextHighlighter'); -Prado::using('System.3rdParty.Markdown.MarkdownParser'); +Prado::using('System.3rdParty.Parsedown.Parsedown'); /** * TMarkdown class @@ -30,7 +29,7 @@ * To use TMarkdown, simply enclose the content to be rendered within * the body of TMarkdown in a template. * - * See http://www.pradosoft.com/demos/quickstart/?page=Markdown for + * See https://daringfireball.net/projects/markdown/basics for * details on the Markdown syntax usage. * * TMarkdown also performs syntax highlighting for code blocks whose language @@ -39,7 +38,6 @@ * and enclosed within a pair of square brackets (e.g. [php]). * * @author Wei Zhuo - * @version $Id: TMarkdown.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.WebControls * @since 3.0.1 */ @@ -53,10 +51,9 @@ class TMarkdown extends TTextHighlighter */ public function processText($text) { - $renderer = new MarkdownParser; - $result = $renderer->parse($text); + $result = Parsedown::instance()->parse($text); return preg_replace_callback( - '/
\[\s*(\w+)\s*\]\n+((.|\n)*?)\s*<\\/code><\\/pre>/im',
+				'/
((.|\n)*?)<\\/code><\\/pre>/im',
 				array($this, 'highlightCode'), $result);
 	}
 
diff --git a/framework/Web/UI/WebControls/TMultiView.php b/framework/Web/UI/WebControls/TMultiView.php
index 286f4e951..05725ff77 100644
--- a/framework/Web/UI/WebControls/TMultiView.php
+++ b/framework/Web/UI/WebControls/TMultiView.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TMultiView.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -32,7 +31,6 @@
  * when its active view is changed during a postback.
  *
  * @author Qiang Xue 
- * @version $Id: TMultiView.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -272,7 +270,6 @@ public function render($writer)
  * TViewCollection represents a collection that only takes {@link TView} instances
  * as collection elements.
  * @author Qiang Xue 
- * @version $Id: TMultiView.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -307,7 +304,6 @@ public function insertAt($index,$item)
  * and when a view is deactivated, it raises {@link onDeactivate OnDeactivate}.
  *
  * @author Qiang Xue 
- * @version $Id: TMultiView.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
diff --git a/framework/Web/UI/WebControls/TOutputCache.php b/framework/Web/UI/WebControls/TOutputCache.php
index 89c0c8496..2a5ce7346 100644
--- a/framework/Web/UI/WebControls/TOutputCache.php
+++ b/framework/Web/UI/WebControls/TOutputCache.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TOutputCache.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -63,7 +62,6 @@
  * to determine whether the content is cached or not.
  *
  * @author Qiang Xue 
- * @version $Id: TOutputCache.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.1
  */
@@ -481,7 +479,7 @@ public function render($writer)
 			$textwriter = new TTextWriter();
 			$multiwriter = new TOutputCacheTextWriterMulti(array($writer->getWriter(),$textwriter));
 			$htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), $multiwriter);
-			
+
 			$stack=$this->getPage()->getCachingStack();
 			$stack->push($this);
 			parent::render($htmlWriter);
@@ -503,7 +501,6 @@ public function render($writer)
  * OnCheckDependency event of {@link TOutputCache} control.
  *
  * @author Qiang Xue 
- * @version $Id: TOutputCache.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -555,7 +552,6 @@ public function setCacheTime($value)
  * OnCalculateKey event of {@link TOutputCache} control.
  *
  * @author Qiang Xue 
- * @version $Id: TOutputCache.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -591,7 +587,6 @@ public function setCacheKey($value)
  *
  * @author Gabor Berczi, DevWorx Hungary 
  * @author Qiang Xue 
- * @version $Id: TOutputCache.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.2
  */
@@ -604,7 +599,7 @@ public function __construct(Array $writers)
 		//parent::__construct();
 		$this->_writers = $writers;
 	}
-	
+
 	public function write($s)
 	{
 		foreach($this->_writers as $writer)
diff --git a/framework/Web/UI/WebControls/TPager.php b/framework/Web/UI/WebControls/TPager.php
index 6379fedd2..b4b9c2b07 100644
--- a/framework/Web/UI/WebControls/TPager.php
+++ b/framework/Web/UI/WebControls/TPager.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TPager.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -34,7 +33,7 @@
  *
  * 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
@@ -45,7 +44,6 @@
  * Multiple pagers can be associated with the same data-bound control.
  *
  * @author Qiang Xue 
- * @version $Id: TPager.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.2
  */
@@ -727,7 +725,6 @@ public function bubbleEvent($sender,$param)
  * returns the new page index carried with the page command.
  *
  * @author Qiang Xue 
- * @version $Id: TPager.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.2
  */
@@ -781,7 +778,6 @@ public function getNewPageIndex()
  * - DropDownList: a dropdown list is used to select pages
  *
  * @author Qiang Xue 
- * @version $Id: TPager.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.4
  */
@@ -802,7 +798,6 @@ class TPagerMode extends TEnumerable
  * - PushButton: form submit buttons
  *
  * @author Qiang Xue 
- * @version $Id: TPager.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.4
  */
diff --git a/framework/Web/UI/WebControls/TPanel.php b/framework/Web/UI/WebControls/TPanel.php
index cf20a8645..2bf1b40d0 100644
--- a/framework/Web/UI/WebControls/TPanel.php
+++ b/framework/Web/UI/WebControls/TPanel.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TPanel.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -35,7 +34,6 @@
  * by setting the {@link setDefaultButton DefaultButton} property.
  *
  * @author Qiang Xue 
- * @version $Id: TPanel.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -231,12 +229,7 @@ public function render($writer)
 
 		if(($butt=$this->getDefaultButton())!=='')
 		{
-			$buttons = $this->findControlsByID($butt);
-			if (count($buttons)>0)
-				$button = reset($buttons);
-			else
-				$button = null;
-			if($button===null)
+			if(($button=$this->findControl($butt))===null)
 				throw new TInvalidDataValueException('panel_defaultbutton_invalid',$butt);
 			else
 				$this->getPage()->getClientScript()->registerDefaultButton($this, $button);
diff --git a/framework/Web/UI/WebControls/TPanelStyle.php b/framework/Web/UI/WebControls/TPanelStyle.php
index cb49b7154..d1dfe62e8 100644
--- a/framework/Web/UI/WebControls/TPanelStyle.php
+++ b/framework/Web/UI/WebControls/TPanelStyle.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TPanelStyle.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -20,7 +19,6 @@
  * TPanelStyle represents the CSS style specific for panel HTML tag.
  *
  * @author Qiang Xue 
- * @version $Id: TPanelStyle.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -239,7 +237,6 @@ public function mergeWith($style)
  * - RightToLeft: content in a panel is right to left
  *
  * @author Qiang Xue 
- * @version $Id: TPanelStyle.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.4
  */
@@ -263,7 +260,6 @@ class TContentDirection extends TEnumerable
  * - Vertical: vertical scroll bar only
  *
  * @author Qiang Xue 
- * @version $Id: TPanelStyle.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.4
  */
diff --git a/framework/Web/UI/WebControls/TPlaceHolder.php b/framework/Web/UI/WebControls/TPlaceHolder.php
index 020141cff..6809a4022 100644
--- a/framework/Web/UI/WebControls/TPlaceHolder.php
+++ b/framework/Web/UI/WebControls/TPlaceHolder.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TPlaceHolder.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -18,7 +17,6 @@
  * by manipulating the {@link TControl::getControls Controls} property.
  *
  * @author Qiang Xue 
- * @version $Id: TPlaceHolder.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
diff --git a/framework/Web/UI/WebControls/TRadioButton.php b/framework/Web/UI/WebControls/TRadioButton.php
index 144704b41..bb12a2fff 100644
--- a/framework/Web/UI/WebControls/TRadioButton.php
+++ b/framework/Web/UI/WebControls/TRadioButton.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TRadioButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -14,10 +13,6 @@
  * Using TCheckBox parent class
  */
 Prado::using('System.Web.UI.WebControls.TCheckBox');
-/**
- * Using TRadioButtonList class
- */
-Prado::using('System.Web.UI.WebControls.TRadioButtonList');
 
 /**
  * TRadioButton class
@@ -49,7 +44,6 @@
  * that may bring security vulnerabilities.
  *
  * @author Qiang Xue 
- * @version $Id: TRadioButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -182,7 +176,7 @@ public function getUniqueGroupName()
 				{
 					if($groupName!=='')
 						$groupName=substr($uniqueID,0,$pos+1).$groupName;
-					else if($this->getNamingContainer() instanceof TRadioButtonList)
+					else if(is_a($this->getNamingContainer(), 'TRadioButtonList'))
 						$groupName=substr($uniqueID,0,$pos);
 				}
 				if($groupName==='')
diff --git a/framework/Web/UI/WebControls/TRadioButtonList.php b/framework/Web/UI/WebControls/TRadioButtonList.php
index d93caaa26..bead35824 100644
--- a/framework/Web/UI/WebControls/TRadioButtonList.php
+++ b/framework/Web/UI/WebControls/TRadioButtonList.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TRadioButtonList.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -29,7 +28,6 @@
  * one radiobutton can be selected at a time.
  *
  * @author Qiang Xue 
- * @version $Id: TRadioButtonList.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
diff --git a/framework/Web/UI/WebControls/TRangeValidator.php b/framework/Web/UI/WebControls/TRangeValidator.php
index 8b7550c85..8a3c0e355 100644
--- a/framework/Web/UI/WebControls/TRangeValidator.php
+++ b/framework/Web/UI/WebControls/TRangeValidator.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TRangeValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -46,7 +45,6 @@
  * defaulted as UTF-8.
  *
  * @author Qiang Xue 
- * @version $Id: TRangeValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -350,7 +348,6 @@ protected function getClientScriptOptions()
  * - StringLength
  *
  * @author Qiang Xue 
- * @version $Id: TRangeValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.4
  */
diff --git a/framework/Web/UI/WebControls/TRatingList.php b/framework/Web/UI/WebControls/TRatingList.php
index f4d4adcf5..09d7fc6ab 100644
--- a/framework/Web/UI/WebControls/TRatingList.php
+++ b/framework/Web/UI/WebControls/TRatingList.php
@@ -4,9 +4,8 @@
  *
  * @author Wei Zhuo 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TRatingList.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -22,7 +21,6 @@
  *
  * @author Wei Zhuo 
  * @author Bradley Booms 
- * @version $Id: TRatingList.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -125,7 +123,7 @@ public function setRating($value)
 		$index = $this->getRatingIndex($value);
 		parent::setSelectedIndex($index);
 	}
-	
+
 	public function setSelectedIndex($value)
 	{
 		$this->setRating($value+1);
@@ -213,7 +211,7 @@ public function getRatingStyle()
  	{
 	   return $this->getViewState('RatingStyle', 'default');
  	}
- 
+
  	/**
 	 * @return string rating style css class name.
  	 */
diff --git a/framework/Web/UI/WebControls/TRegularExpressionValidator.php b/framework/Web/UI/WebControls/TRegularExpressionValidator.php
index 890fb56ec..2c155e289 100644
--- a/framework/Web/UI/WebControls/TRegularExpressionValidator.php
+++ b/framework/Web/UI/WebControls/TRegularExpressionValidator.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TRegularExpressionValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -43,7 +42,6 @@
  * Use a {@link TRequiredFieldValidator} to ensure the input is not empty.
  *
  * @author Qiang Xue 
- * @version $Id: TRegularExpressionValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
diff --git a/framework/Web/UI/WebControls/TRepeatInfo.php b/framework/Web/UI/WebControls/TRepeatInfo.php
index 929d31e7f..7b65b3b34 100644
--- a/framework/Web/UI/WebControls/TRepeatInfo.php
+++ b/framework/Web/UI/WebControls/TRepeatInfo.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TRepeatInfo.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -17,7 +16,6 @@
  * This interface must be implemented by classes who want to use {@link TRepeatInfo}.
  *
  * @author Qiang Xue 
- * @version $Id: TRepeatInfo.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -70,7 +68,6 @@ public function renderItem($writer,$repeatInfo,$itemType,$index);
  * the column and repeat direction settings.
  *
  * @author Qiang Xue 
- * @version $Id: TRepeatInfo.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -526,7 +523,6 @@ protected function renderFooter($writer,$user,$tableLayout,$columns)
  * - Horizontal
  *
  * @author Qiang Xue 
- * @version $Id: TRepeatInfo.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.4
  */
@@ -547,7 +543,6 @@ class TRepeatDirection extends TEnumerable
  * - Raw: the repeated contents are stacked together without any additional decorations
  *
  * @author Qiang Xue 
- * @version $Id: TRepeatInfo.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.4
  */
diff --git a/framework/Web/UI/WebControls/TRepeater.php b/framework/Web/UI/WebControls/TRepeater.php
index c32636fd8..a563a12df 100644
--- a/framework/Web/UI/WebControls/TRepeater.php
+++ b/framework/Web/UI/WebControls/TRepeater.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TRepeater.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -87,7 +86,6 @@
  * complex data may also have serializing problem if saved in viewstate.
  *
  * @author Qiang Xue 
- * @version $Id: TRepeater.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -784,7 +782,6 @@ protected function getDataFieldValue($data,$field)
  * The {@link getItem Item} property indicates the repeater item related with the event.
  *
  * @author Qiang Xue 
- * @version $Id: TRepeater.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -825,7 +822,6 @@ public function getItem()
  * raises the Command event.
  *
  * @author Qiang Xue 
- * @version $Id: TRepeater.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -880,7 +876,6 @@ public function getCommandSource()
  * is given by {@link getItemType ItemType} property.
  *
  * @author Qiang Xue 
- * @version $Id: TRepeater.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -1001,7 +996,6 @@ public function bubbleEvent($sender,$param)
  * TRepeaterItemCollection represents a collection of repeater items.
  *
  * @author Qiang Xue 
- * @version $Id: TRepeater.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
diff --git a/framework/Web/UI/WebControls/TRepeaterItemRenderer.php b/framework/Web/UI/WebControls/TRepeaterItemRenderer.php
index 0e39e7655..1c41e65f1 100644
--- a/framework/Web/UI/WebControls/TRepeaterItemRenderer.php
+++ b/framework/Web/UI/WebControls/TRepeaterItemRenderer.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TRepeaterItemRenderer.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -23,7 +22,6 @@
  * the bubbling scheme for the OnCommand event of repeater items.
  *
  * @author Qiang Xue 
- * @version $Id: TRepeaterItemRenderer.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.1.0
  */
diff --git a/framework/Web/UI/WebControls/TRequiredFieldValidator.php b/framework/Web/UI/WebControls/TRequiredFieldValidator.php
index 7a0bad8c8..3db2457d3 100644
--- a/framework/Web/UI/WebControls/TRequiredFieldValidator.php
+++ b/framework/Web/UI/WebControls/TRequiredFieldValidator.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TRequiredFieldValidator.php 3288 2013-04-30 10:36:50Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -29,7 +28,6 @@
  * set, it will be automatically considered as the validator's {@link setInitialValue InitialValue}.
  *
  * @author Qiang Xue 
- * @version $Id: TRequiredFieldValidator.php 3288 2013-04-30 10:36:50Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -99,7 +97,7 @@ protected function evaluateIsValid()
 		else
 			return $this->validateStandardControl($control);
 	}
-	
+
 	private function validateListControl($control)
 	{
 		$initial = trim($this->getInitialValue());
@@ -111,7 +109,7 @@ private function validateListControl($control)
 		}
 		return $count > 0;
 	}
-	
+
 	private function validateRadioButtonGroup($control)
 	{
 		$initial = trim($this->getInitialValue());
@@ -127,7 +125,7 @@ private function validateRadioButtonGroup($control)
 		}
 		return false;
 	}
-	
+
 	private function validateStandardControl($control)
 	{
 		$initial = trim($this->getInitialValue());
diff --git a/framework/Web/UI/WebControls/TSafeHtml.php b/framework/Web/UI/WebControls/TSafeHtml.php
index 775086b4b..b7b14f795 100644
--- a/framework/Web/UI/WebControls/TSafeHtml.php
+++ b/framework/Web/UI/WebControls/TSafeHtml.php
@@ -4,9 +4,8 @@
  *
  * @author Wei Zhuo 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TSafeHtml.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -34,7 +33,6 @@
  * to ensure the contents gets parsed correctly.
  *
  * @author Wei Zhuo 
- * @version $Id: TSafeHtml.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
diff --git a/framework/Web/UI/WebControls/TSlider.php b/framework/Web/UI/WebControls/TSlider.php
index dcf34bfc1..c0d765595 100644
--- a/framework/Web/UI/WebControls/TSlider.php
+++ b/framework/Web/UI/WebControls/TSlider.php
@@ -4,9 +4,8 @@
  *
  * @author Christophe Boulain 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TSlider.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.1.1
  */
@@ -26,10 +25,10 @@
  * You can also provide the allowed values by setting the {@link SetValues Values} array.
  *
  * A 'Progress Indicator' can be displayed within the track with the {@link SetProgressIndicator ProgressIndicator} property.
- * 
+ *
  * The TSlider control can be easily customized using CssClasses. You can provide your own css file, using the
  * {@link SetCssUrl CssUrl} property.
- * The css class for TSlider can be set by the {@link setCssClass CssClass} property. Default value is "Slider HorizontalSlider" 
+ * The css class for TSlider can be set by the {@link setCssClass CssClass} property. Default value is "Slider HorizontalSlider"
  * for an horizontal slider, and "Slider VerticalSlider" for a vertical one.
  *
  * If {@link SetAutoPostBack AutoPostBack} property is true, postback is sent as soon as the value changed.
@@ -42,7 +41,6 @@
  * - ClientSide.onChange is called when the slider value has changed (at the end of a move).
  *
  * @author Christophe Boulain 
- * @version $Id: TSlider.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.1.1
  */
@@ -145,7 +143,7 @@ public function setStepSize($value)
 	{
 		$this->setViewState('StepSize', $value, 1.0);
 	}
-	
+
 	/**
 	 * @return boolean wether to display a progress indicator or not. Defaults to true.
 	 */
@@ -219,7 +217,7 @@ public function setValues($value)
 	{
 		$this->setViewState('Values', TPropertyValue::ensureArray($value), array());
 	}
-	
+
 	/**
 	 * @return boolean a value indicating whether an automatic postback to the server
 	 * will occur whenever the user modifies the slider value. Defaults to false.
@@ -351,7 +349,7 @@ protected function addAttributesToRender($writer)
 			$class=($this->getDirection()==TSliderDirection::Horizontal)?'HorizontalSlider':'VerticalSlider';
 			$writer->addAttribute('class', 'Slider '.$class);
 		}
-		
+
 	}
 
 	/**
@@ -387,9 +385,9 @@ public function renderContents($writer)
 		}
 		$writer->renderEndTag();
 		*/
-		
+
 		$writer->renderEndTag();
-		
+
 		// Render the 'Handle'
 		$writer->addAttribute('class', 'Handle');
 		$writer->addAttribute('id', $this->getClientID().'_handle');
@@ -508,7 +506,6 @@ protected function getSliderOptions()
  * The OnChange event is raised when the slider value is changed (or at the end of a move)
  *
  * @author Christophe Boulain 
- * @version $Id: TSlider.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.1.1
  */
@@ -561,7 +558,6 @@ public function getOnSlide()
  * - Vertical : Vertical slider
  *
  * @author Christophe Boulain 
- * @version $Id: TSlider.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.1.1
  */
diff --git a/framework/Web/UI/WebControls/TStatements.php b/framework/Web/UI/WebControls/TStatements.php
index 32f98296d..0602732b7 100644
--- a/framework/Web/UI/WebControls/TStatements.php
+++ b/framework/Web/UI/WebControls/TStatements.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TStatements.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -23,7 +22,6 @@
  * make sure {@link setStatements Statements} does not come directly from user input.
  *
  * @author Qiang Xue 
- * @version $Id: TStatements.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
diff --git a/framework/Web/UI/WebControls/TStyle.php b/framework/Web/UI/WebControls/TStyle.php
index 4ba37d53f..f30b3461a 100644
--- a/framework/Web/UI/WebControls/TStyle.php
+++ b/framework/Web/UI/WebControls/TStyle.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TStyle.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -21,7 +20,6 @@
  * TStyle encapsulates the CSS style applied to a control.
  *
  * @author Qiang Xue 
- * @version $Id: TStyle.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -418,7 +416,6 @@ public function getStyleFields()
  * - Hidden: the control is not displayed and is included in the layout.
  *
  * @author Wei Zhuo 
- * @version $Id: TStyle.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.1
  */
@@ -435,7 +432,6 @@ class TDisplayStyle extends TEnumerable
  * TTableStyle represents the CSS style specific for HTML table.
  *
  * @author Qiang Xue 
- * @version $Id: TStyle.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -676,7 +672,6 @@ public function setBorderCollapse($value)
  * TTableItemStyle represents the CSS style specific for HTML table item.
  *
  * @author Qiang Xue 
- * @version $Id: TStyle.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -831,7 +826,6 @@ public function setWrap($value)
  * - Justify: the begin and end are justified
  *
  * @author Qiang Xue 
- * @version $Id: TStyle.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.4
  */
@@ -855,7 +849,6 @@ class THorizontalAlign extends TEnumerable
  * - Middle: middle aligned
  *
  * @author Qiang Xue 
- * @version $Id: TStyle.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.4
  */
@@ -879,7 +872,6 @@ class TVerticalAlign extends TEnumerable
  * - Both: both horizontal and vertical grid lines are shown
  *
  * @author Qiang Xue 
- * @version $Id: TStyle.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.4
  */
diff --git a/framework/Web/UI/WebControls/TStyleSheet.php b/framework/Web/UI/WebControls/TStyleSheet.php
index 5faf52f0b..32c0faf13 100644
--- a/framework/Web/UI/WebControls/TStyleSheet.php
+++ b/framework/Web/UI/WebControls/TStyleSheet.php
@@ -4,9 +4,8 @@
  *
  * @author Wei Zhuo 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TStyleSheet.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
diff --git a/framework/Web/UI/WebControls/TTabPanel.php b/framework/Web/UI/WebControls/TTabPanel.php
index 0c6128f1d..8f1564db7 100644
--- a/framework/Web/UI/WebControls/TTabPanel.php
+++ b/framework/Web/UI/WebControls/TTabPanel.php
@@ -4,9 +4,8 @@
  *
  * @author Tomasz Wolny  and Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TTabPanel.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.1.1
  */
@@ -54,7 +53,6 @@
  * 
  *
  * @author Tomasz Wolny  and Qiang Xue 
- * @version $Id: TTabPanel.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.1.1
  */
@@ -408,15 +406,15 @@ public function onPreRender($param)
 	protected function registerStyleSheet()
 	{
 		$url = $this->getCssUrl();
-		
+
 		if($url === '') {
 			return;
 		}
-		
+
 		if($url === 'default') {
 			$url = $this->getApplication()->getAssetManager()->publishFilePath(dirname(__FILE__).DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'tabpanel.css');
 		}
-		
+
 		if($url !== '') {
 			$this->getPage()->getClientScript()->registerStyleSheetFile($url, $url);
 		}
@@ -540,7 +538,6 @@ public function renderContents($writer)
  * setting the {@link setActive Active} property.
  *
  * @author Tomasz Wolny  and Qiang Xue 
- * @version $Id: TTabPanel.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.1.1
  */
@@ -694,7 +691,6 @@ protected function renderTabContent($writer)
  * TTabViewCollection is used to maintain a list of views belong to a {@link TTabPanel}.
  *
  * @author Tomasz Wolny  and Qiang Xue 
- * @version $Id: TTabPanel.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.1.1
  */
diff --git a/framework/Web/UI/WebControls/TTable.php b/framework/Web/UI/WebControls/TTable.php
index 5be68cbd9..4102cd4bc 100644
--- a/framework/Web/UI/WebControls/TTable.php
+++ b/framework/Web/UI/WebControls/TTable.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TTable.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -61,7 +60,6 @@
  * 
  *
  * @author Qiang Xue 
- * @version $Id: TTable.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -358,7 +356,6 @@ public function renderContents($writer)
  * TTableRowCollection is used to maintain a list of rows belong to a table.
  *
  * @author Qiang Xue 
- * @version $Id: TTable.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -395,7 +392,6 @@ public function insertAt($index,$item)
  * - Right: right aligned
  *
  * @author Qiang Xue 
- * @version $Id: TTable.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.4
  */
diff --git a/framework/Web/UI/WebControls/TTableCell.php b/framework/Web/UI/WebControls/TTableCell.php
index 96254e623..d78aebbd6 100644
--- a/framework/Web/UI/WebControls/TTableCell.php
+++ b/framework/Web/UI/WebControls/TTableCell.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TTableCell.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -28,7 +27,6 @@
  * indicates whether the contents in the cell should be wrapped.
  *
  * @author Qiang Xue 
- * @version $Id: TTableCell.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
diff --git a/framework/Web/UI/WebControls/TTableFooterRow.php b/framework/Web/UI/WebControls/TTableFooterRow.php
index 46d1a3bee..32be1e124 100644
--- a/framework/Web/UI/WebControls/TTableFooterRow.php
+++ b/framework/Web/UI/WebControls/TTableFooterRow.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TTableFooterRow.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -21,7 +20,6 @@
  * TTableFooterRow displays a table footer row.
  *
  * @author Qiang Xue 
- * @version $Id: TTableFooterRow.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.1
  */
diff --git a/framework/Web/UI/WebControls/TTableHeaderCell.php b/framework/Web/UI/WebControls/TTableHeaderCell.php
index 80036d415..43b21b452 100644
--- a/framework/Web/UI/WebControls/TTableHeaderCell.php
+++ b/framework/Web/UI/WebControls/TTableHeaderCell.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TTableHeaderCell.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -22,7 +21,6 @@
  * TTableHeaderCell displays a table header cell on a Web page.
  *
  * @author Qiang Xue 
- * @version $Id: TTableHeaderCell.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -111,7 +109,6 @@ public function setCategoryText($value)
  * - Column: the scope is column-wise
  *
  * @author Qiang Xue 
- * @version $Id: TTableHeaderCell.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.4
  */
diff --git a/framework/Web/UI/WebControls/TTableHeaderRow.php b/framework/Web/UI/WebControls/TTableHeaderRow.php
index 166a20e49..0e42a4160 100644
--- a/framework/Web/UI/WebControls/TTableHeaderRow.php
+++ b/framework/Web/UI/WebControls/TTableHeaderRow.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TTableHeaderRow.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -21,7 +20,6 @@
  * TTableHeaderRow displays a table header row.
  *
  * @author Qiang Xue 
- * @version $Id: TTableHeaderRow.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.1
  */
diff --git a/framework/Web/UI/WebControls/TTableRow.php b/framework/Web/UI/WebControls/TTableRow.php
index a998e6fb9..d0bc6bfb7 100644
--- a/framework/Web/UI/WebControls/TTableRow.php
+++ b/framework/Web/UI/WebControls/TTableRow.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TTableRow.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -24,7 +23,6 @@
  * {@link setVerticalAlign VerticalAlign} properties, respectively.
  *
  * @author Qiang Xue 
- * @version $Id: TTableRow.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -160,7 +158,6 @@ public function renderContents($writer)
  * TTableCellCollection is used to maintain a list of cells belong to a table row.
  *
  * @author Qiang Xue 
- * @version $Id: TTableRow.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -195,7 +192,6 @@ public function insertAt($index,$item)
  * - Footer: in table footer
  *
  * @author Qiang Xue 
- * @version $Id: TTableRow.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.4
  */
diff --git a/framework/Web/UI/WebControls/TTemplateColumn.php b/framework/Web/UI/WebControls/TTemplateColumn.php
index 173476f2a..947f0c479 100644
--- a/framework/Web/UI/WebControls/TTemplateColumn.php
+++ b/framework/Web/UI/WebControls/TTemplateColumn.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TTemplateColumn.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -34,7 +33,6 @@
  * takes precedence.
  *
  * @author Qiang Xue 
- * @version $Id: TTemplateColumn.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
diff --git a/framework/Web/UI/WebControls/TTextBox.php b/framework/Web/UI/WebControls/TTextBox.php
index 969d29696..0d14dd7c6 100644
--- a/framework/Web/UI/WebControls/TTextBox.php
+++ b/framework/Web/UI/WebControls/TTextBox.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TTextBox.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -44,7 +43,6 @@
  * Currently, no alternatives are available.
  *
  * @author Qiang Xue 
- * @version $Id: TTextBox.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -593,7 +591,6 @@ public function setWrap($value)
  * - Password: the textbox will hide user input like a password input box
  *
  * @author Qiang Xue 
- * @version $Id: TTextBox.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.4
  */
@@ -610,7 +607,6 @@ class TTextBoxMode extends TEnumerable
  * by a {@link TTextBox} control.
  *
  * @author Qiang Xue 
- * @version $Id: TTextBox.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.4
  */
diff --git a/framework/Web/UI/WebControls/TTextHighlighter.php b/framework/Web/UI/WebControls/TTextHighlighter.php
index 64878d495..a10171db1 100644
--- a/framework/Web/UI/WebControls/TTextHighlighter.php
+++ b/framework/Web/UI/WebControls/TTextHighlighter.php
@@ -4,9 +4,8 @@
  *
  * @author Wei Zhuo
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TTextHighlighter.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -31,7 +30,6 @@
  * because it needs to insert some CSS styles.
  *
  * @author Wei Zhuo
- * @version $Id: TTextHighlighter.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -202,7 +200,6 @@ public function render($writer)
 
 /**
  * @author Wei Zhuo
- * @version $Id: TTextHighlighter.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
diff --git a/framework/Web/UI/WebControls/TTextProcessor.php b/framework/Web/UI/WebControls/TTextProcessor.php
index e569e780f..daba9b460 100644
--- a/framework/Web/UI/WebControls/TTextProcessor.php
+++ b/framework/Web/UI/WebControls/TTextProcessor.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TTextProcessor.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -23,7 +22,6 @@
  * Note, all child classes must implement {@link processText} method.
  *
  * @author Qiang Xue 
- * @version $Id: TTextProcessor.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI
  * @since 3.0.1
  */
diff --git a/framework/Web/UI/WebControls/TValidationSummary.php b/framework/Web/UI/WebControls/TValidationSummary.php
index 00c96c90d..3d5b61ca4 100644
--- a/framework/Web/UI/WebControls/TValidationSummary.php
+++ b/framework/Web/UI/WebControls/TValidationSummary.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TValidationSummary.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -30,7 +29,6 @@
  * {@link setEnableClientScript EnableClientScript} is true.
  *
  * @author Qiang Xue 
- * @version $Id: TValidationSummary.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -430,7 +428,6 @@ protected function renderHeaderOnly($writer)
  * See the quickstart documentation for further details.
  *
  * @author Wei Zhuo 
- * @version $Id: TValidationSummary.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -499,7 +496,6 @@ protected function ensureFunction($javascript)
  * - HeaderOnly: only the HeaderText will be display.
  *
  * @author Qiang Xue 
- * @version $Id: TValidationSummary.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.4
  */
@@ -523,7 +519,6 @@ class TValidationSummaryDisplayMode extends TEnumerable
  * - Fixed: Similar to Dynamic except that the error messages physically occupy the page layout (even though they may not be visible)
  *
  * @author Qiang Xue 
- * @version $Id: TValidationSummary.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.4
  */
diff --git a/framework/Web/UI/WebControls/TWebControl.php b/framework/Web/UI/WebControls/TWebControl.php
index 0da4d88c6..e0bd61949 100644
--- a/framework/Web/UI/WebControls/TWebControl.php
+++ b/framework/Web/UI/WebControls/TWebControl.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TWebControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -35,7 +34,6 @@
  * the body contents enclosed within the HTML tag.
  *
  * @author Qiang Xue 
- * @version $Id: TWebControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -45,12 +43,12 @@ class TWebControl extends TControl implements IStyleable
 	 *	@var boolean ensures the inclusion the id in the tag rendering.
 	 */
 	private $_ensureid=false;
-	
+
 	/**
 	 *	@var TWebControlDecorator this render things before and after both the open and close tag
 	 */
 	protected $_decorator;
-	
+
 
 	/**
 	 * Subclasses can override getEnsureId or just set this property.  eg. If your subclass
@@ -80,7 +78,7 @@ public function getDecorator($create=true)
 			$this->_decorator = Prado::createComponent('TWebControlDecorator', $this);
 		return $this->_decorator;
 	}
-	
+
 	/**
 	 * Copies basic control attributes from another control.
 	 * Properties including AccessKey, ToolTip, TabIndex, Enabled
@@ -397,10 +395,10 @@ public function setWidth($value)
 	{
 		$this->getStyle()->setWidth($value);
 	}
-	
+
 
 	/**
-	 * If your subclass overrides the onPreRender method be sure to call 
+	 * If your subclass overrides the onPreRender method be sure to call
 	 * this method through parent::onPreRender($param); so your sub-class can be decorated,
 	 * among other things.
 	 * @param TEventParameter event parameter to be passed to the event handlers
@@ -408,7 +406,7 @@ public function setWidth($value)
 	public function onPreRender($param) {
 		if($decorator = $this->getDecorator(false))
 			$decorator->instantiate();
-		
+
 		parent::onPreRender($param);
 	}
 
@@ -494,7 +492,7 @@ public function renderEndTag($writer)
 			$decorator->renderPostContentsText($writer);
 			$writer->renderEndTag();
 			$decorator->renderPostTagText($writer);
-		} else 
+		} else
 			$writer->renderEndTag($writer);
 	}
 }
diff --git a/framework/Web/UI/WebControls/TWebControlAdapter.php b/framework/Web/UI/WebControls/TWebControlAdapter.php
index 5de154194..6b9694569 100644
--- a/framework/Web/UI/WebControls/TWebControlAdapter.php
+++ b/framework/Web/UI/WebControls/TWebControlAdapter.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TWebControlAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -19,7 +18,6 @@
  * browsers.
  *
  * @author Qiang Xue 
- * @version $Id: TWebControlAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
diff --git a/framework/Web/UI/WebControls/TWebControlDecorator.php b/framework/Web/UI/WebControls/TWebControlDecorator.php
index 9b1c36528..d08d9c827 100644
--- a/framework/Web/UI/WebControls/TWebControlDecorator.php
+++ b/framework/Web/UI/WebControls/TWebControlDecorator.php
@@ -4,23 +4,22 @@
  *
  * @author Brad Anderson 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TWebControlDecorator.php 2541 2008-10-21 15:05:13Z qiang.xue $
  * @package System.Web.UI.WebControls
  */
 
 
 /**
  * TWebControlDecorator class
- * 
+ *
  * A TWebControlDecorator can be applied to a {@link TWebControl} to customize its rendering.
- * TWebControlDecorator can add custom html code before and after both the open and close 
+ * TWebControlDecorator can add custom html code before and after both the open and close
  * tag of a {@link TWebControl}.
  * The html code can be an user-defined text or an external template file that will be
  * instantiated and rendered in place.
- * 
- * This is an easy way to have your look and feel depend upon the theme instead of writing 
+ *
+ * This is an easy way to have your look and feel depend upon the theme instead of writing
  * specific html in your templates to achieve your website desires.
  * Here is an example of how to code your theme skin:
  * 
@@ -51,40 +50,39 @@
  *
  *
  * @author Brad Anderson 
- * @version $Id: TWebControlDecorator.php 2541 2008-10-21 15:05:13Z qiang.xue $
  * @package System.Web.UI.WebControls
  * @since 3.2
  */
 
 class TWebControlDecorator extends TComponent {
-	
+
 	/**
 	 * @var boolean tells if there should only be decoration around the inner content
 	 */
 	private $_internalonly;
-	
+
 	/**
 	 * @var boolean tells if the decoration uses state in its templates.  If there are no templates
-	 * in the instance of the decoration this variable is unused. 
+	 * in the instance of the decoration this variable is unused.
 	 */
 	private $_usestate = false;
-	
+
 	/**
 	 * @var TWebControl the control to decorate
 	 */
 	private $_control;
-	
+
 	/**
 	 * @var TControl to tell the decorator where to place the outer controls
 	 */
 	private $_outercontrol;
-	
+
 	/**
-	 * @var boolean This tells if the Templates have been 
+	 * @var boolean This tells if the Templates have been
 	 */
 	private $_addedTemplateDecoration=false;
-	
-	
+
+
 	/**
 	 * @var string the text that goes before the open tag
 	 */
@@ -101,9 +99,9 @@ class TWebControlDecorator extends TComponent {
 	 * @var string the text that goes after the close tag
 	 */
 	private $_posttagtext = '';
-	
-	
-	
+
+
+
 	/**
 	 * @var TTemplate the template that goes before the open tag
 	 */
@@ -120,7 +118,7 @@ class TWebControlDecorator extends TComponent {
 	 * @var TTemplate the template that goes after the close tag
 	 */
 	private $_posttagtemplate;
-	
+
 	/**
 	 * Constructor.
 	 * Initializes the control .
@@ -131,7 +129,7 @@ public function __construct($control, $onlyinternal = false) {
 		$this->_control = $control;
 		$this->_internalonly = $onlyinternal;
 	}
-	
+
 	/**
 	 * @return boolean if the templates in this decoration need state.  This defaults to false
 	 */
@@ -139,23 +137,23 @@ public function getUseState()
 	{
 		return $this->_usestate;
 	}
-	
+
 	/**
-	 * @param boolean $value true to tell the decoration that the templates need state and should be 
+	 * @param boolean $value true to tell the decoration that the templates need state and should be
 	 * placed in a control step before the state is saved.
 	 */
 	public function setUseState($value)
 	{
 		$this->_usestate = TPropertyValue::ensureBoolean($value);
 	}
-	
+
 	/**
 	 * @return string gets the text before the open tag in the TWebControl
 	 */
 	public function getPreTagText() {
 		return $this->_pretagtext;
 	}
-	
+
 	/**
 	 * @param string sets the text before the open tag in the TWebControl
 	 */
@@ -163,15 +161,15 @@ public function setPreTagText($value) {
 		if(!$this->_internalonly && !$this->_control->getIsSkinApplied())
 			$this->_pretagtext = TPropertyValue::ensureString($value);
 	}
-	
-	
+
+
 	/**
 	 * @return string the text after the open tag in the TWebControl
 	 */
 	public function getPreContentsText() {
 		return $this->_precontentstext;
 	}
-	
+
 	/**
 	 * @param string sets the text after the open tag in the TWebControl
 	 */
@@ -179,15 +177,15 @@ public function setPreContentsText($value) {
 		if(!$this->_control->getIsSkinApplied())
 			$this->_precontentstext = TPropertyValue::ensureString($value);
 	}
-	
-	
+
+
 	/**
 	 * @return string the text before the close tag in the TWebControl
 	 */
 	public function getPostContentsText() {
 		return $this->_postcontentstext;
 	}
-	
+
 	/**
 	 * @param string sets the text before the close tag in the TWebControl
 	 */
@@ -195,15 +193,15 @@ public function setPostContentsText($value) {
 		if(!$this->_control->getIsSkinApplied())
 			$this->_postcontentstext = TPropertyValue::ensureString($value);
 	}
-	
-	
+
+
 	/**
 	 * @return string the text before the close tag in the TWebControl
 	 */
 	public function getPostTagText() {
 		return $this->_posttagtext;
 	}
-	
+
 	/**
 	 * @param string sets the text after the close tag in the TWebControl
 	 */
@@ -211,15 +209,15 @@ public function setPostTagText($value) {
 		if(!$this->_internalonly && !$this->_control->getIsSkinApplied())
 			$this->_posttagtext = TPropertyValue::ensureString($value);
 	}
-	
-	
+
+
 	/**
 	 * @return TTemplate|null the template before the open tag in the TWebControl.  Defaults to null.
 	 */
 	public function getPreTagTemplate() {
 		return $this->_pretagtemplate;
 	}
-	
+
 	/**
 	 * @param TTemplate sets the template before the open tag in the TWebControl
 	 */
@@ -227,15 +225,15 @@ public function setPreTagTemplate($value) {
 		if(!$this->_internalonly && !$this->_control->getIsSkinApplied())
 			$this->_pretagtemplate = $value;
 	}
-	
-	
+
+
 	/**
 	 * @return TTemplate|null the template after the open tag in the TWebControl.  Defaults to null.
 	 */
 	public function getPreContentsTemplate() {
 		return $this->_precontentstemplate;
 	}
-	
+
 	/**
 	 * @param TTemplate sets the template after the open tag in the TWebControl
 	 */
@@ -243,15 +241,15 @@ public function setPreContentsTemplate($value) {
 		if(!$this->_control->getIsSkinApplied())
 			$this->_precontentstemplate = $value;
 	}
-	
-	
+
+
 	/**
 	 * @return TTemplate|null the template before the close tag in the TWebControl.  Defaults to null.
 	 */
 	public function getPostContentsTemplate() {
 		return $this->_postcontentstemplate;
 	}
-	
+
 	/**
 	 * @param TTemplate sets the template before the close tag in the TWebControl
 	 */
@@ -259,15 +257,15 @@ public function setPostContentsTemplate($value) {
 		if(!$this->_control->getIsSkinApplied())
 			$this->_postcontentstemplate = $value;
 	}
-	
-	
+
+
 	/**
 	 * @return TTemplate|null the template after the close tag in the TWebControl.  Defaults to null.
 	 */
 	public function getPostTagTemplate() {
 		return $this->_posttagtemplate;
 	}
-	
+
 	/**
 	 * @param TTemplate sets the template before the close tag in the TWebControl
 	 */
@@ -275,17 +273,17 @@ public function setPostTagTemplate($value) {
 		if(!$this->_internalonly && !$this->_control->getIsSkinApplied())
 			$this->_posttagtemplate = $value;
 	}
-	
+
 	/**
-	 *	this is a framework call.  The Text decoration can't 
+	 *	this is a framework call.  The Text decoration can't
 	 * influence the object hierarchy because they are rendered into into the writer directly.
-	 * This call attaches the ensureTemplateDecoration to the TPage onSaveStateComplete so 
+	 * This call attaches the ensureTemplateDecoration to the TPage onSaveStateComplete so
 	 * these controls don't have page states.  This is as close to not influencing the page as possible.
 	 */
 	public function instantiate($outercontrol = null) {
-		if($this->getPreTagTemplate() || $this->getPreContentsTemplate() || 
+		if($this->getPreTagTemplate() || $this->getPreContentsTemplate() ||
 			$this->getPostContentsTemplate() || $this->getPostTagTemplate()) {
-			
+
 			$this->_outercontrol = $outercontrol;
 			if($this->getUseState())
 				$this->ensureTemplateDecoration();
@@ -293,53 +291,53 @@ public function instantiate($outercontrol = null) {
 				$this->_control->getPage()->onSaveStateComplete[] = array($this, 'ensureTemplateDecoration');
 		}
 	}
-	
-	
+
+
 	/**
 	 *	This method places the templates around the open and close tag.  This takes a parameter which is
 	 * to specify the control to get the outer template decoration.  If no outer control is specified
-	 * @param TComponent this indicates the component or control to get the outer tag elements, just in case it's 
+	 * @param TComponent this indicates the component or control to get the outer tag elements, just in case it's
 	 * different than attached TWebControl.  If none is provided, the outer templates default to the attached
 	 * control
 	 * @return boolean returns true if the template decorations have been added
 	 */
 	public function ensureTemplateDecoration($sender=null, $param=null) {
-	
+
 		$control = $this->_control;
 		$outercontrol = $this->_outercontrol;
 		if($outercontrol === null)
 			$outercontrol = $control;
-			
+
 		if($this->_addedTemplateDecoration)
 			return $this->_addedTemplateDecoration;
-		
+
 		$this->_addedTemplateDecoration = true;
-		
+
 		if($this->getPreContentsTemplate())
 		{
 			$precontents = Prado::createComponent('TCompositeControl');
 			$this->getPreContentsTemplate()->instantiateIn($precontents);
 			$control->getControls()->insertAt(0, $precontents);
 		}
-		
+
 		if($this->getPostContentsTemplate())
 		{
 			$postcontents = Prado::createComponent('TCompositeControl');
 			$this->getPostContentsTemplate()->instantiateIn($postcontents);
 			$control->getControls()->add($postcontents);
 		}
-		
+
 		if(!$outercontrol->getParent())
 			return $this->_addedTemplateDecoration;
-		
-		
+
+
 		if($this->getPreTagTemplate())
 		{
 			$pretag = Prado::createComponent('TCompositeControl');
 			$this->getPreTagTemplate()->instantiateIn($pretag);
 			$outercontrol->getParent()->getControls()->insertBefore($outercontrol, $pretag);
 		}
-		
+
 		if($this->getPostTagTemplate())
 		{
 			$posttag = Prado::createComponent('TCompositeControl');
@@ -348,8 +346,8 @@ public function ensureTemplateDecoration($sender=null, $param=null) {
 		}
 		return true;
 	}
-	
-	
+
+
 	/**
 	 * This method places the pre tag text into the {@link TTextWriter}
 	 * @param {@link TTextWriter} the writer to which the text is written
@@ -357,7 +355,7 @@ public function ensureTemplateDecoration($sender=null, $param=null) {
 	public function renderPreTagText($writer) {
 		$writer->write($this->getPreTagText());
 	}
-	
+
 	/**
 	 * This method places the pre contents text into the {@link TTextWriter}
 	 * @param {@link TTextWriter} the writer to which the text is written
@@ -365,7 +363,7 @@ public function renderPreTagText($writer) {
 	public function renderPreContentsText($writer) {
 		$writer->write($this->getPreContentsText());
 	}
-	
+
 	/**
 	 * This method places the post contents text into the {@link TTextWriter}
 	 * @param {@link TTextWriter} the writer to which the text is written
@@ -373,7 +371,7 @@ public function renderPreContentsText($writer) {
 	public function renderPostContentsText($writer) {
 		$writer->write($this->getPostContentsText());
 	}
-	
+
 	/**
 	 * This method places the post tag text into the {@link TTextWriter}
 	 * @param {@link TTextWriter} the writer to which the text is written
diff --git a/framework/Web/UI/WebControls/TWizard.php b/framework/Web/UI/WebControls/TWizard.php
index 67cbc4e4c..6b82a691c 100644
--- a/framework/Web/UI/WebControls/TWizard.php
+++ b/framework/Web/UI/WebControls/TWizard.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: TWizard.php 3274 2013-02-15 08:32:25Z ctrlaltca $
  * @package System.Web.UI.WebControls
  */
 
@@ -77,7 +76,6 @@
  * - side bar: {@link getSideBarStyle SideBarStyle} and {@link getSideBarButtonStyle SideBarButtonStyle}.
  *
  * @author Qiang Xue 
- * @version $Id: TWizard.php 3274 2013-02-15 08:32:25Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -1449,7 +1447,6 @@ public function bubbleEvent($sender,$param)
  * set {@link setAllowReturn AllowReturn} to true.
  *
  * @author Qiang Xue 
- * @version $Id: TWizard.php 3274 2013-02-15 08:32:25Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -1539,7 +1536,6 @@ public function setStepType($type)
  * TCompleteWizardStep represents a wizard step of type TWizardStepType::Complete.
  *
  * @author Qiang Xue 
- * @version $Id: TWizard.php 3274 2013-02-15 08:32:25Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -1574,7 +1570,6 @@ public function setStepType($value)
  * if the navigation template is not specified, default navigation will be used.
  *
  * @author Qiang Xue 
- * @version $Id: TWizard.php 3274 2013-02-15 08:32:25Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -1676,7 +1671,6 @@ public function instantiateNavigationTemplate()
  * by a {@link TWizard}.
  *
  * @author Qiang Xue 
- * @version $Id: TWizard.php 3274 2013-02-15 08:32:25Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -1740,7 +1734,6 @@ public function removeAt($index)
  * {@link getCancelButton CancelButton}, {@link getCompleteButton CompleteButton}.
  *
  * @author Qiang Xue 
- * @version $Id: TWizard.php 3274 2013-02-15 08:32:25Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -1832,7 +1825,6 @@ public function setCompleteButton($value)
  * to true.
  *
  * @author Qiang Xue 
- * @version $Id: TWizard.php 3274 2013-02-15 08:32:25Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -1897,7 +1889,6 @@ public function setCancelNavigation($value)
  * TWizardSideBarTemplate class.
  * TWizardSideBarTemplate is the default template for wizard sidebar.
  * @author Qiang Xue 
- * @version $Id: TWizard.php 3274 2013-02-15 08:32:25Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -1922,7 +1913,6 @@ public function instantiateIn($parent)
  * TWizardSideBarListItemTemplate class.
  * TWizardSideBarListItemTemplate is the default template for each item in the sidebar datalist.
  * @author Qiang Xue 
- * @version $Id: TWizard.php 3274 2013-02-15 08:32:25Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -1945,7 +1935,6 @@ public function instantiateIn($parent)
  * TWizardNavigationTemplate class.
  * TWizardNavigationTemplate is the base class for various navigation templates.
  * @author Qiang Xue 
- * @version $Id: TWizard.php 3274 2013-02-15 08:32:25Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -2017,7 +2006,6 @@ protected function createNavigationButton($buttonStyle,$causesValidation,$comman
  * TWizardStartNavigationTemplate is the template used as default wizard start navigation panel.
  * It consists of two buttons, Next and Cancel.
  * @author Qiang Xue 
- * @version $Id: TWizard.php 3274 2013-02-15 08:32:25Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -2047,7 +2035,6 @@ public function instantiateIn($parent)
  * TWizardFinishNavigationTemplate is the template used as default wizard finish navigation panel.
  * It consists of three buttons, Previous, Complete and Cancel.
  * @author Qiang Xue 
- * @version $Id: TWizard.php 3274 2013-02-15 08:32:25Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -2081,7 +2068,6 @@ public function instantiateIn($parent)
  * TWizardStepNavigationTemplate is the template used as default wizard step navigation panel.
  * It consists of three buttons, Previous, Next and Cancel.
  * @author Qiang Xue 
- * @version $Id: TWizard.php 3274 2013-02-15 08:32:25Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
@@ -2122,7 +2108,6 @@ public function instantiateIn($parent)
  * - Link: a hyperlink button
  *
  * @author Qiang Xue 
- * @version $Id: TWizard.php 3274 2013-02-15 08:32:25Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.4
  */
@@ -2146,7 +2131,6 @@ class TWizardNavigationButtonType extends TEnumerable
  * - Finish: the last step before the Complete step.
  *
  * @author Qiang Xue 
- * @version $Id: TWizard.php 3274 2013-02-15 08:32:25Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0.4
  */
diff --git a/framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php b/framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php
index f0873df8e..c84f28a1f 100644
--- a/framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php
+++ b/framework/Web/UI/WebControls/TWizardNavigationButtonStyle.php
@@ -4,7 +4,7 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
  * @version $Id $
  * @package System.Web.UI.WebControls
@@ -25,7 +25,6 @@
  * Otherwise, {@link setButtonText ButtonText} will be displayed as the button caption.
  *
  * @author Qiang Xue 
- * @version $Id: TWizardNavigationButtonStyle.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls
  * @since 3.0
  */
diff --git a/framework/Web/UI/WebControls/TXmlTransform.php b/framework/Web/UI/WebControls/TXmlTransform.php
index 7b4d5cf74..c32ab440e 100644
--- a/framework/Web/UI/WebControls/TXmlTransform.php
+++ b/framework/Web/UI/WebControls/TXmlTransform.php
@@ -5,7 +5,7 @@
  * @author Knut Urdalen 
  * @author Qiang Xue 
  * @link http://www.pradosoft.com
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
  * @package System.Web.UI.WebControls
  */
diff --git a/framework/Web/UI/WebControls/assets/captcha.php b/framework/Web/UI/WebControls/assets/captcha.php
index ac71d696c..1c35e6eb2 100644
--- a/framework/Web/UI/WebControls/assets/captcha.php
+++ b/framework/Web/UI/WebControls/assets/captcha.php
@@ -4,9 +4,8 @@
  *
  * @author Qiang Xue 
  * @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2013 PradoSoft
+ * @copyright Copyright © 2005-2014 PradoSoft
  * @license http://www.pradosoft.com/license/
- * @version $Id: captcha.php 3245 2013-01-07 20:23:32Z ctrlaltca $
  * @package System.Web.UI.WebControls.assets
  */
 
@@ -116,7 +115,7 @@ function displayToken($token,$fontSize,$theme)
         	imagettftext($image,$size,$angle,$x+2,$y+2,$color,$font,$token[$i]);
         imagecolordeallocate($image,$color);
     }
-	
+
 	header('Content-Type: image/png');
 	imagepng($image);
 	imagedestroy($image);
diff --git a/framework/Wsat/TWsatARGenerator.php b/framework/Wsat/TWsatARGenerator.php
new file mode 100644
index 000000000..7ae5e46e5
--- /dev/null
+++ b/framework/Wsat/TWsatARGenerator.php
@@ -0,0 +1,283 @@
+
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright © 2005-2013 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @version $Id$
+ * @since 3.3
+ * @package Wsat
+ */
+
+Prado::using('System.Data.Common.TDbMetaData');
+
+class TWsatARGenerator
+{
+
+        /**
+         * @return TDbMetaData for retrieving metadata information, such as
+         * table and columns information, from a database connection.
+         */
+        private $_dbMetaData;
+
+        /**
+         * Output folder where AR classes will be saved.
+         */
+        private $_opFile;
+
+        /**
+         * Class name prefix
+         */
+        private $_clasPrefix;
+
+        /**
+         * Class name sufix
+         */
+        private $_classSufix;
+
+        /**
+         * all table relations array
+         */
+        private $_relations;
+
+        /**
+         * unquote chars
+         * @var array 
+         */
+        private $uqChars = array('[', ']', '"', '`', "'");
+
+        function __construct()
+        {
+                if(!class_exists("TActiveRecordManager", false))
+                        throw new Exception("You need to enable the ActiveRecord module in your application configuration file.");
+                $ar_manager = TActiveRecordManager::getInstance();
+                $_conn = $ar_manager->getDbConnection();
+                $_conn->Active = true;
+                $this->_dbMetaData = TDbMetaData::getInstance($_conn);
+        }
+
+        public function setOpFile($op_file_namespace)
+        {
+                $op_file = Prado::getPathOfNamespace($op_file_namespace);
+                if (empty($op_file))
+                        throw new Exception("You need to fix your output folder namespace.");
+                if (!is_dir($op_file))
+                        mkdir($op_file, 0777, true);
+                $this->_opFile = $op_file;
+        }
+
+        public function setClasPrefix($_clas_prefix)
+        {
+                $this->_clasPrefix = $_clas_prefix;
+        }
+
+        public function setClassSufix($_clas_sufix)
+        {
+                $this->_classSufix = $_clas_sufix;
+        }
+
+//-----------------------------------------------------------------------------    
+        // 
+        public function generate($tableName)
+        {
+                $tableInfo = $this->_dbMetaData->getTableInfo($tableName);
+                $this->_commonGenerate($tableName, $tableInfo);
+        }
+
+        public function generateAll()
+        {
+                foreach ($this->_dbMetaData->findTableNames() as $tableName)
+                {
+                        if ($tableName == "pradocache")
+                                continue;
+                        $tableInfo = $this->_dbMetaData->getTableInfo($tableName);
+                        if (!empty($this->_relations))
+                        {
+                                // Cancel generation of M-M relationships middle table
+                                if (count($tableInfo->getPrimaryKeys()) === 2 && count($tableInfo->getColumns()) === 2)//M-M relationships
+                                        continue;
+                        }
+                        $this->_commonGenerate($tableName, $tableInfo);
+                }
+        }
+
+        public function buildRelations()
+        {
+                $this->_relations = array();
+                foreach ($this->_dbMetaData->findTableNames() as $table_name)
+                {
+                        $tableInfo = $this->_dbMetaData->getTableInfo($table_name);
+                        $pks = $tableInfo->getPrimaryKeys();
+                        $fks = $tableInfo->getForeignKeys();
+
+                        if (count($pks) === 2 && count($tableInfo->getColumns()) === 2)//M-M relationships
+                        {
+                                $table_name_mm = $fks[0]["table"];
+                                $table_name_mm2 = $fks[1]["table"];
+
+                                $this->_relations[$table_name_mm][] = array(
+                                    "prop_name" => strtolower($table_name_mm2),
+                                    "rel_type" => "self::MANY_TO_MANY",
+                                    "ref_class_name" => $this->_getProperClassName($table_name_mm2),
+                                    "prop_ref" => $table_name
+                                );
+
+                                $this->_relations[$table_name_mm2][] = array(
+                                    "prop_name" => strtolower($table_name_mm),
+                                    "rel_type" => "self::MANY_TO_MANY",
+                                    "ref_class_name" => $this->_getProperClassName($table_name_mm),
+                                    "prop_ref" => $table_name
+                                );
+                                continue;
+                        }
+                        foreach ($fks as $fk_data)//1-M relationships
+                        {
+                                $owner_table = $fk_data["table"];
+                                $slave_table = $table_name;
+                                $fk_prop = key($fk_data["keys"]);
+
+                                $this->_relations[$owner_table][] = array(
+                                    "prop_name" => strtolower($slave_table),
+                                    "rel_type" => "self::HAS_MANY",
+                                    "ref_class_name" => $this->_getProperClassName($slave_table),
+                                    "prop_ref" => $fk_prop
+                                );
+
+                                $this->_relations[$slave_table][] = array(
+                                    "prop_name" => strtolower($owner_table),
+                                    "rel_type" => "self::BELONGS_TO",
+                                    "ref_class_name" => $this->_getProperClassName($owner_table),
+                                    "prop_ref" => $fk_prop
+                                );
+                        }
+                }
+        }
+
+// 
+//-----------------------------------------------------------------------------
+        // 
+
+        private function _commonGenerate($tableName, $tableInfo)
+        {
+                if (count($tableInfo->getColumns()) === 0)
+                        throw new Exception("Unable to find table or view $tableName in " . $this->_dbMetaData->getDbConnection()->getConnectionString() . ".");
+                else
+                {
+                        $properties = array();
+                        foreach ($tableInfo->getColumns() as $field => $column)
+                                $properties[] = $this->generateProperty($field, $column);
+                        $toString = $this->_buildSmartToString($tableInfo);
+                }
+
+                $clasName = $this->_getProperClassName($tableName);
+                $class = $this->generateClass($properties, $tableName, $clasName, $toString);
+                $output = $this->_opFile . DIRECTORY_SEPARATOR . $clasName . ".php";
+                file_put_contents($output, $class);
+        }
+
+        private function _getProperClassName($tableName)
+        {
+                $table_name_words = str_replace("_", " ", strtolower($tableName));
+                $final_conversion = str_replace(" ", "", ucwords($table_name_words));
+                return $this->_clasPrefix . $final_conversion . $this->_classSufix;
+        }
+
+        public function renderAllTablesInformation()
+        {
+                foreach ($this->_dbMetaData->findTableNames() as $table_name)
+                {
+                        echo $table_name . "
"; + + $tableInfo = $this->_dbMetaData->getTableInfo($table_name); + echo "Table info:" . "
"; + echo "
";
+                        var_dump($tableInfo);
+                        echo "
"; + } + } + +//----------------------------------------------------------------------------- + + protected function generateProperty($field, $column) + { + $prop = ''; + $name = '$' . $field; + + /* TODO use in version 2.0 */ + // $type = $column->getPHPType(); + + $prop .= "\tpublic $name;"; + return $prop; + } + + private function _renderRelations($tablename) + { + if (!isset($this->_relations[$tablename])) + return ""; + + $code = "\tpublic static \$RELATIONS = array ("; + foreach ($this->_relations[$tablename] as $rel_data) + $code .= "\n\t\t'" . $rel_data["prop_name"] . "' => array(" . $rel_data["rel_type"] . ", '" . $rel_data["ref_class_name"] . "', '" . $rel_data["prop_ref"] . "'),"; + + $code = substr($code, 0, -1); + $code .= "\n\t);"; + return $code; + } + + private function _buildSmartToString($tableInfo) + { + $code = "\tpublic function __toString() {"; + $property = "throw new THttpException(500, 'Not implemented yet.');"; + try + { + foreach ($tableInfo->getColumns() as $column) + { + if (isset($column->IsPrimaryKey) && $column->IsPrimaryKey) + $property = str_replace($this->uqChars, "", $column->ColumnName); + elseif ($column->PdoType == PDO::PARAM_STR && $column->DBType != "date") + { + $property = str_replace($this->uqChars, "", $column->ColumnName); + break; + } + } + } catch (Exception $ex) + { + Prado::trace($ex->getMessage()); + } + $code .= "\n\t\treturn \$this->$property;"; + $code .= "\n\t}"; + return $code; + } + + protected function generateClass($properties, $tablename, $classname, $toString) + { + $props = implode("\n", $properties); + $relations = $this->_renderRelations($tablename); + $date = date('Y-m-d h:i:s'); + $env_user = getenv("username"); + return << +} \ No newline at end of file diff --git a/framework/Wsat/TWsatService.php b/framework/Wsat/TWsatService.php new file mode 100644 index 000000000..63bfebc72 --- /dev/null +++ b/framework/Wsat/TWsatService.php @@ -0,0 +1,81 @@ + + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2005-2013 PradoSoft + * @license http://www.pradosoft.com/license/ + * @version $Id$ + * @since 3.3 + * @package Wsat + */ + +/** + * TWsatService class + * + * Wsat is inspired in both Asp.Net - Web Site Administration Tool(WSAT) and Yii's Gii. + * Wsat enables you to generate code saving your time in too many tedious tasks in a GUI fashion. + * + * Current options: + * 1- Generate one or all Active Record Classes from your DataBase. + * 1.1- Automatically generate all relations between the AR Classes (new). + * 1.2- Automatically generate the __toString() magic method in a smart way (new). + * + * To use TWsatService, configure it in the application configuration file like following: + * + * + * ... + * + * + * + * ...and then you need to go to http://localhost/yoursite/index.php?wsat=TWsatLogin + * and generate code and configure your site. + * + * Warning: You should only use Wsat in development mode. + */ +class TWsatService extends TPageService +{ + + private $_pass = ''; + + public function init($config) + { + if ($this->getApplication()->getMode() === TApplicationMode::Performance || $this->getApplication()->getMode() === TApplicationMode::Normal) + throw new TInvalidOperationException("You should not use Prado WSAT in any of the production modes."); + + if (empty($this->_pass)) + throw new TConfigurationException("You need to specify the Password attribute."); + + $this->setDefaultPage("TWsatHome"); + $this->_startThemeManager(); + parent::init($config); + } + + public function getBasePath() + { + $basePath = Prado::getPathOfNamespace("System.Wsat.pages"); + return realpath($basePath); + } + + private function _startThemeManager() + { + $themeManager = new TThemeManager; + $themeManager->BasePath = "System.Wsat.themes"; + $url = Prado::getApplication()->getAssetManager()->publishFilePath(Prado::getPathOfNamespace('System.Wsat')); + $themeManager->BaseUrl = "$url/themes"; + + $themeManager->init(null); + $this->setThemeManager($themeManager); + } + + public function getPassword() + { + return $this->_pass; + } + + public function setPassword($_pass) + { + $this->_pass = $_pass; + } + +} \ No newline at end of file diff --git a/framework/Wsat/pages/TWsatGenerateAR.page b/framework/Wsat/pages/TWsatGenerateAR.page new file mode 100644 index 000000000..926d6b0f6 --- /dev/null +++ b/framework/Wsat/pages/TWsatGenerateAR.page @@ -0,0 +1,56 @@ + +
Active Record Classes Generator
+
+
+ +
+
+
    +
  • If you want to generate all AR Classes, keep the "Table Name" field as appears by default.
  • +
  • "Output Folder" field refers to the directory that the new AR class file should be generated under... where Application refers to the protected folder of your project. You can let this default field value and PRADO will create the proper folders for you.
  • +
+
+
+ +
+
+ + + + +
+ +
+ + + + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + + + + +
+
+ + +
+
+ +
diff --git a/framework/Wsat/pages/TWsatGenerateAR.php b/framework/Wsat/pages/TWsatGenerateAR.php new file mode 100644 index 000000000..f0ce8430a --- /dev/null +++ b/framework/Wsat/pages/TWsatGenerateAR.php @@ -0,0 +1,57 @@ + + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2005-2013 PradoSoft + * @license http://www.pradosoft.com/license/ + * @version $Id$ + * @since 3.3 + * @package Wsat.pages + */ +Prado::using("System.Wsat.TWsatARGenerator"); + +class TWsatGenerateAR extends TPage +{ + + public function generate($sender) + { + if ($this->IsValid) + { + $tableName = $this->table_name->Text; + $outputFolderNs = $this->output_folder->Text; + $classPrefix = $this->class_prefix->Text; + $classSuffix = $this->class_suffix->Text; + + try + { + $ar_generator = new TWsatARGenerator(); + $ar_generator->setOpFile($outputFolderNs); + $ar_generator->setClasPrefix($classPrefix); + $ar_generator->setClassSufix($classSuffix); + + if ($this->build_rel->Checked) + $ar_generator->buildRelations(); + + if ($tableName != "*") + $ar_generator->generate($tableName); + else + $ar_generator->generateAll(); + + $this->feedback_panel->CssClass = "green_panel"; + $this->generation_msg->Text = "The code has been generated successfully."; + } catch (Exception $ex) + { + $this->feedback_panel->CssClass = "red_panel"; + $this->generation_msg->Text = $ex->getMessage(); + } + $this->feedback_panel->Visible = true; + } + } + + public function preview($sender) + { +// throw new THttpException(500, "Not implemented yet."); + } + +} \ No newline at end of file diff --git a/framework/Wsat/pages/TWsatHome.page b/framework/Wsat/pages/TWsatHome.page new file mode 100644 index 000000000..e8796ccdb --- /dev/null +++ b/framework/Wsat/pages/TWsatHome.page @@ -0,0 +1,17 @@ + + + +
Application Dir: <%= Prado::getPathOfNamespace('Application') %>
+ +
+ + + + + +
+ + + Enables you to generate all Active Record Classes with relations included. +
+
diff --git a/framework/Wsat/pages/TWsatHome.php b/framework/Wsat/pages/TWsatHome.php new file mode 100644 index 000000000..b5ae1bb49 --- /dev/null +++ b/framework/Wsat/pages/TWsatHome.php @@ -0,0 +1,17 @@ + + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2005-2013 PradoSoft + * @license http://www.pradosoft.com/license/ + * @version $Id$ + * @since 3.3 + * @package Wsat.pages + */ +Prado::using("System.Wsat.TWsatARGenerator"); + +class TWsatHome extends TPage +{ + +} \ No newline at end of file diff --git a/framework/Wsat/pages/TWsatLogin.page b/framework/Wsat/pages/TWsatLogin.page new file mode 100644 index 000000000..79578f592 --- /dev/null +++ b/framework/Wsat/pages/TWsatLogin.page @@ -0,0 +1,45 @@ +<%@ MasterClass="" %> + + + + + + + + + + + +
+ + + + + + + + + diff --git a/framework/Wsat/pages/TWsatLogin.php b/framework/Wsat/pages/TWsatLogin.php new file mode 100644 index 000000000..21994c077 --- /dev/null +++ b/framework/Wsat/pages/TWsatLogin.php @@ -0,0 +1,33 @@ + + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2005-2013 PradoSoft + * @license http://www.pradosoft.com/license/ + * @version $Id$ + * @since 3.3 + * @package Wsat.pages + */ +class TWsatLogin extends TPage +{ + + public function login() + { + if ($this->IsValid) + { + $this->Session["wsat_password"] = $this->getService()->getPassword(); + + $url = $this->Service->constructUrl('TWsatHome'); + $this->Response->redirect($url); + } + } + + public function validatePassword($sender, $param) + { + $config_pass = $this->Service->Password; + $user_pass = $this->password->Text; + $param->IsValid = $user_pass === $config_pass; + } + +} \ No newline at end of file diff --git a/framework/Wsat/pages/TWsatScaffolding.page b/framework/Wsat/pages/TWsatScaffolding.page new file mode 100644 index 000000000..cce1d5c9b --- /dev/null +++ b/framework/Wsat/pages/TWsatScaffolding.page @@ -0,0 +1,3 @@ + + Scaffolding will be available in Prado 3.4 + diff --git a/framework/Wsat/pages/TWsatScaffolding.php b/framework/Wsat/pages/TWsatScaffolding.php new file mode 100644 index 000000000..b8e28b03a --- /dev/null +++ b/framework/Wsat/pages/TWsatScaffolding.php @@ -0,0 +1,17 @@ + + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2005-2013 PradoSoft + * @license http://www.pradosoft.com/license/ + * @version $Id$ + * @since 3.3 + * @package Wsat.pages + */ +Prado::using("System.Wsat.TWsatARGenerator"); + +class TWsatScaffolding extends TPage +{ + +} \ No newline at end of file diff --git a/framework/Wsat/pages/config.xml b/framework/Wsat/pages/config.xml new file mode 100644 index 000000000..727e8eab7 --- /dev/null +++ b/framework/Wsat/pages/config.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/framework/Wsat/pages/layout/TWsatLayout.php b/framework/Wsat/pages/layout/TWsatLayout.php new file mode 100644 index 000000000..67caa77df --- /dev/null +++ b/framework/Wsat/pages/layout/TWsatLayout.php @@ -0,0 +1,36 @@ +validateSecurity(); + } + + private function validateSecurity() + { + if ($this->Session["wsat_password"] !== $this->getService()->getPassword()) + { + if (!$this->getPage() instanceof TWsatLogin) + { + $url = $this->Service->constructUrl('TWsatLogin'); + $this->Response->redirect($url); + } + } + } + + public function logout() + { + $this->Session["wsat_password"] = ""; + $url = $this->Service->constructUrl('TWsatLogin'); + $this->Response->redirect($url); + } + +} \ No newline at end of file diff --git a/framework/Wsat/pages/layout/TWsatLayout.tpl b/framework/Wsat/pages/layout/TWsatLayout.tpl new file mode 100644 index 000000000..d91ff3338 --- /dev/null +++ b/framework/Wsat/pages/layout/TWsatLayout.tpl @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + +
+
+
+
Code Generation
+
    +
  • +
  • +
+
+
+ +
+ +
+ +
+
+ + +
+ + \ No newline at end of file diff --git a/framework/Wsat/themes/.htaccess b/framework/Wsat/themes/.htaccess new file mode 100644 index 000000000..f7661d049 --- /dev/null +++ b/framework/Wsat/themes/.htaccess @@ -0,0 +1 @@ +allow from all diff --git a/framework/Wsat/themes/PradoSoft/imgs/arrowdown.gif b/framework/Wsat/themes/PradoSoft/imgs/arrowdown.gif new file mode 100644 index 000000000..1b508cd60 Binary files /dev/null and b/framework/Wsat/themes/PradoSoft/imgs/arrowdown.gif differ diff --git a/framework/Wsat/themes/PradoSoft/imgs/mantisbg.jpg b/framework/Wsat/themes/PradoSoft/imgs/mantisbg.jpg new file mode 100644 index 000000000..ee06998d7 Binary files /dev/null and b/framework/Wsat/themes/PradoSoft/imgs/mantisbg.jpg differ diff --git a/framework/Wsat/themes/PradoSoft/imgs/pradologo.gif b/framework/Wsat/themes/PradoSoft/imgs/pradologo.gif new file mode 100644 index 000000000..3b073b80c Binary files /dev/null and b/framework/Wsat/themes/PradoSoft/imgs/pradologo.gif differ diff --git a/framework/Wsat/themes/PradoSoft/main.css b/framework/Wsat/themes/PradoSoft/main.css new file mode 100644 index 000000000..9970c88b9 --- /dev/null +++ b/framework/Wsat/themes/PradoSoft/main.css @@ -0,0 +1,152 @@ +html, body{ + margin: 0px; + padding: 0px; + font-family: 'Lucida Grande', Verdana, Geneva, Lucida, Helvetica, Arial, sans-serif; + font-weight: normal; +} + +#header { + font-size:25px; + font-weight:bold; + color: #666; +} + +.logo{ + width: 204px; + height:100px; + background-image: url('imgs/pradologo.gif'); + background-repeat: no-repeat; + float: left; +} + +.mantisbg{ + width: 221px; + height: 100px; + background-image: url('imgs/mantisbg.jpg'); + background-repeat: no-repeat; + float: right; +} + +.mainmenu { + padding:10px; + padding-right:10px; + background:#EDEDED; + border-bottom: 1px solid #A6A6A6; + border-top: 1px solid #DCDCDC; + color:white; + text-align:right; + font-size: 10pt; +} + +.mainmenu a { + color:#737373; + text-decoration:none; +} + +.mainmenu a:hover { + color: #FF0000; +} + +#toc { + background-color: #F3F3F3; + width:220px; + padding:0px 10px 0px 10px; + float: left; +} + +#content { + padding: 1em 1em 1em 1em; + line-height: 135%; + float: left; + width: 700px; +} + +.topic { + font-size: 9pt; + padding: 0px 0px 0px 0px; +} + +.topic div { + background-image: url('imgs/arrowdown.gif'); + background-repeat: no-repeat; + background-position: left center; + margin: 0px; + font-size: 8pt; + font-weight:bold; + color:#2A480A; + padding: 5px; + padding-left: 15px; + border-top: 1px solid #fff; + border-bottom: 1px solid #E2E2E2; +} + +.topic ul +{ + margin: 0px; + padding: 0px; +} + +.topic ul li +{ + list-style: none; + margin: 0px; + padding: 5px; + padding-left: 15px; + border-bottom: 1px dotted #D8D8D8; +} + +.topic a { + color:#4F811A; + font-size: 8pt; + text-decoration: none; +} + +.topic a:hover { + color:#2A480A; +} + +/* form styles */ +.form_row{ + margin: 10px; +} + +.in_text{ + width: 250px; +} + +.login_form{ + text-align: center; + margin: 30px auto; + border: 1px solid red; + border-radius: 5px; + padding: 10px; + width: 250px; + font-size: 11px; +} + +.green_panel{ + background-color: #C5FBBD; + border: 1px solid #76C376; + padding: 10px; + margin: 10px 0; + border-radius: 5px; + text-align: center; +} + +.red_panel{ + background-color: #ff6666; + border: 1px solid red; + padding: 10px; + margin: 10px 0; + border-radius: 5px; + text-align: center; +} + +#footer { + clear:both; + color: gray; + font-size:8pt; + text-align:center; + margin-top:25px; + padding:10px; +} \ No newline at end of file diff --git a/framework/Xml/TXmlDocument.php b/framework/Xml/TXmlDocument.php index b0252ae89..69017660a 100644 --- a/framework/Xml/TXmlDocument.php +++ b/framework/Xml/TXmlDocument.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TXmlDocument.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Xml */ @@ -22,7 +21,6 @@ * TBD: xpath * * @author Qiang Xue - * @version $Id: TXmlDocument.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Xml * @since 3.0 */ @@ -300,7 +298,6 @@ private function xmlEncode($str) * * * @author Qiang Xue - * @version $Id: TXmlDocument.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Xml * @since 3.0 */ @@ -478,7 +475,7 @@ public function __toString() * @param DOMXmlNode the node to be converted * @return TXmlElement the converted TXmlElement */ - private function buildElement($node) + protected function buildElement($node) { $element=new TXmlElement($node->tagName); $element->setValue($node->nodeValue); @@ -502,7 +499,6 @@ private function buildElement($node) * You may manipulate the collection with the operations defined in {@link TList}. * * @author Qiang Xue - * @version $Id: TXmlDocument.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Xml * @since 3.0 */ diff --git a/framework/interfaces.php b/framework/interfaces.php index d05123ba2..1c2bbc199 100644 --- a/framework/interfaces.php +++ b/framework/interfaces.php @@ -4,9 +4,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: interfaces.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System */ @@ -16,7 +15,6 @@ * This interface must be implemented by application modules. * * @author Qiang Xue - * @version $Id: interfaces.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System * @since 3.0 */ @@ -43,7 +41,6 @@ public function setID($id); * This interface must be implemented by services. * * @author Qiang Xue - * @version $Id: interfaces.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System * @since 3.0 */ @@ -82,7 +79,6 @@ public function run(); * This interface must be implemented by writers. * * @author Qiang Xue - * @version $Id: interfaces.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System * @since 3.0 */ @@ -106,7 +102,6 @@ public function flush(); * This interface must be implemented by user objects. * * @author Qiang Xue - * @version $Id: interfaces.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System * @since 3.0 */ @@ -159,7 +154,6 @@ public function loadFromString($string); * {@link TPageStatePersister}, {@link TApplicationStatePersister}. * * @author Qiang Xue - * @version $Id: interfaces.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System * @since 3.0 */ @@ -184,7 +178,6 @@ public function save($state); * This interface must be implemented by cache managers. * * @author Qiang Xue - * @version $Id: interfaces.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System * @since 3.0 */ @@ -240,7 +233,6 @@ public function flush(); * Classes implementing this interface must support serialization and unserialization. * * @author Qiang Xue - * @version $Id: interfaces.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System * @since 3.0 */ @@ -259,7 +251,6 @@ public function getHasChanged(); * to end-users. * * @author Qiang Xue - * @version $Id: interfaces.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System * @since 3.0 */ @@ -278,7 +269,6 @@ public function render($writer); * This interface must be implemented by classes that are capable of performing databinding. * * @author Qiang Xue - * @version $Id: interfaces.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System * @since 3.0 */ @@ -296,7 +286,6 @@ public function dataBind(); * This interface should be implemented by classes that support CSS styles. * * @author Qiang Xue - * @version $Id: interfaces.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System * @since 3.1.0 */ @@ -322,7 +311,6 @@ public function clearStyle(); * Active controls must implement IActiveControl interface. * * @author Wei Zhuo - * @version $Id: interfaces.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System * @since 3.1 */ @@ -341,7 +329,6 @@ public function getActiveControl(); * interface. * * @author Wei Zhuo - * @version $Id: interfaces.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System * @since 3.1 */ @@ -363,7 +350,6 @@ public function raiseCallbackEvent($eventArgument); * this interface must be implemented. * * @author Qiang Xue - * @version $Id: interfaces.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System * @since 3.1 */ diff --git a/framework/prado.php b/framework/prado.php index 0bb11789e..1dd4bb475 100644 --- a/framework/prado.php +++ b/framework/prado.php @@ -12,9 +12,8 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: prado.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System */ @@ -32,7 +31,6 @@ * Prado class. * * @author Qiang Xue - * @version $Id: prado.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System * @since 3.0 */ diff --git a/framework/pradolite.php b/framework/pradolite.php index d9627d133..a01c3f984 100644 --- a/framework/pradolite.php +++ b/framework/pradolite.php @@ -1,7 +1,7 @@ write($str."\n"); } } -class TPriorityList extends TList +class TPriorityList extends TList { private $_d=array(); private $_o=false; @@ -1483,7 +1483,7 @@ public function priorityOf($item,$withindex = false) foreach($this->_d as $priority=>$items) { if(($index=array_search($item,$items,true))!==false) { $absindex+=$index; - return $withindex?array($priority,$index,$absindex, + return $withindex?array($priority,$index,$absindex, 'priority'=>$priority,'index'=>$index,'absindex'=>$absindex):$priority; } else $absindex+=count($items); @@ -1500,7 +1500,7 @@ public function priorityAt($index,$withindex = false) if($index>=($c=count($items))) $index-=$c; else - return $withindex?array($priority,$index,$absindex, + return $withindex?array($priority,$index,$absindex, 'priority'=>$priority,'index'=>$index,'absindex'=>$absindex):$priority; } return false; @@ -2393,7 +2393,7 @@ public function __toString() { return $this->saveToString(); } - private function buildElement($node) + protected function buildElement($node) { $element=new TXmlElement($node->tagName); $element->setValue($node->nodeValue); @@ -2895,14 +2895,23 @@ public static function encode($value,$toMap=true,$encodeEmptyStrings=false) } public static function jsonEncode($value, $options = 0) { - if (is_string($value) && - ($g=Prado::getApplication()->getGlobalization(false))!==null && - strtoupper($enc=$g->getCharset())!='UTF-8') - $value=iconv($enc, 'UTF-8', $value); + if (($g=Prado::getApplication()->getGlobalization(false))!==null && + strtoupper($enc=$g->getCharset())!='UTF-8') { + self::convertToUtf8($value, $enc); + } $s = @json_encode($value,$options); self::checkJsonError(); return $s; } + private static function convertToUtf8(&$value, $sourceEncoding) { + if(is_string($value)) + $value=iconv($sourceEncoding, 'UTF-8', $value); + else if (is_array($value)) + { + foreach($value as &$element) + self::convertToUtf8($element, $sourceEncoding); + } + } public static function jsonDecode($value, $assoc = false, $depth = 512) { $s= @json_decode($value, $assoc, $depth); @@ -3129,7 +3138,7 @@ protected function cacheUrlManager($manager) if($this->getEnableCache()) { $cache = $this->getApplication()->getCache(); - if($cache !== null) + if($cache !== null) { $dependencies = null; if($this->getApplication()->getMode() !== TApplicationMode::Performance) @@ -6385,7 +6394,7 @@ public function setPostTagTemplate($value) { $this->_posttagtemplate = $value; } public function instantiate($outercontrol = null) { - if($this->getPreTagTemplate() || $this->getPreContentsTemplate() || + if($this->getPreTagTemplate() || $this->getPreContentsTemplate() || $this->getPostContentsTemplate() || $this->getPostTagTemplate()) { $this->_outercontrol = $outercontrol; if($this->getUseState()) @@ -6684,7 +6693,7 @@ public function renderEndTag($writer) $decorator->renderPostContentsText($writer); $writer->renderEndTag(); $decorator->renderPostTagText($writer); - } else + } else $writer->renderEndTag($writer); } } @@ -7089,7 +7098,7 @@ public function registerFocusControl($target) if($target instanceof TControl) $target=$target->getClientID(); $id = TJavaScript::quoteString($target); - $this->_endScripts['prado:focus'] = 'new Effect.ScrollTo('.$id.'); Prado.Element.focus('.$id.');'; + $this->_endScripts['prado:focus'] = 'Prado.Element.focus('.$id.');'; $params=func_get_args(); $this->_page->registerCachingAction('Page.ClientScript','registerFocusControl',$params); } @@ -7281,8 +7290,11 @@ public function renderHiddenFieldsEnd($writer) } public function flushScriptFiles($writer, $control=null) { - $this->_page->ensureRenderInForm($control); - $this->renderAllPendingScriptFiles($writer); + if(!$this->_page->getIsCallback()) + { + $this->_page->ensureRenderInForm($control); + $this->renderAllPendingScriptFiles($writer); + } } protected function renderHiddenFieldsInt($writer, $initial) { @@ -7306,7 +7318,7 @@ protected function renderHiddenFieldsInt($writer, $initial) if($str!=='') $writer->write("
\n".$str."
\n"); } - public function getHiddenFields() + public function getHiddenFields() { return $this->_hiddenFields; } @@ -7465,6 +7477,9 @@ protected function processCallbackRequest($writer) { Prado::using('System.Web.UI.ActiveControls.TActivePageAdapter'); $this->setAdapter(new TActivePageAdapter($this)); + $callbackEventParameter = $this->getRequest()->itemAt(TPage::FIELD_CALLBACK_PARAMETER); + if(strlen($callbackEventParameter) > 0) + $this->_postData[TPage::FIELD_CALLBACK_PARAMETER]=TJavaScript::jsonDecode((string)$callbackEventParameter); if (($g=$this->getApplication()->getGlobalization(false))!==null && strtoupper($enc=$g->getCharset())!='UTF-8') foreach ($this->_postData as $k=>$v) @@ -9672,7 +9687,7 @@ public function loadFromFile($fname,$configPagePath) $this->loadFromPhp($fcontent,dirname($fname),$configPagePath); } else - { + { $dom=new TXmlDocument; if($dom->loadFromFile($fname)) $this->loadFromXml($dom,dirname($fname),$configPagePath); @@ -9759,7 +9774,7 @@ public function loadPageConfigurationFromPhp($config, $configPath, $configPagePa if(isset($page['properties'])) { $properties=$page['properties']; - unset($page['properties']); + unset($page['properties']); } $matching=false; $id=($configPagePath==='')?$id:$configPagePath.'.'.$id; @@ -10173,7 +10188,7 @@ class TApplication extends TComponent const STATE_PERFORMANCE='Performance'; const PAGE_SERVICE_ID='page'; const CONFIG_FILE_XML='application.xml'; - const CONFIG_FILE_EXT_XML='.xml'; + const CONFIG_FILE_EXT_XML='.xml'; const CONFIG_TYPE_XML = 'xml'; const CONFIG_FILE_PHP='application.php'; const CONFIG_FILE_EXT_PHP='.php'; @@ -10822,7 +10837,7 @@ public function loadFromPhp($config, $configPath) $this->_properties[$name]=$value; } $this->_empty = false; - } + } if(isset($config['paths']) && is_array($config['paths'])) $this->loadPathsPhp($config['paths'],$configPath); if(isset($config['modules']) && is_array($config['modules'])) @@ -10946,7 +10961,7 @@ protected function loadModulesPhp($modulesNode, $configPath) $properties['id'] = $id; $this->_modules[$id]=array($type,$properties,$module); $this->_empty=false; - } + } } protected function loadModulesXml($modulesNode,$configPath) { @@ -10982,7 +10997,7 @@ protected function loadServicesPhp($servicesNode,$configPath) $properties['id'] = $id; $this->_services[$id] = array($type,$properties,$service); $this->_empty = false; - } + } } protected function loadServicesXml($servicesNode,$configPath) { diff --git a/index.html b/index.html index 37a2a60d3..e35a5d631 100644 --- a/index.html +++ b/index.html @@ -8,8 +8,8 @@

PRADO Framework for PHP 5

-

Version 3.2.3
-Copyright© 2004-2013 by Prado Software
+

Version 3.2.4
+Copyright© 2004-2014 by Prado Software
All Rights Reserved.

@@ -152,7 +152,7 @@

License

the terms of the following BSD License.

-Copyright 2004-2013 by The PRADO Group (http://www.pradosoft.com)
+Copyright 2004-2014 by The PRADO Group (http://www.pradosoft.com)
All rights reserved.

diff --git a/requirements/index.php b/requirements/index.php index b5b6dc82e..2fd392ba7 100644 --- a/requirements/index.php +++ b/requirements/index.php @@ -6,7 +6,6 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: index.php 3281 2013-03-13 21:01:40Z ctrlaltca $ * @package prado */ @@ -291,5 +290,3 @@ function getPradoVersion() } return ''; } - -?> \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveBricksTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveBricksTest.page index 7cb8c6b3b..f3df76a21 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveBricksTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveBricksTest.page @@ -1,4 +1,4 @@ - +

Some AJAX Tests

@@ -37,6 +37,4 @@ AIP - - - \ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page index 2e192c190..9e2939349 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page @@ -1,4 +1,4 @@ - +

TActiveButton Functional Test

- - -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page index 431d42f2a..297cde15d 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page @@ -1,4 +1,4 @@ - +

Active CheckBox Test

@@ -25,5 +25,4 @@ position: absolute; right: 0; top: 0"> Loading... - -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.page index 7b983cd74..5a1c5023c 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlExpressionTag.page @@ -1,4 +1,4 @@ - +

Active Control With Expression Tag Test

@@ -22,6 +22,5 @@ - -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.page index aa3be7546..9a5614588 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveControlWithTinyMce.page @@ -1,4 +1,4 @@ - +

Active Control with TinyMCE

@@ -7,5 +7,4 @@ - -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page index 881177448..ce40e1cbb 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page @@ -1,15 +1,12 @@ - - - - +

TActiveDatePicker test

-
+

ShowCalendar=false @@ -23,6 +20,4 @@ ShowCalendar=false
- - - \ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.page index dc71a2284..bf15ba0ee 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveDropDownList.page @@ -1,4 +1,4 @@ - +

Active Drop Down List Test Case

@@ -26,6 +26,4 @@ - - -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveHiddenFieldTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveHiddenFieldTest.page index f0fc4b924..317da6430 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveHiddenFieldTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveHiddenFieldTest.page @@ -1,9 +1,9 @@ - +

Active HiddenField Test Case

- + - +
@@ -12,5 +12,4 @@
- - \ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveHyperLinkTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveHyperLinkTest.page index 59098052d..9b149b455 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveHyperLinkTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveHyperLinkTest.page @@ -1,6 +1,6 @@ - +

Active HyperLink Test Case

- +
@@ -8,6 +8,4 @@ - - -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.page index 7696261a1..15cf23800 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.page @@ -1,4 +1,4 @@ - +

TActiveImageButton Functional Test

@@ -19,6 +19,4 @@ - - -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.page index cb9f0322f..16ea578d1 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveLinkButtonTest.page @@ -1,4 +1,4 @@ - +

TActiveLinkButton Functional Test

- - -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.page index f7c6baaff..115b833a7 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxMasterTest.page @@ -23,6 +23,4 @@
- -
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.page index 318d53c37..2bf480b43 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveListBoxTest.page @@ -1,4 +1,4 @@ - +

Active List Box Functional Test

@@ -22,6 +22,4 @@ - - -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page index 7ab4bab9f..5eadcb77d 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page @@ -1,4 +1,4 @@ - +

Active Panel replacement tests

@@ -9,14 +9,13 @@
Click Me!
- - -
\ No newline at end of file + }); + + diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.page index 0795e46b9..93684bef0 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelVisibleTest.page @@ -1,4 +1,4 @@ - +

ActivePanel Visible Test

@@ -12,6 +12,5 @@ bar - -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.page index 26feb594e..e222a70fa 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.page @@ -1,4 +1,4 @@ - +

TActiveRadioButtonList Test Case

@@ -17,6 +17,4 @@ - - -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.page index 2bb4c9de5..66587943c 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.page @@ -1,4 +1,4 @@ - +

Active Radio Button Test

Loading... - -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.page index 35fcadc71..d3c551b40 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.page @@ -1,5 +1,4 @@ - - +

TActiveRatingList AllowInput Test Case

@@ -11,4 +10,4 @@ -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.page index 84ce4ef37..e0d3cbbed 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.page @@ -1,5 +1,4 @@ - - +

TActiveRatingList AutoPostBack Test Case

@@ -13,4 +12,4 @@
-
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.page index 36f4404d2..cba50947f 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.page @@ -1,5 +1,4 @@ - - +

TActiveRatingList Check Boxes Test Case

@@ -9,4 +8,4 @@ -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.page index 5f732e0dc..791176dfe 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.page @@ -1,5 +1,4 @@ - - +

TActiveRatingList Enabled Test Case

@@ -14,4 +13,4 @@
-
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.page index 01e47a342..0a2a5f501 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.page @@ -1,5 +1,4 @@ - - +

TActiveRatingList Hover Caption Test Case

@@ -11,4 +10,4 @@ -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.page index 942a5b45c..c9aed5b4d 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.page @@ -1,5 +1,4 @@ - - +

TActiveRatingList Rating Test Case

@@ -14,4 +13,4 @@
-
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.page index dad3fd6ef..70220e58e 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.page @@ -1,5 +1,4 @@ - - +

TActiveRatingList ReadOnly Test Case

@@ -14,4 +13,4 @@
-
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.page index 6fb528227..ee26568da 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.page @@ -1,5 +1,4 @@ - - +

TActiveRatingList SelectedIndex Test Case

@@ -14,4 +13,4 @@
-
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.page index 5f7959c5d..8f4e175dc 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRedirectionTest.page @@ -1,8 +1,7 @@ - +

Redirection Test

- -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveTextBoxCallback.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveTextBoxCallback.page index b05ce62e7..50b244b56 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveTextBoxCallback.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveTextBoxCallback.page @@ -1,6 +1,5 @@ - +

ActiveTextBox Callback Test

- -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page b/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page index 477764c34..98745b555 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page @@ -1,4 +1,4 @@ - + -
- - + + />
- -
\ No newline at end of file +
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.page b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.page index 701bd74c1..b4798fe18 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest.page @@ -1,12 +1,11 @@ - +

Large Page State Test

- -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.page b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.page index 0b6626175..56ad075ea 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.page +++ b/tests/FunctionalTests/active-controls/protected/pages/LargePageStateTest2.page @@ -1,13 +1,12 @@ <%@ StatePersisterClass="System.Web.UI.TSessionPageStatePersister" %> - +

Large Page State Test (using Session page state)

- -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/Layout.php b/tests/FunctionalTests/active-controls/protected/pages/Layout.php new file mode 100755 index 000000000..723f200c0 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/Layout.php @@ -0,0 +1,5 @@ + + + + + + + + + + +
+
+ + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.page b/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.page index ab4798a84..338683323 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.page @@ -1,7 +1,6 @@ - + - - \ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.page b/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.page index 7371086ab..c877c0832 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.page @@ -1,4 +1,4 @@ - +

My Tab Panel Test

@@ -36,6 +36,5 @@ This is the contents of panel C - -
+ diff --git a/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page b/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page index 9d3a3d617..9534f0c0a 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page +++ b/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page @@ -1,12 +1,12 @@ - +

Nested Active Controls Test

- Something lalala + Something lalala - + @@ -14,7 +14,7 @@ Click Me! - - - -
+ + + diff --git a/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page index 2ce98f5b6..6b5ed334b 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page @@ -1,10 +1,9 @@ - +

Null State Test

- -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.page b/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.page index c7bf09528..3ab9d8fb9 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.page +++ b/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.page @@ -1,4 +1,4 @@ - +

Populate active list controls

@@ -12,6 +12,5 @@ - -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page b/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page index 09ab2fbcd..0a8167c8c 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page @@ -1,4 +1,4 @@ - +

PostLoading Test

@@ -9,7 +9,7 @@ Click Me! - - - - -
\ No newline at end of file + + diff --git a/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.page b/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.page index 7de9c6ab2..e1a2cb936 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/RadioButtonListTest.page @@ -1,4 +1,4 @@ - + -
- + @@ -16,15 +16,14 @@



+ ValidationGroup="Group" /> - -
\ No newline at end of file + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/RatingList.page b/tests/FunctionalTests/active-controls/protected/pages/RatingList.page index ba9c2e5d7..6cb9d34a4 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/RatingList.page +++ b/tests/FunctionalTests/active-controls/protected/pages/RatingList.page @@ -1,5 +1,4 @@ - - + + + + + + + + \ No newline at end of file diff --git a/tests/FunctionalTests/issues/protected/pages/Issue504.page b/tests/FunctionalTests/issues/protected/pages/Issue504.page new file mode 100755 index 000000000..ed29b3587 --- /dev/null +++ b/tests/FunctionalTests/issues/protected/pages/Issue504.page @@ -0,0 +1,14 @@ + +

Issue 504 Test

+ + + + + Panel Content + + + + + +
+ diff --git a/tests/FunctionalTests/issues/protected/pages/Issue504.php b/tests/FunctionalTests/issues/protected/pages/Issue504.php new file mode 100755 index 000000000..dd12c9603 --- /dev/null +++ b/tests/FunctionalTests/issues/protected/pages/Issue504.php @@ -0,0 +1,14 @@ +label1->Text="buttonOkClick"; + } + + function buttonDummyClick($sender, $param) + { + $this->label1->Text="buttonDummyClick"; + } +} diff --git a/tests/FunctionalTests/issues/protected/pages/Issue516.page b/tests/FunctionalTests/issues/protected/pages/Issue516.page new file mode 100644 index 000000000..c922c6e16 --- /dev/null +++ b/tests/FunctionalTests/issues/protected/pages/Issue516.page @@ -0,0 +1,50 @@ + + +

Issue 516 Test

+ + + + + + + + + + + + + + +
+ diff --git a/tests/FunctionalTests/issues/protected/pages/Issue516.php b/tests/FunctionalTests/issues/protected/pages/Issue516.php new file mode 100644 index 000000000..bd3e7a724 --- /dev/null +++ b/tests/FunctionalTests/issues/protected/pages/Issue516.php @@ -0,0 +1,115 @@ +_data===null) + $this->loadData(); + return $this->_data; + } + + protected function loadData() + { + // We use viewstate keep track of data. + // In real applications, data should come from database using an SQL SELECT statement. + // In the following tabular data, field 'ISBN' is the primary key. + // All update and delete operations should come with an 'id' value in order to go through. + if(($this->_data=$this->getViewState('Data',null))===null) + { + $this->_data=array( + array( + 'ISBN'=>'0596007124', + 'title'=>'', + ), + array( + 'ISBN'=>'0201633612', + 'title'=>'Design Patterns: Elements of Reusable Object-Oriented Software', + ), + array( + 'ISBN'=>'0321247140', + 'title'=>'Design Patterns Explained : A New Perspective on Object-Oriented Design', + ), + array( + 'ISBN'=>'0201485672', + 'title'=>'Refactoring: Improving the Design of Existing Code', + ), + array( + 'ISBN'=>'0321213351', + 'title'=>'Refactoring to Patterns', + ), + array( + 'ISBN'=>'0735619670', + 'title'=>'Code Complete', + ), + array( + 'ISBN'=>'0321278658 ', + 'title'=>'Extreme Programming Explained : Embrace Change', + ), + ); + $this->saveData(); + } + } + + protected function saveData() + { + $this->setViewState('Data',$this->_data); + } + + protected function updateBook($isbn,$title) + { + // In real applications, data should be saved to database using an SQL UPDATE statement + if($this->_data===null) + $this->loadData(); + $updateRow=null; + foreach($this->_data as $index=>$row) + if($row['ISBN']===$isbn) + $updateRow=&$this->_data[$index]; + if($updateRow!==null) + { + $updateRow['title']=$title; + $this->saveData(); + } + } + + public function onLoad($param) + { + parent::onLoad($param); + if(!$this->IsPostBack && !$this->IsCallBack) + { + $this->DataGrid->DataSource=$this->Data; + $this->DataGrid->dataBind(); + } + } + + public function editItem($sender,$param) + { + $this->DataGrid->EditItemIndex=$param->Item->ItemIndex; + $this->DataGrid->DataSource=$this->Data; + $this->DataGrid->dataBind(); + } + + public function saveItem($sender,$param) + { + $item=$param->Item; + $this->updateBook( + $this->DataGrid->DataKeys[$item->ItemIndex], // ISBN + $item->BookTitleColumn->TextBox->Text // title + ); + $this->DataGrid->EditItemIndex=-1; + $this->DataGrid->DataSource=$this->Data; + $this->DataGrid->dataBind(); + } + + public function cancelItem($sender,$param) + { + $this->DataGrid->EditItemIndex=-1; + $this->DataGrid->DataSource=$this->Data; + $this->DataGrid->dataBind(); + } + +} diff --git a/tests/FunctionalTests/issues/protected/pages/Issue524.page b/tests/FunctionalTests/issues/protected/pages/Issue524.page new file mode 100755 index 000000000..08ac18149 --- /dev/null +++ b/tests/FunctionalTests/issues/protected/pages/Issue524.page @@ -0,0 +1,7 @@ + +

Issue 524 Test

+ + + +
+ diff --git a/tests/FunctionalTests/issues/protected/pages/Issue524.php b/tests/FunctionalTests/issues/protected/pages/Issue524.php new file mode 100755 index 000000000..851ff45a0 --- /dev/null +++ b/tests/FunctionalTests/issues/protected/pages/Issue524.php @@ -0,0 +1,20 @@ +getGlobalization()->setCharset('ISO-8859-1'); + parent::__construct(); + } + + public function validateText($sender, $param) + { + $param->IsValid = false; + $iso8859text=iconv('utf-8', 'iso-8859-1', 'fünf'); + $this->Validator->ErrorMessage = $iso8859text; + } + +} diff --git a/tests/FunctionalTests/issues/protected/runtime/.gitignore b/tests/FunctionalTests/issues/protected/runtime/.gitignore new file mode 100755 index 000000000..d6b7ef32c --- /dev/null +++ b/tests/FunctionalTests/issues/protected/runtime/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/FunctionalTests/issues/tests/Issue504TestCase.php b/tests/FunctionalTests/issues/tests/Issue504TestCase.php new file mode 100755 index 000000000..dff27339a --- /dev/null +++ b/tests/FunctionalTests/issues/tests/Issue504TestCase.php @@ -0,0 +1,16 @@ +url('issues/index.php?page=Issue504'); + $this->assertContains('Issue 504 Test', $this->source()); + $base='ctl0_Content_'; + + $this->byID("{$base}textbox1")->click(); + $this->keys(PHPUnit_Extensions_Selenium2TestCase_Keys::ENTER); + + $this->assertText("{$base}label1", "buttonOkClick"); + } +} diff --git a/tests/FunctionalTests/issues/tests/Issue516TestCase.php b/tests/FunctionalTests/issues/tests/Issue516TestCase.php new file mode 100644 index 000000000..363e9f844 --- /dev/null +++ b/tests/FunctionalTests/issues/tests/Issue516TestCase.php @@ -0,0 +1,37 @@ +url('issues/index.php?page=Issue516'); + $this->assertContains('Issue 516 Test', $this->source()); + $base='ctl0_Content_'; + $row1='DataGrid_ctl1_'; + $row2='DataGrid_ctl2_'; + + // click "edit" and check for textbox + $this->byID("{$base}{$row1}ctl3")->click(); + $this->pause(800); + $this->assertElementPresent("{$base}{$row1}TextBox"); + // click "save" and check for validator + $this->byID("{$base}{$row1}ctl3")->click(); + $this->pause(800); + $this->assertEquals('Please provide a title.', $this->getElement("{$base}{$row1}ctl1")->text()); + // click "cancel" and ensure validator has disappeared + $this->byID("{$base}{$row1}ctl4")->click(); + $this->pause(800); + $this->assertElementNotPresent("{$base}{$row1}ctl1"); + + // click "edit" and check for textbox on the second row + $this->byID("{$base}{$row2}ctl3")->click(); + $this->pause(800); + $this->assertTrue($this->getElement("{$base}{$row2}TextBox")!==null); + // click "save" and ensure bvalidation has been successfull + $this->byID("{$base}{$row2}ctl3")->click(); + $this->pause(800); + $this->assertElementNotPresent("{$base}{$row2}ctl1"); + $this->assertElementNotPresent("{$base}{$row2}TextBox"); + $this->assertEquals('Edit', $this->getElement("{$base}{$row2}ctl3")->text()); + } +} diff --git a/tests/FunctionalTests/issues/tests/Issue524TestCase.php b/tests/FunctionalTests/issues/tests/Issue524TestCase.php new file mode 100755 index 000000000..b7b022b24 --- /dev/null +++ b/tests/FunctionalTests/issues/tests/Issue524TestCase.php @@ -0,0 +1,20 @@ +url('issues/index.php?page=Issue524'); + $this->assertContains('Issue 524 Test', $this->source()); + $base='ctl0_Content_'; + + $this->byID("{$base}buttonOk")->click(); + $this->pause(800); + $this->assertText("{$base}Validator", "fünf"); + } +} diff --git a/tests/FunctionalTests/quickstart/ActiveControls/ActiveButtonTestCase.php b/tests/FunctionalTests/quickstart/ActiveControls/ActiveButtonTestCase.php index 038614404..9d816978e 100755 --- a/tests/FunctionalTests/quickstart/ActiveControls/ActiveButtonTestCase.php +++ b/tests/FunctionalTests/quickstart/ActiveControls/ActiveButtonTestCase.php @@ -1,36 +1,36 @@ open("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveButton.Home&notheme=true&lang=en"); + $this->url("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveButton.Home&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); - $this->assertTextPresent('TActiveButton Samples (AJAX)'); + $this->assertContains('TActiveButton Samples (AJAX)', $this->source()); // a click button - $this->verifyElementNotPresent("//input[@type='submit' and @value=\"I'm clicked\"]"); - $this->click("//input[@type='submit' and @value='click me']", ""); + $this->assertElementNotPresent("//input[@type='submit' and @value=\"I'm clicked\"]"); + $this->byXPath("//input[@type='submit' and @value='click me']")->click(); $this->pause(800); - $this->verifyElementPresent("//input[@type='submit' and @value=\"I'm clicked\"]"); + $this->assertElementPresent("//input[@type='submit' and @value=\"I'm clicked\"]"); // a command button - $this->verifyElementNotPresent("//input[@type='submit' and @value=\"Name: test, Param: value using callback\"]"); - $this->click("//input[@type='submit' and @value='click me']", ""); + $this->assertElementNotPresent("//input[@type='submit' and @value=\"Name: test, Param: value using callback\"]"); + $this->byXPath("//input[@type='submit' and @value='click me']")->click(); $this->pause(800); - $this->verifyElementPresent("//input[@type='submit' and @value=\"Name: test, Param: value using callback\"]"); + $this->assertElementPresent("//input[@type='submit' and @value=\"Name: test, Param: value using callback\"]"); // a button causing validation - $this->verifyNotVisible('ctl0_body_ctl2'); - $this->click("//input[@type='submit' and @value='submit']", ""); + $this->assertNotVisible('ctl0_body_ctl2'); + $this->byXPath("//input[@type='submit' and @value='submit']")->click(); $this->pause(800); - $this->verifyVisible('ctl0_body_ctl2'); + $this->assertVisible('ctl0_body_ctl2'); $this->type("ctl0\$body\$TextBox", "test"); - $this->click("//input[@type='submit' and @value='submit']", ""); + $this->byXPath("//input[@type='submit' and @value='submit']")->click(); $this->pause(800); - $this->verifyNotVisible('ctl0_body_ctl2'); - $this->verifyElementPresent("//input[@type='submit' and @value=\"I'm clicked using callback\"]", ""); + $this->assertNotVisible('ctl0_body_ctl2'); + $this->assertElementPresent("//input[@type='submit' and @value=\"I'm clicked using callback\"]", ""); } } diff --git a/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php b/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php index 257917ec5..9e537abd9 100755 --- a/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php +++ b/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php @@ -1,58 +1,57 @@ setSpeed(500); - $this->open("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveCheckBox.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveCheckBox.Home&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); - $this->assertTextPresent('TActiveCheckBox Samples (AJAX)'); + $this->assertContains('TActiveCheckBox Samples (AJAX)', $this->source()); // an auto postback checkbox - $this->verifyTextNotPresent("ctl0_body_ctl0 clicked using callback"); - $this->click("//input[@name='ctl0\$body\$ctl0']"); + $this->assertNotContains("ctl0_body_ctl0 clicked using callback", $this->source()); + $this->byXPath("//input[@name='ctl0\$body\$ctl0']")->click(); $this->pause(800); - $this->assertChecked("//input[@name='ctl0\$body\$ctl0']"); - $this->verifyTextPresent("ctl0_body_ctl0 clicked using callback"); - $this->click("//input[@name='ctl0\$body\$ctl0']"); + $this->assertTrue($this->byXPath("//input[@name='ctl0\$body\$ctl0']")->selected()); + $this->assertContains("ctl0_body_ctl0 clicked using callback", $this->source()); + $this->byXPath("//input[@name='ctl0\$body\$ctl0']")->click(); $this->pause(800); - $this->verifyTextPresent("ctl0_body_ctl0 clicked using callback"); - $this->assertNotChecked("//input[@name='ctl0\$body\$ctl0']"); + $this->assertContains("ctl0_body_ctl0 clicked using callback", $this->source()); + $this->assertFalse($this->byXPath("//input[@name='ctl0\$body\$ctl0']")->selected()); // a checkbox causing validation on a textbox - $this->verifyNotVisible('ctl0_body_ctl1'); - $this->click("//input[@name='ctl0\$body\$ctl2']"); - $this->verifyVisible('ctl0_body_ctl1'); - $this->click("//input[@name='ctl0\$body\$ctl2']", ""); - $this->verifyVisible('ctl0_body_ctl3'); + $this->assertNotVisible('ctl0_body_ctl1'); + $this->byXPath("//input[@name='ctl0\$body\$ctl2']")->click(); + $this->assertVisible('ctl0_body_ctl1'); + $this->byXPath("//input[@name='ctl0\$body\$ctl2']")->click(); + $this->assertVisible('ctl0_body_ctl3'); $this->type("ctl0\$body\$TextBox", "test"); - $this->click("//input[@name='ctl0\$body\$ctl2']", ""); + $this->byXPath("//input[@name='ctl0\$body\$ctl2']")->click(); $this->pause(800); - $this->verifyNotVisible('ctl0_body_ctl1'); - $this->assertTextPresent("ctl0_body_ctl2 clicked using callback"); + $this->assertNotVisible('ctl0_body_ctl1'); + $this->assertContains("ctl0_body_ctl2 clicked using callback", $this->source()); // a checkbox validated by a required field validator - $this->assertNotChecked("//input[@name='ctl0\$body\$CheckBox']"); - $this->verifyNotVisible('ctl0_body_ctl4'); - $this->click("//input[@type='submit' and @value='Submit']", ""); - $this->verifyVisible('ctl0_body_ctl4'); - $this->click("//input[@name='ctl0\$body\$CheckBox']", ""); - $this->assertChecked("//input[@name='ctl0\$body\$CheckBox']"); - $this->click("//input[@type='submit' and @value='Submit']", ""); - $this->verifyNotVisible('ctl0_body_ctl4'); - $this->assertTextPresent("ctl0_body_CheckBox clicked"); + $this->assertFalse($this->byXPath("//input[@name='ctl0\$body\$CheckBox']")->selected()); + $this->assertNotVisible('ctl0_body_ctl4'); + $this->byXPath("//input[@type='submit' and @value='Submit']")->click(); + $this->assertVisible('ctl0_body_ctl4'); + $this->byXPath("//input[@name='ctl0\$body\$CheckBox']")->click(); + $this->assertTrue($this->byXPath("//input[@name='ctl0\$body\$CheckBox']")->selected()); + $this->byXPath("//input[@type='submit' and @value='Submit']")->click(); + $this->pause(800); + $this->assertNotVisible('ctl0_body_ctl4'); + $this->assertContains("ctl0_body_CheckBox clicked", $this->source()); // a checkbox validated by a required field validator using AutoPostBack - $this->assertChecked("//input[@name='ctl0\$body\$CheckBox2']"); - $this->verifyNotVisible('ctl0_body_ctl5'); - $this->click("//input[@name='ctl0\$body\$CheckBox2']", ""); - $this->verifyVisible('ctl0_body_ctl5'); - $this->assertChecked("//input[@name='ctl0\$body\$CheckBox2']"); - $this->setSpeed(0); + $this->assertTrue($this->byXPath("//input[@name='ctl0\$body\$CheckBox2']")->selected()); + $this->assertNotVisible('ctl0_body_ctl5'); + $this->byXPath("//input[@name='ctl0\$body\$CheckBox2']")->click(); + $this->assertVisible('ctl0_body_ctl5'); + $this->assertTrue($this->byXPath("//input[@name='ctl0\$body\$CheckBox2']")->selected()); } } diff --git a/tests/FunctionalTests/quickstart/ActiveControls/ActiveCustomValidatorTestCase.php b/tests/FunctionalTests/quickstart/ActiveControls/ActiveCustomValidatorTestCase.php index 967842b07..7cb29382c 100755 --- a/tests/FunctionalTests/quickstart/ActiveControls/ActiveCustomValidatorTestCase.php +++ b/tests/FunctionalTests/quickstart/ActiveControls/ActiveCustomValidatorTestCase.php @@ -1,19 +1,19 @@ open("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveCustomValidator.Home&notheme=true&lang=en"); + $this->url("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveCustomValidator.Home&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); - $this->assertTextPresent('TActiveCustomValidator Samples (AJAX)'); + $this->assertContains('TActiveCustomValidator Samples (AJAX)', $this->source()); $base = 'ctl0_body_'; $this->assertNotVisible($base.'validator1'); - $this->click($base.'button1'); + $this->byId($base.'button1')->click(); $this->pause(800); $this->assertVisible($base.'validator1'); @@ -25,7 +25,7 @@ function test () $this->pause(800); $this->assertVisible($base.'validator1'); - $this->click($base.'button1'); + $this->byId($base.'button1')->click(); $this->pause(800); $this->assertNotVisible($base.'validator1'); } diff --git a/tests/FunctionalTests/quickstart/Advanced/I18N.php b/tests/FunctionalTests/quickstart/Advanced/I18N.php index 726501ce0..ccb8c961a 100755 --- a/tests/FunctionalTests/quickstart/Advanced/I18N.php +++ b/tests/FunctionalTests/quickstart/Advanced/I18N.php @@ -1,52 +1,52 @@ open("../../demos/quickstart/index.php?notheme=true&page=Advanced.Samples.I18N.Home&lang=en&notheme=true", ""); - $this->verifyTextPresent("Internationlization in PRADO", ""); - $this->verifyTextPresent("46.412,42 €", ""); - $this->verifyTextPresent("$12.40", ""); - $this->verifyTextPresent("€100.00", ""); - $this->verifyTextPresent("December 6, 2004", ""); - $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=zh&notheme=true", ""); - $this->verifyTextPresent("PRADO 国际化", ""); - $this->verifyTextPresent("2004 十二月", ""); - $this->verifyTextPresent("US$ 12.40", ""); - $this->verifyTextPresent("46.412,42 €", ""); - $this->verifyTextPresent("€100.00 ", ""); - $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=zh_TW&notheme=true", ""); - $this->verifyTextPresent("PRADO 國際化", ""); - $this->verifyTextPresent("2004年12月6日", ""); - $this->verifyTextPresent("US$12.40", ""); - $this->verifyTextPresent("46.412,42 €", ""); - $this->verifyTextPresent("€100.00", ""); - $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=de&notheme=true", ""); - $this->verifyTextPresent("Internationalisierung in PRADO", ""); - $this->verifyTextPresent("6. Dezember 2004 ", ""); - $this->verifyTextPresent("$ 12,40", ""); - $this->verifyTextPresent("46.412,42 €", ""); - $this->verifyTextPresent("€100.00", ""); - $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=es&notheme=true", ""); - $this->verifyTextPresent("Internationlization en PRADO", ""); - $this->verifyTextPresent("6 de diciembre de 2004", ""); - $this->verifyTextPresent("US$12.40", ""); - $this->verifyTextPresent("46.412,42 €", ""); - $this->verifyTextPresent("€100.00", ""); - $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=fr&notheme=true", ""); - $this->verifyTextPresent("Internationalisation avec PRADO", ""); - $this->verifyTextPresent("6 décembre 2004", ""); - $this->verifyTextPresent("12,40 $", ""); - $this->verifyTextPresent("46.412,42 €", ""); - $this->verifyTextPresent("€100.00", ""); - $this->open("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=pl&notheme=true", ""); - $this->verifyTextPresent("Internacjonalizacja w PRADO", ""); - $this->verifyTextPresent("6 grudnia 2004", ""); - $this->verifyTextPresent("US$ 12,40", ""); - $this->verifyTextPresent("46.412,42 €", ""); - $this->verifyTextPresent("€100.00", ""); + $this->url("../../demos/quickstart/index.php?notheme=true&page=Advanced.Samples.I18N.Home&lang=en&notheme=true"); + $this->assertContains("Internationlization in PRADO", $this->source()); + $this->assertContains("46.412,42 €", $this->source()); + $this->assertContains("$12.40", $this->source()); + $this->assertContains("€100.00", $this->source()); + $this->assertContains("December 6, 2004", $this->source()); + $this->url("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=zh&notheme=true"); + $this->assertContains("PRADO 国际化", $this->source()); + $this->assertContains("2004 十二月", $this->source()); + $this->assertContains("US$ 12.40", $this->source()); + $this->assertContains("46.412,42 €", $this->source()); + $this->assertContains("€100.00 ", $this->source()); + $this->url("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=zh_TW&notheme=true"); + $this->assertContains("PRADO 國際化", $this->source()); + $this->assertContains("2004年12月6日", $this->source()); + $this->assertContains("US$12.40", $this->source()); + $this->assertContains("46.412,42 €", $this->source()); + $this->assertContains("€100.00", $this->source()); + $this->url("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=de&notheme=true"); + $this->assertContains("Internationalisierung in PRADO", $this->source()); + $this->assertContains("6. Dezember 2004 ", $this->source()); + $this->assertContains("$ 12,40", $this->source()); + $this->assertContains("46.412,42 €", $this->source()); + $this->assertContains("€100.00", $this->source()); + $this->url("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=es&notheme=true"); + $this->assertContains("Internationlization en PRADO", $this->source()); + $this->assertContains("6 de diciembre de 2004", $this->source()); + $this->assertContains("US$12.40", $this->source()); + $this->assertContains("46.412,42 €", $this->source()); + $this->assertContains("€100.00", $this->source()); + $this->url("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=fr&notheme=true"); + $this->assertContains("Internationalisation avec PRADO", $this->source()); + $this->assertContains("6 décembre 2004", $this->source()); + $this->assertContains("12,40 $", $this->source()); + $this->assertContains("46.412,42 €", $this->source()); + $this->assertContains("€100.00", $this->source()); + $this->url("../../demos/quickstart/index.php?page=Advanced.Samples.I18N.Home&lang=pl&notheme=true"); + $this->assertContains("Internacjonalizacja w PRADO", $this->source()); + $this->assertContains("6 grudnia 2004", $this->source()); + $this->assertContains("US$ 12,40", $this->source()); + $this->assertContains("46.412,42 €", $this->source()); + $this->assertContains("€100.00", $this->source()); } } diff --git a/tests/FunctionalTests/quickstart/Controls/BulletedListTestCase.php b/tests/FunctionalTests/quickstart/Controls/BulletedListTestCase.php index 0b272428e..a23f1d1d1 100755 --- a/tests/FunctionalTests/quickstart/Controls/BulletedListTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/BulletedListTestCase.php @@ -1,36 +1,36 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TBulletedList.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TBulletedList.Home&notheme=true&lang=en"); // verify if all required texts are present - $this->verifyTextPresent('item 1',''); - $this->verifyTextPresent('item 2',''); - $this->verifyTextPresent('item 3',''); - $this->verifyTextPresent('item 4',''); - $this->verifyTextPresent('google',''); - $this->verifyTextPresent('yahoo',''); - $this->verifyTextPresent('amazon',''); + $this->assertContains('item 1', $this->source()); + $this->assertContains('item 2', $this->source()); + $this->assertContains('item 3', $this->source()); + $this->assertContains('item 4', $this->source()); + $this->assertContains('google', $this->source()); + $this->assertContains('yahoo', $this->source()); + $this->assertContains('amazon', $this->source()); // verify order list starting from 5 - $this->verifyElementPresent("//ol[@start='5']"); + $this->assertElementPresent("//ol[@start='5']"); // unable to verify styles // verify hyperlink list - $this->verifyElementPresent("//a[@href='http://www.google.com/']"); - $this->verifyElementPresent("//a[@href='http://www.yahoo.com/']"); - $this->verifyElementPresent("//a[@href='http://www.amazon.com/']"); + $this->assertElementPresent("//a[@href='http://www.google.com/']"); + $this->assertElementPresent("//a[@href='http://www.yahoo.com/']"); + $this->assertElementPresent("//a[@href='http://www.amazon.com/']"); // verify linkbutton list - $this->clickAndWait("id=ctl0_body_ctl40", ""); - $this->verifyTextPresent("You clicked google : http://www.google.com/.", ""); - $this->clickAndWait("id=ctl0_body_ctl41", ""); - $this->verifyTextPresent("You clicked yahoo : http://www.yahoo.com/.", ""); - $this->clickAndWait("id=ctl0_body_ctl42", ""); - $this->verifyTextPresent("You clicked amazon : http://www.amazon.com/.", ""); + $this->byId("ctl0_body_ctl40")->click(); + $this->assertContains("You clicked google : http://www.google.com/.", $this->source()); + $this->byId("ctl0_body_ctl41")->click(); + $this->assertContains("You clicked yahoo : http://www.yahoo.com/.", $this->source()); + $this->byId("ctl0_body_ctl42")->click(); + $this->assertContains("You clicked amazon : http://www.amazon.com/.", $this->source()); } } diff --git a/tests/FunctionalTests/quickstart/Controls/ButtonTestCase.php b/tests/FunctionalTests/quickstart/Controls/ButtonTestCase.php index ad84e1d0c..f5a4a9793 100755 --- a/tests/FunctionalTests/quickstart/Controls/ButtonTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/ButtonTestCase.php @@ -1,33 +1,33 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TButton.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TButton.Home&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); // a regular button - $this->clickAndWait("//input[@type='submit' and @value='text']", ""); + $this->byXPath("//input[@type='submit' and @value='text']")->click(); // a click button - $this->verifyElementNotPresent("//input[@type='submit' and @value=\"I'm clicked\"]"); - $this->clickAndWait("//input[@type='submit' and @value='click me']", ""); - $this->verifyElementPresent("//input[@type='submit' and @value=\"I'm clicked\"]"); + $this->assertElementNotPresent("//input[@type='submit' and @value=\"I'm clicked\"]"); + $this->byXPath("//input[@type='submit' and @value='click me']")->click(); + $this->assertElementPresent("//input[@type='submit' and @value=\"I'm clicked\"]"); // a command button - $this->verifyElementNotPresent("//input[@type='submit' and @value=\"Name: test, Param: value\"]"); - $this->clickAndWait("//input[@type='submit' and @value='click me']", ""); - $this->verifyElementPresent("//input[@type='submit' and @value=\"Name: test, Param: value\"]"); + $this->assertElementNotPresent("//input[@type='submit' and @value=\"Name: test, Param: value\"]"); + $this->byXPath("//input[@type='submit' and @value='click me']")->click(); + $this->assertElementPresent("//input[@type='submit' and @value=\"Name: test, Param: value\"]"); // a button causing validation - $this->verifyNotVisible('ctl0_body_ctl3'); - $this->click("//input[@type='submit' and @value='submit']", ""); + $this->assertNotVisible('ctl0_body_ctl3'); + $this->byXPath("//input[@type='submit' and @value='submit']")->click(); // $this->pause(1000); - $this->verifyVisible('ctl0_body_ctl3'); + $this->assertVisible('ctl0_body_ctl3'); $this->type("ctl0\$body\$TextBox", "test"); - $this->clickAndWait("//input[@type='submit' and @value='submit']", ""); - $this->verifyNotVisible('ctl0_body_ctl3'); + $this->byXPath("//input[@type='submit' and @value='submit']")->click(); + $this->assertNotVisible('ctl0_body_ctl3'); } } diff --git a/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php b/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php index 242bc8152..781701cf7 100755 --- a/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php @@ -1,17 +1,17 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TCheckBoxList.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TCheckBoxList.Home&notheme=true&lang=en"); // Check box list with default settings: - $this->click("//input[@name='ctl0\$body\$ctl0\$c0' and @value='value 1']", ""); + $this->byXPath("//input[@name='ctl0\$body\$ctl0\$c0' and @value='value 1']")->click(); // Check box list with customized cellpadding, cellspacing, color and text alignment: - $this->click("//input[@name='ctl0\$body\$ctl1\$c1' and @value='value 2']", ""); + $this->byXPath("//input[@name='ctl0\$body\$ctl1\$c1' and @value='value 2']")->click(); // *** Currently unable to test the following cases: // Check box list with vertical (default) repeat direction @@ -20,33 +20,33 @@ function test () // Check box list with flow layout and horizontal repeat direction: // Check box list's behavior upon postback - $this->click("//input[@name='ctl0\$body\$CheckBoxList\$c2' and @value='value 3']", ""); - $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); - $this->verifyTextPresent("Your selection is: (Index: 1, Value: value 2, Text: item 2)(Index: 2, Value: value 3, Text: item 3)(Index: 4, Value: value 5, Text: item 5)", ""); + $this->byXPath("//input[@name='ctl0\$body\$CheckBoxList\$c2' and @value='value 3']")->click(); + $this->byXPath("//input[@type='submit' and @value='Submit']")->click(); + $this->assertContains("Your selection is: (Index: 1, Value: value 2, Text: item 2)(Index: 2, Value: value 3, Text: item 3)(Index: 4, Value: value 5, Text: item 5)", $this->source()); // Auto postback check box list - $this->clickAndWait("//input[@name='ctl0\$body\$ctl7\$c1' and @value='value 2']", ""); - $this->verifyTextPresent("Your selection is: (Index: 4, Value: value 5, Text: item 5)", ""); + $this->byXPath("//input[@name='ctl0\$body\$ctl7\$c1' and @value='value 2']")->click(); + $this->assertContains("Your selection is: (Index: 4, Value: value 5, Text: item 5)", $this->source()); // Databind to an integer-indexed array - $this->clickAndWait("//input[@name='ctl0\$body\$DBCheckBoxList1\$c1' and @value='1']", ""); - $this->verifyTextPresent("Your selection is: (Index: 1, Value: 1, Text: item 2)", ""); + $this->byXPath("//input[@name='ctl0\$body\$DBCheckBoxList1\$c1' and @value='1']")->click(); + $this->assertContains("Your selection is: (Index: 1, Value: 1, Text: item 2)", $this->source()); // Databind to an associative array: - $this->clickAndWait("//input[@name='ctl0\$body\$DBCheckBoxList2\$c1' and @value='key 2']", ""); - $this->verifyTextPresent("Your selection is: (Index: 1, Value: key 2, Text: item 2)", ""); + $this->byXPath("//input[@name='ctl0\$body\$DBCheckBoxList2\$c1' and @value='key 2']")->click(); + $this->assertContains("Your selection is: (Index: 1, Value: key 2, Text: item 2)", $this->source()); // Databind with DataTextField and DataValueField specified - $this->clickAndWait("//input[@name='ctl0\$body\$DBCheckBoxList3\$c2' and @value='003']", ""); - $this->verifyTextPresent("Your selection is: (Index: 2, Value: 003, Text: Cary)", ""); + $this->byXPath("//input[@name='ctl0\$body\$DBCheckBoxList3\$c2' and @value='003']")->click(); + $this->assertContains("Your selection is: (Index: 2, Value: 003, Text: Cary)", $this->source()); // CheckBox list causing validation - $this->verifyNotVisible('ctl0_body_ctl8'); - $this->click("//input[@name='ctl0\$body\$ctl9\$c0' and @value='Agree']", ""); + $this->assertNotVisible('ctl0_body_ctl8'); + $this->byXPath("//input[@name='ctl0\$body\$ctl9\$c0' and @value='Agree']")->click(); // $this->pause(1000); - $this->verifyVisible('ctl0_body_ctl8'); + $this->assertVisible('ctl0_body_ctl8'); $this->type("ctl0\$body\$TextBox", "test"); - $this->clickAndWait("//input[@name='ctl0\$body\$ctl9\$c0' and @value='Agree']", ""); - $this->verifyNotVisible('ctl0_body_ctl8'); + $this->byXPath("//input[@name='ctl0\$body\$ctl9\$c0' and @value='Agree']")->click(); + $this->assertNotVisible('ctl0_body_ctl8'); } } diff --git a/tests/FunctionalTests/quickstart/Controls/CheckBoxTestCase.php b/tests/FunctionalTests/quickstart/Controls/CheckBoxTestCase.php index 57b50dd93..ca89b3a0c 100755 --- a/tests/FunctionalTests/quickstart/Controls/CheckBoxTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/CheckBoxTestCase.php @@ -1,53 +1,53 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TCheckBox.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TCheckBox.Home&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); // a regular checkbox - $this->click("//input[@name='ctl0\$body\$ctl0']", ""); + $this->byXPath("//input[@name='ctl0\$body\$ctl0']")->click(); // a checkbox with customized value - $this->click("//input[@name='ctl0\$body\$ctl1' and @value='value']", ""); + $this->byXPath("//input[@name='ctl0\$body\$ctl1' and @value='value']")->click(); // an auto postback checkbox - $this->verifyTextNotPresent("I'm clicked"); - $this->clickAndWait("//input[@name='ctl0\$body\$ctl2']", ""); - $this->verifyTextPresent("I'm clicked"); - $this->clickAndWait("//input[@name='ctl0\$body\$ctl2']", ""); - $this->verifyTextPresent("I'm clicked"); + $this->assertNotContains("I'm clicked", $this->source()); + $this->byXPath("//input[@name='ctl0\$body\$ctl2']")->click(); + $this->assertContains("I'm clicked", $this->source()); + $this->byXPath("//input[@name='ctl0\$body\$ctl2']")->click(); + $this->assertContains("I'm clicked", $this->source()); // a checkbox causing validation on a textbox - $this->verifyNotVisible('ctl0_body_ctl3'); - $this->click("//input[@name='ctl0\$body\$ctl4']", ""); + $this->assertNotVisible('ctl0_body_ctl3'); + $this->byXPath("//input[@name='ctl0\$body\$ctl4']")->click(); // $this->pause(1000); - $this->verifyVisible('ctl0_body_ctl3'); - $this->click("//input[@name='ctl0\$body\$ctl4']", ""); + $this->assertVisible('ctl0_body_ctl3'); + $this->byXPath("//input[@name='ctl0\$body\$ctl4']")->click(); // $this->pause(1000); - $this->verifyVisible('ctl0_body_ctl3'); + $this->assertVisible('ctl0_body_ctl3'); $this->type("ctl0\$body\$TextBox", "test"); - $this->clickAndWait("//input[@name='ctl0\$body\$ctl4']", ""); - $this->verifyNotVisible('ctl0_body_ctl3'); + $this->byXPath("//input[@name='ctl0\$body\$ctl4']")->click(); + $this->assertNotVisible('ctl0_body_ctl3'); // a checkbox validated by a required field validator - $this->verifyNotVisible('ctl0_body_ctl6'); - $this->click("//input[@type='submit' and @value='Submit']", ""); + $this->assertNotVisible('ctl0_body_ctl6'); + $this->byXPath("//input[@type='submit' and @value='Submit']")->click(); // $this->pause(1000); - $this->verifyVisible('ctl0_body_ctl6'); - $this->click("//input[@name='ctl0\$body\$CheckBox']", ""); - $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); - $this->verifyNotVisible('ctl0_body_ctl6'); + $this->assertVisible('ctl0_body_ctl6'); + $this->byXPath("//input[@name='ctl0\$body\$CheckBox']")->click(); + $this->byXPath("//input[@type='submit' and @value='Submit']")->click(); + $this->assertNotVisible('ctl0_body_ctl6'); // a checkbox validated by a required field validator using AutoPostBack - $this->verifyNotVisible('ctl0_body_ctl7'); - $this->click("//input[@name='ctl0\$body\$CheckBox2']", ""); + $this->assertNotVisible('ctl0_body_ctl7'); + $this->byXPath("//input[@name='ctl0\$body\$CheckBox2']")->click(); // $this->pause(1000); - $this->verifyVisible('ctl0_body_ctl7'); -// $this->clickAndWait("//input[@name='ctl0\$body\$CheckBox2' and @value='ctl0\$body\$CheckBox2']", ""); -// $this->verifyNotVisible('ctl0_body_ctl7'); + $this->assertVisible('ctl0_body_ctl7'); +// $this->byXPath("//input[@name='ctl0\$body\$CheckBox2' and @value='ctl0\$body\$CheckBox2']")->click(); +// $this->assertNotVisible('ctl0_body_ctl7'); } } diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid1TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid1TestCase.php index 57ee92ae8..4f4ca60ac 100755 --- a/tests/FunctionalTests/quickstart/Controls/DataGrid1TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DataGrid1TestCase.php @@ -1,29 +1,29 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample1&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample1&notheme=true&lang=en"); // verify if all required texts are present - $this->verifyTextPresent('id',''); - $this->verifyTextPresent('name',''); - $this->verifyTextPresent('quantity',''); - $this->verifyTextPresent('price',''); - $this->verifyTextPresent('imported',''); - $this->verifyTextPresent('ITN001',''); - $this->verifyTextPresent('Motherboard',''); - $this->verifyTextPresent('100',''); - $this->verifyTextPresent('true',''); - $this->verifyTextPresent('ITN019',''); - $this->verifyTextPresent('Speaker',''); - $this->verifyTextPresent('35',''); - $this->verifyTextPresent('65',''); - $this->verifyTextPresent('false',''); + $this->assertContains('id', $this->source()); + $this->assertContains('name', $this->source()); + $this->assertContains('quantity', $this->source()); + $this->assertContains('price', $this->source()); + $this->assertContains('imported', $this->source()); + $this->assertContains('ITN001', $this->source()); + $this->assertContains('Motherboard', $this->source()); + $this->assertContains('100', $this->source()); + $this->assertContains('true', $this->source()); + $this->assertContains('ITN019', $this->source()); + $this->assertContains('Speaker', $this->source()); + $this->assertContains('35', $this->source()); + $this->assertContains('65', $this->source()); + $this->assertContains('false', $this->source()); // verify specific table tags - $this->verifyElementPresent("ctl0_body_DataGrid"); - $this->verifyAttribute("ctl0_body_DataGrid@cellpadding","2"); + $this->assertElementPresent("ctl0_body_DataGrid"); + $this->assertAttribute("ctl0_body_DataGrid@cellpadding","2"); } } diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php index 7efd69ccc..548b04e32 100755 --- a/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php @@ -1,49 +1,49 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample2&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample2&notheme=true&lang=en"); // verify if all required texts are present - $this->verifyTextPresent('Book Title',''); - $this->verifyTextPresent('Publisher',''); - $this->verifyTextPresent('Price',''); - $this->verifyTextPresent('In-stock',''); - $this->verifyTextPresent('Rating',''); + $this->assertContains('Book Title', $this->source()); + $this->assertContains('Publisher', $this->source()); + $this->assertContains('Price', $this->source()); + $this->assertContains('In-stock', $this->source()); + $this->assertContains('Rating', $this->source()); // verify book titles - $this->verifyElementPresent("//a[@href='http://www.amazon.com/gp/product/0596007124' and text()='Head First Design Patterns']",''); - $this->verifyElementPresent("//a[@href='http://www.amazon.com/gp/product/0321278658' and text()='Extreme Programming Explained : Embrace Change']",''); + $this->assertElementPresent("//a[@href='http://www.amazon.com/gp/product/0596007124' and text()='Head First Design Patterns']",''); + $this->assertElementPresent("//a[@href='http://www.amazon.com/gp/product/0321278658' and text()='Extreme Programming Explained : Embrace Change']",''); // verify publishers - $this->verifyTextPresent("O'Reilly Media, Inc.",''); - $this->verifyTextPresent("Addison-Wesley Professional",''); + $this->assertContains("O'Reilly Media, Inc.", $this->source()); + $this->assertContains("Addison-Wesley Professional", $this->source()); // verify prices - $this->verifyTextPresent("\$37.49",''); - $this->verifyTextPresent("\$38.49",''); + $this->assertContains("\$37.49", $this->source()); + $this->assertContains("\$38.49", $this->source()); // verify in-stock - $this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl5@checked','regexp:true|checked'); - $this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl5@disabled','regexp:true|disabled'); - $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked','regexp:true|checked'); - $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl6_ctl5").hasAttribute("checked")'), 'false'); - $this->verifyAttribute('ctl0_body_DataGrid_ctl6_ctl5@disabled','regexp:true|disabled'); + $this->assertAttribute('ctl0_body_DataGrid_ctl1_ctl5@checked','regexp:true|checked'); + $this->assertAttribute('ctl0_body_DataGrid_ctl1_ctl5@disabled','regexp:true|disabled'); + $this->assertAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked','regexp:true|checked'); + $this->assertAttribute('ctl0_body_DataGrid_ctl6_ctl5@checked',null); + $this->assertAttribute('ctl0_body_DataGrid_ctl6_ctl5@disabled','regexp:true|disabled'); // verify ratings - //$this->verifyElementPresent("//img[@src='images/star5.gif']",''); - //$this->verifyElementPresent("//img[@src='images/star2.gif']",''); + //$this->assertElementPresent("//img[@src='images/star5.gif']",''); + //$this->assertElementPresent("//img[@src='images/star2.gif']",''); // verify toggle column visibility - $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Book Title']", ""); - $this->verifyTextNotPresent('Head First Design Patterns',''); - $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c3' and @value='In-stock']", ""); - $this->verifyElementNotPresent('ctl0_body_DataGrid_ctl1_ctl5',''); - $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c3' and @value='In-stock']", ""); - $this->verifyElementPresent('ctl0_body_DataGrid_ctl1_ctl5',''); - $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Book Title']", ""); - $this->verifyTextPresent('Head First Design Patterns',''); + $this->byXPath("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Book Title']")->click(); + $this->assertNotContains('Head First Design Patterns', $this->source()); + $this->byXPath("//input[@name='ctl0\$body\$ctl1\$c3' and @value='In-stock']")->click(); + $this->assertElementNotPresent('ctl0_body_DataGrid_ctl1_ctl5',''); + $this->byXPath("//input[@name='ctl0\$body\$ctl1\$c3' and @value='In-stock']")->click(); + $this->assertElementPresent('ctl0_body_DataGrid_ctl1_ctl5',''); + $this->byXPath("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Book Title']")->click(); + $this->assertContains('Head First Design Patterns', $this->source()); } } diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php index 2cdace20c..e87b90726 100755 --- a/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php @@ -1,50 +1,56 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample3&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample3&notheme=true&lang=en"); // verify the 2nd row of data - $this->verifyTextPresent("Design Patterns: Elements of Reusable Object-Oriented Software", ""); - $this->verifyTextPresent("Addison-Wesley Professional", ""); - $this->verifyTextPresent("$47.04", ""); - $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl4@checked','regexp:true|checked'); - $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl4@disabled','regexp:true|disabled'); - //$this->verifyElementPresent("//img[@src='images/star5.gif']",''); + $this->assertContains("Design Patterns: Elements of Reusable Object-Oriented Software", $this->source()); + $this->assertContains("Addison-Wesley Professional", $this->source()); + $this->assertContains("$47.04", $this->source()); + $this->assertAttribute('ctl0_body_DataGrid_ctl2_ctl4@checked','regexp:true|checked'); + $this->assertAttribute('ctl0_body_DataGrid_ctl2_ctl4@disabled','regexp:true|disabled'); + //$this->assertElementPresent("//img[@src='images/star5.gif']",''); // edit the 2nd row - $this->clickAndWait("id=ctl0_body_DataGrid_ctl2_ctl7", ""); + $this->byId("ctl0_body_DataGrid_ctl2_ctl7")->click(); $this->type("ctl0\$body\$DataGrid\$ctl2\$ctl1", "Design Pattern: Elements of Reusable Object-Oriented Software"); $this->type("ctl0\$body\$DataGrid\$ctl2\$ctl3", "Addison Wesley Professional"); $this->type("ctl0\$body\$DataGrid\$ctl2\$ctl5", "\$57.04"); - $this->click("//input[@name='ctl0\$body\$DataGrid\$ctl2\$ctl7']", ""); - $this->select("ctl0\$body\$DataGrid\$ctl2\$ctl9", "label=1"); - $this->clickAndWait("link=Save", ""); + $this->byXPath("//input[@name='ctl0\$body\$DataGrid\$ctl2\$ctl7']")->click(); + $this->select("ctl0\$body\$DataGrid\$ctl2\$ctl9", "1"); + $this->byLinkText("Save")->click(); // verify the 2nd row is saved - $this->verifyTextPresent("Design Pattern: Elements of Reusable Object-Oriented Software", ""); - $this->verifyTextPresent("Addison Wesley Professional", ""); - $this->verifyTextPresent("$57.04", ""); - $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl2_ctl4").hasAttribute("checked")'), 'false'); - $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl4@disabled','regexp:true|disabled'); - //$this->verifyElementPresent("//img[@src='images/star1.gif']",''); + $this->assertContains("Design Pattern: Elements of Reusable Object-Oriented Software", $this->source()); + $this->assertContains("Addison Wesley Professional", $this->source()); + $this->assertContains("$57.04", $this->source()); + $this->assertAttribute("ctl0_body_DataGrid_ctl2_ctl4@checked", null); + $this->assertAttribute('ctl0_body_DataGrid_ctl2_ctl4@disabled','regexp:true|disabled'); + //$this->assertElementPresent("//img[@src='images/star1.gif']",''); // verify cancel editting the 3rd row - $this->clickAndWait("id=ctl0_body_DataGrid_ctl3_ctl7", ""); - $this->clickAndWait("link=Cancel", ""); - $this->verifyTextPresent("Design Patterns Explained : A New Perspective on Object-Oriented Design", ""); + $this->byId("ctl0_body_DataGrid_ctl3_ctl7")->click(); + $this->byLinkText("Cancel")->click(); + $this->assertContains("Design Patterns Explained : A New Perspective on Object-Oriented Design", $this->source()); // verify deleting - $this->clickAndWait("id=ctl0_body_DataGrid_ctl3_ctl9", ""); - $this->verifyConfirmation("Are you sure?"); - $this->verifyTextNotPresent("Design Patterns Explained : A New Perspective on Object-Oriented Design", ""); - - $this->verifyTextPresent("Extreme Programming Explained : Embrace Change",''); - $this->chooseCancelOnNextConfirmation(); - $this->click("id=ctl0_body_DataGrid_ctl6_ctl9", ""); - $this->verifyConfirmation("Are you sure?"); - $this->verifyTextPresent("Extreme Programming Explained : Embrace Change",''); + $this->byId("ctl0_body_DataGrid_ctl3_ctl9")->click(); + + $this->assertEquals("Are you sure?", $this->alertText()); + $this->acceptAlert(); + + $this->pause(500); + $this->assertNotContains("Design Patterns Explained : A New Perspective on Object-Oriented Design", $this->source()); + + $this->assertContains("Extreme Programming Explained : Embrace Change", $this->source()); + $this->byId("ctl0_body_DataGrid_ctl6_ctl9")->click(); + + $this->assertEquals("Are you sure?", $this->alertText()); + $this->dismissAlert(); + + $this->assertContains("Extreme Programming Explained : Embrace Change", $this->source()); } } diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php index 702b997e2..f67f56347 100755 --- a/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php @@ -1,28 +1,28 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample4&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample4&notheme=true&lang=en"); // verify the 2nd row of data - $this->verifyTextPresent("Design Patterns: Elements of Reusable Object-Oriented Software", ""); - $this->verifyTextPresent("Addison-Wesley Professional", ""); - $this->verifyTextPresent("$47.04", ""); - $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked','regexp:true|checked'); - $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@disabled','regexp:true|disabled'); + $this->assertContains("Design Patterns: Elements of Reusable Object-Oriented Software", $this->source()); + $this->assertContains("Addison-Wesley Professional", $this->source()); + $this->assertContains("$47.04", $this->source()); + $this->assertAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked','regexp:true|checked'); + $this->assertAttribute('ctl0_body_DataGrid_ctl2_ctl5@disabled','regexp:true|disabled'); // verify sorting - $this->clickAndWait("link=Book Title", ""); - $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl1_ctl5").hasAttribute("checked")'), 'false'); - $this->clickAndWait("link=Publisher", ""); - $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl6_ctl5").hasAttribute("checked")'), 'false'); - $this->clickAndWait("link=Price", ""); - $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl2_ctl5").hasAttribute("checked")'), 'false'); - $this->clickAndWait("link=In-stock", ""); - $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl1_ctl5").hasAttribute("checked")'), 'false'); - $this->clickAndWait("link=Rating", ""); - $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl4_ctl5").hasAttribute("checked")'), 'false'); + $this->byLinkText("Book Title")->click(); + $this->assertAttribute('ctl0_body_DataGrid_ctl1_ctl5@checked', null); + $this->byLinkText("Publisher")->click(); + $this->assertAttribute('ctl0_body_DataGrid_ctl6_ctl5@checked', null); + $this->byLinkText("Price")->click(); + $this->assertAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked', null); + $this->byLinkText("In-stock")->click(); + $this->assertAttribute('ctl0_body_DataGrid_ctl1_ctl5@checked', null); + $this->byLinkText("Rating")->click(); + $this->assertAttribute('ctl0_body_DataGrid_ctl4_ctl5@checked', null); } } diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php index f854d44c8..3df22ff82 100755 --- a/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php @@ -1,113 +1,113 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample5&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample5&notheme=true&lang=en"); // verify if all required texts are present // verify column headers - $this->verifyTextPresent('id',''); - $this->verifyTextPresent('name',''); - $this->verifyTextPresent('quantity',''); - $this->verifyTextPresent('price',''); - $this->verifyTextPresent('imported',''); + $this->assertContains('id', $this->source()); + $this->assertContains('name', $this->source()); + $this->assertContains('quantity', $this->source()); + $this->assertContains('price', $this->source()); + $this->assertContains('imported', $this->source()); - $this->verifyTextPresent('ITN001',''); - $this->verifyTextPresent('ITN002',''); - $this->verifyTextPresent('ITN003',''); - $this->verifyTextPresent('ITN004',''); - $this->verifyTextPresent('ITN005',''); - $this->verifyTextNotPresent('ITN006',''); + $this->assertContains('ITN001', $this->source()); + $this->assertContains('ITN002', $this->source()); + $this->assertContains('ITN003', $this->source()); + $this->assertContains('ITN004', $this->source()); + $this->assertContains('ITN005', $this->source()); + $this->assertNotContains('ITN006', $this->source()); // verify paging - $this->clickAndWait("link=2", ""); - $this->verifyTextPresent('ITN006',''); - $this->verifyTextPresent('ITN007',''); - $this->verifyTextPresent('ITN008',''); - $this->verifyTextPresent('ITN009',''); - $this->verifyTextPresent('ITN010',''); - $this->verifyTextNotPresent('ITN011',''); - $this->verifyTextNotPresent('ITN005',''); + $this->byLinkText("2")->click(); + $this->assertContains('ITN006', $this->source()); + $this->assertContains('ITN007', $this->source()); + $this->assertContains('ITN008', $this->source()); + $this->assertContains('ITN009', $this->source()); + $this->assertContains('ITN010', $this->source()); + $this->assertNotContains('ITN011', $this->source()); + $this->assertNotContains('ITN005', $this->source()); - $this->clickAndWait("link=4", ""); - $this->verifyTextPresent('ITN016',''); - $this->verifyTextPresent('ITN017',''); - $this->verifyTextPresent('ITN018',''); - $this->verifyTextPresent('ITN019',''); - $this->verifyTextNotPresent('ITN015',''); + $this->byLinkText("4")->click(); + $this->assertContains('ITN016', $this->source()); + $this->assertContains('ITN017', $this->source()); + $this->assertContains('ITN018', $this->source()); + $this->assertContains('ITN019', $this->source()); + $this->assertNotContains('ITN015', $this->source()); - $this->clickAndWait("link=1", ""); - $this->verifyTextPresent('ITN001',''); - $this->verifyTextPresent('ITN002',''); - $this->verifyTextPresent('ITN003',''); - $this->verifyTextPresent('ITN004',''); - $this->verifyTextPresent('ITN005',''); - $this->verifyTextNotPresent('ITN006',''); + $this->byLinkText("1")->click(); + $this->assertContains('ITN001', $this->source()); + $this->assertContains('ITN002', $this->source()); + $this->assertContains('ITN003', $this->source()); + $this->assertContains('ITN004', $this->source()); + $this->assertContains('ITN005', $this->source()); + $this->assertNotContains('ITN006', $this->source()); // show top pager - $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Top']", ""); - $this->clickAndWait("id=ctl0_body_DataGrid_ctl8_ctl3", ""); - $this->clickAndWait("link=1", ""); + $this->byXPath("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Top']")->click(); + $this->byId("ctl0_body_DataGrid_ctl8_ctl3")->click(); + $this->byLinkText("1")->click(); // hide top pager - $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Top']", ""); + $this->byXPath("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Top']")->click(); // change next prev caption $this->type("ctl0\$body\$NextPageText", "Next Page"); $this->type("ctl0\$body\$PrevPageText", "Prev Page"); - $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); + $this->byXPath("//input[@type='submit' and @value='Submit']")->click(); // verify next prev paging - $this->verifyTextPresent('ITN001',''); - $this->verifyTextNotPresent('ITN006',''); - $this->clickAndWait("link=Next Page", ""); - $this->verifyTextNotPresent('ITN005',''); - $this->verifyTextPresent('ITN006',''); - $this->verifyTextNotPresent('ITN011',''); - $this->clickAndWait("link=Next Page", ""); - $this->verifyTextNotPresent('ITN010',''); - $this->verifyTextPresent('ITN011',''); - $this->verifyTextNotPresent('ITN016',''); - $this->clickAndWait("link=Next Page", ""); - $this->verifyTextNotPresent('ITN015',''); - $this->verifyTextPresent('ITN016',''); - $this->clickAndWait("link=Prev Page", ""); - $this->verifyTextNotPresent('ITN010',''); - $this->verifyTextPresent('ITN011',''); - $this->verifyTextNotPresent('ITN016',''); - $this->clickAndWait("link=Prev Page", ""); - $this->verifyTextNotPresent('ITN005',''); - $this->verifyTextPresent('ITN006',''); - $this->verifyTextNotPresent('ITN011',''); - $this->clickAndWait("link=Prev Page", ""); - $this->verifyTextPresent('ITN001',''); - $this->verifyTextNotPresent('ITN006',''); + $this->assertContains('ITN001', $this->source()); + $this->assertNotContains('ITN006', $this->source()); + $this->byLinkText("Next Page")->click(); + $this->assertNotContains('ITN005', $this->source()); + $this->assertContains('ITN006', $this->source()); + $this->assertNotContains('ITN011', $this->source()); + $this->byLinkText("Next Page")->click(); + $this->assertNotContains('ITN010', $this->source()); + $this->assertContains('ITN011', $this->source()); + $this->assertNotContains('ITN016', $this->source()); + $this->byLinkText("Next Page")->click(); + $this->assertNotContains('ITN015', $this->source()); + $this->assertContains('ITN016', $this->source()); + $this->byLinkText("Prev Page")->click(); + $this->assertNotContains('ITN010', $this->source()); + $this->assertContains('ITN011', $this->source()); + $this->assertNotContains('ITN016', $this->source()); + $this->byLinkText("Prev Page")->click(); + $this->assertNotContains('ITN005', $this->source()); + $this->assertContains('ITN006', $this->source()); + $this->assertNotContains('ITN011', $this->source()); + $this->byLinkText("Prev Page")->click(); + $this->assertContains('ITN001', $this->source()); + $this->assertNotContains('ITN006', $this->source()); // change button count $this->type("ctl0\$body\$PageButtonCount", "2"); - $this->clickAndWait("name=ctl0\$body\$ctl6", ""); - $this->clickAndWait("link=Next Page", ""); - $this->verifyTextNotPresent('ITN010',''); - $this->verifyTextPresent('ITN011',''); - $this->verifyTextNotPresent('ITN016',''); - $this->clickAndWait("link=4", ""); - $this->verifyTextNotPresent('ITN015',''); - $this->verifyTextPresent('ITN016',''); - $this->clickAndWait("link=Prev Page", ""); - $this->verifyTextNotPresent('ITN005',''); - $this->verifyTextPresent('ITN006',''); - $this->verifyTextNotPresent('ITN011',''); + $this->byName("ctl0\$body\$ctl6")->click(); + $this->byLinkText("Next Page")->click(); + $this->assertNotContains('ITN010', $this->source()); + $this->assertContains('ITN011', $this->source()); + $this->assertNotContains('ITN016', $this->source()); + $this->byLinkText("4")->click(); + $this->assertNotContains('ITN015', $this->source()); + $this->assertContains('ITN016', $this->source()); + $this->byLinkText("Prev Page")->click(); + $this->assertNotContains('ITN005', $this->source()); + $this->assertContains('ITN006', $this->source()); + $this->assertNotContains('ITN011', $this->source()); $this->type("ctl0\$body\$PageButtonCount", "10"); - $this->clickAndWait("name=ctl0\$body\$ctl6", ""); + $this->byName("ctl0\$body\$ctl6")->click(); $this->type("ctl0\$body\$PageSize", "2"); - $this->clickAndWait("name=ctl0\$body\$ctl8", ""); - $this->verifyTextPresent('ITN001',''); - $this->verifyTextPresent('ITN002',''); - $this->verifyTextNotPresent('ITN003',''); - $this->clickAndWait("link=10", ""); - $this->verifyTextPresent('ITN019',''); - $this->verifyTextNotPresent('ITN018',''); + $this->byName("ctl0\$body\$ctl8")->click(); + $this->assertContains('ITN001', $this->source()); + $this->assertContains('ITN002', $this->source()); + $this->assertNotContains('ITN003', $this->source()); + $this->byLinkText("10")->click(); + $this->assertContains('ITN019', $this->source()); + $this->assertNotContains('ITN018', $this->source()); } } diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php index c6fba20fe..54af86a89 100755 --- a/tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php @@ -1,48 +1,48 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample6&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample6&notheme=true&lang=en"); // verify column headers - $this->verifyTextPresent('id',''); - $this->verifyTextPresent('name',''); - $this->verifyTextPresent('quantity',''); - $this->verifyTextPresent('price',''); - $this->verifyTextPresent('imported',''); + $this->assertContains('id', $this->source()); + $this->assertContains('name', $this->source()); + $this->assertContains('quantity', $this->source()); + $this->assertContains('price', $this->source()); + $this->assertContains('imported', $this->source()); - $this->verifyTextPresent('ITN001',''); - $this->verifyTextPresent('ITN002',''); - $this->verifyTextPresent('ITN003',''); - $this->verifyTextPresent('ITN004',''); - $this->verifyTextPresent('ITN005',''); - $this->verifyTextNotPresent('ITN006',''); + $this->assertContains('ITN001', $this->source()); + $this->assertContains('ITN002', $this->source()); + $this->assertContains('ITN003', $this->source()); + $this->assertContains('ITN004', $this->source()); + $this->assertContains('ITN005', $this->source()); + $this->assertNotContains('ITN006', $this->source()); // verify paging - $this->clickAndWait("link=2", ""); - $this->verifyTextPresent('ITN006',''); - $this->verifyTextPresent('ITN007',''); - $this->verifyTextPresent('ITN008',''); - $this->verifyTextPresent('ITN009',''); - $this->verifyTextPresent('ITN010',''); - $this->verifyTextNotPresent('ITN011',''); - $this->verifyTextNotPresent('ITN005',''); + $this->byLinkText("2")->click(); + $this->assertContains('ITN006', $this->source()); + $this->assertContains('ITN007', $this->source()); + $this->assertContains('ITN008', $this->source()); + $this->assertContains('ITN009', $this->source()); + $this->assertContains('ITN010', $this->source()); + $this->assertNotContains('ITN011', $this->source()); + $this->assertNotContains('ITN005', $this->source()); - $this->clickAndWait("link=4", ""); - $this->verifyTextPresent('ITN016',''); - $this->verifyTextPresent('ITN017',''); - $this->verifyTextPresent('ITN018',''); - $this->verifyTextPresent('ITN019',''); - $this->verifyTextNotPresent('ITN015',''); + $this->byLinkText("4")->click(); + $this->assertContains('ITN016', $this->source()); + $this->assertContains('ITN017', $this->source()); + $this->assertContains('ITN018', $this->source()); + $this->assertContains('ITN019', $this->source()); + $this->assertNotContains('ITN015', $this->source()); - $this->clickAndWait("link=1", ""); - $this->verifyTextPresent('ITN001',''); - $this->verifyTextPresent('ITN002',''); - $this->verifyTextPresent('ITN003',''); - $this->verifyTextPresent('ITN004',''); - $this->verifyTextPresent('ITN005',''); - $this->verifyTextNotPresent('ITN006',''); + $this->byLinkText("1")->click(); + $this->assertContains('ITN001', $this->source()); + $this->assertContains('ITN002', $this->source()); + $this->assertContains('ITN003', $this->source()); + $this->assertContains('ITN004', $this->source()); + $this->assertContains('ITN005', $this->source()); + $this->assertNotContains('ITN006', $this->source()); } } diff --git a/tests/FunctionalTests/quickstart/Controls/DataList1TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataList1TestCase.php index 4ff6478aa..436af2adf 100755 --- a/tests/FunctionalTests/quickstart/Controls/DataList1TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DataList1TestCase.php @@ -1,24 +1,24 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TDataList.Sample1&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDataList.Sample1&notheme=true&lang=en"); // verify if all required texts are present - $this->verifyTextPresent('ITN001',''); - $this->verifyTextPresent('$100',''); - $this->verifyTextPresent('Motherboard',''); - $this->verifyTextPresent('ITN018',''); - $this->verifyTextPresent('Surge protector',''); - $this->verifyTextPresent('45',''); - $this->verifyTextPresent('$15',''); - $this->verifyTextPresent('Total 19 products.',''); - $this->verifyTextPresent('Computer Parts',''); + $this->assertContains('ITN001', $this->source()); + $this->assertContains('$100', $this->source()); + $this->assertContains('Motherboard', $this->source()); + $this->assertContains('ITN018', $this->source()); + $this->assertContains('Surge protector', $this->source()); + $this->assertContains('45', $this->source()); + $this->assertContains('$15', $this->source()); + $this->assertContains('Total 19 products.', $this->source()); + $this->assertContains('Computer Parts', $this->source()); // verify specific table tags - $this->verifyElementPresent("ctl0_body_DataList"); - $this->verifyElementPresent("//td[@align='right']"); + $this->assertElementPresent("ctl0_body_DataList"); + $this->assertElementPresent("//td[@align='right']"); } } diff --git a/tests/FunctionalTests/quickstart/Controls/DataList2TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataList2TestCase.php index 4fb3743e1..c21d71f3e 100755 --- a/tests/FunctionalTests/quickstart/Controls/DataList2TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DataList2TestCase.php @@ -1,59 +1,65 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TDataList.Sample2&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDataList.Sample2&notheme=true&lang=en"); // verify initial presentation - $this->verifyTextPresent("Motherboard ", ""); - $this->verifyTextPresent("Monitor ", ""); + $this->assertContains("Motherboard", $this->source()); + $this->assertContains("Monitor", $this->source()); // verify selecting an item - $this->clickAndWait("link=ITN003", ""); - $this->verifyTextPresent("Quantity", ""); - $this->verifyTextPresent("Price", ""); - $this->verifyTextPresent("\$80", ""); - $this->clickAndWait("link=ITN005", ""); - $this->verifyTextPresent("\$150", ""); + $this->byLinkText("ITN003")->click(); + $this->assertContains("Quantity", $this->source()); + $this->assertContains("Price", $this->source()); + $this->assertContains("\$80", $this->source()); + $this->byLinkText("ITN005")->click(); + $this->assertContains("\$150", $this->source()); // verify editting an item - $this->clickAndWait("id=ctl0_body_DataList_ctl5_ctl0", ""); + $this->byId("ctl0_body_DataList_ctl5_ctl0")->click(); $this->type("ctl0\$body\$DataList\$ctl5\$ProductQuantity", "11"); $this->type("ctl0\$body\$DataList\$ctl5\$ProductPrice", "140.99"); - $this->click("//input[@name='ctl0\$body\$DataList\$ctl5\$ProductImported']", ""); - $this->clickAndWait("link=Save", ""); + $this->byXPath("//input[@name='ctl0\$body\$DataList\$ctl5\$ProductImported']")->click(); + $this->byLinkText("Save")->click(); // verify item is saved - $this->clickAndWait("link=ITN005", ""); - $this->verifyTextPresent("\$140.99", ""); - $this->verifyTextPresent("11", ""); + $this->byLinkText("ITN005")->click(); + $this->assertContains("\$140.99", $this->source()); + $this->assertContains("11", $this->source()); // verify editting another item - $this->clickAndWait("id=ctl0_body_DataList_ctl3_ctl1", ""); + $this->byId("ctl0_body_DataList_ctl3_ctl1")->click(); $this->type("ctl0\$body\$DataList\$ctl3\$ProductName", "Hard Drive"); $this->type("ctl0\$body\$DataList\$ctl3\$ProductQuantity", "23"); - $this->click("//input[@name='ctl0\$body\$DataList\$ctl3\$ProductImported']", ""); - $this->clickAndWait("link=Cancel", ""); + $this->byXPath("//input[@name='ctl0\$body\$DataList\$ctl3\$ProductImported']")->click(); + $this->byLinkText("Cancel")->click(); // verify item is canceled - $this->clickAndWait("link=ITN003", ""); - $this->verifyTextPresent("2", ""); - $this->verifyTextPresent("Harddrive ", ""); + $this->byLinkText("ITN003")->click(); + $this->assertContains("2", $this->source()); + $this->assertContains("Harddrive", $this->source()); // verify item deletion - $this->clickAndWait("id=ctl0_body_DataList_ctl3_ctl1", ""); - $this->verifyConfirmation("Are you sure?"); - $this->chooseCancelOnNextConfirmation(); - $this->click("id=ctl0_body_DataList_ctl5_ctl2", ""); - $this->verifyConfirmation("Are you sure?"); - $this->verifyTextPresent("Motherboard ", ""); - $this->verifyTextPresent("CPU ", ""); - $this->verifyTextNotPresent("Harddrive",""); - $this->verifyTextPresent("Sound card", ""); - $this->verifyTextPresent("Video card", ""); - $this->verifyTextPresent("Keyboard",""); - $this->verifyTextPresent("Monitor ", ""); + $this->byId("ctl0_body_DataList_ctl3_ctl1")->click(); + + $this->assertEquals("Are you sure?", $this->alertText()); + $this->acceptAlert(); + + $this->pause(300); // wait for reload + $this->byId("ctl0_body_DataList_ctl5_ctl2")->click(); + + $this->assertEquals("Are you sure?", $this->alertText()); + $this->dismissAlert(); + + $this->assertContains("Motherboard", $this->source()); + $this->assertContains("CPU", $this->source()); + $this->assertNotContains("Harddrive", $this->source()); + $this->assertContains("Sound card", $this->source()); + $this->assertContains("Video card", $this->source()); + $this->assertContains("Keyboard", $this->source()); + $this->assertContains("Monitor", $this->source()); } } diff --git a/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php b/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php index eae8ab36e..cb01e9480 100755 --- a/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php @@ -1,65 +1,65 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TDropDownList.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDropDownList.Home&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); // dropdown list with default settings - $this->verifyElementPresent("ctl0\$body\$ctl0"); + $this->assertElementPresent("ctl0\$body\$ctl0"); // dropdown list with initial options - $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl1"), array('item 1', 'item 2', 'item 3', 'item 4')); + $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl1"), array('item 1', 'item 2', 'item 3', 'item 4')); $this->assertSelected("ctl0\$body\$ctl1","item 2"); // dropdown list with customized styles - $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl2"), array('item 1', 'item 2', 'item 3', 'item 4')); + $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl2"), array('item 1', 'item 2', 'item 3', 'item 4')); $this->assertSelected("ctl0\$body\$ctl2","item 2"); // a disabled dropdown list - $this->verifyAttribute("ctl0\$body\$ctl3@disabled","regexp:true|disabled"); + $this->assertAttribute("ctl0\$body\$ctl3@disabled","regexp:true|disabled"); // an auto postback dropdown list - $this->verifyTextNotPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", ""); - $this->selectAndWait("ctl0\$body\$ctl4", "label=item 3"); - $this->verifyTextPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", ""); + $this->assertNotContains("Your selection is: (Index: 2, Value: value 3, Text: item 3)", $this->source()); + $this->selectAndWait("ctl0\$body\$ctl4", "item 3"); + $this->assertContains("Your selection is: (Index: 2, Value: value 3, Text: item 3)", $this->source()); // a single selection list box upon postback - $this->select("ctl0\$body\$DropDownList1", "label=item 4"); - $this->verifyTextNotPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", ""); - $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); - $this->verifyTextPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", ""); + $this->select("ctl0\$body\$DropDownList1", "item 4"); + $this->assertNotContains("Your selection is: (Index: 3, Value: value 4, Text: item 4)", $this->source()); + $this->byXPath("//input[@type='submit' and @value='Submit']")->click(); + $this->assertContains("Your selection is: (Index: 3, Value: value 4, Text: item 4)", $this->source()); // Databind to an integer-indexed array - $this->selectAndWait("ctl0\$body\$DBDropDownList1", "label=item 3"); - $this->verifyTextPresent("Your selection is: (Index: 2, Value: 2, Text: item 3)", ""); + $this->selectAndWait("ctl0\$body\$DBDropDownList1", "item 3"); + $this->assertContains("Your selection is: (Index: 2, Value: 2, Text: item 3)", $this->source()); // Databind to an associative array - $this->selectAndWait("ctl0\$body\$DBDropDownList2", "label=item 2"); - $this->verifyTextPresent("Your selection is: (Index: 1, Value: key 2, Text: item 2)", ""); + $this->selectAndWait("ctl0\$body\$DBDropDownList2", "item 2"); + $this->assertContains("Your selection is: (Index: 1, Value: key 2, Text: item 2)", $this->source()); // Databind with DataTextField and DataValueField specified - $this->selectAndWait("ctl0\$body\$DBDropDownList3", "label=Cary"); - $this->verifyTextPresent("Your selection is: (Index: 2, Value: 003, Text: Cary)", ""); + $this->selectAndWait("ctl0\$body\$DBDropDownList3", "Cary"); + $this->assertContains("Your selection is: (Index: 2, Value: 003, Text: Cary)", $this->source()); // dropdown list is being validated - $this->verifyNotVisible('ctl0_body_ctl6'); - $this->click("id=ctl0_body_ctl7", ""); - $this->verifyVisible('ctl0_body_ctl6'); - $this->select("ctl0\$body\$VDropDownList1", "label=item 2"); - $this->clickAndWait("id=ctl0_body_ctl7", ""); - $this->verifyNotVisible('ctl0_body_ctl6'); + $this->assertNotVisible('ctl0_body_ctl6'); + $this->byId("ctl0_body_ctl7")->click(); + $this->assertVisible('ctl0_body_ctl6'); + $this->select("ctl0\$body\$VDropDownList1", "item 2"); + $this->byId("ctl0_body_ctl7")->click(); + $this->assertNotVisible('ctl0_body_ctl6'); // dropdown list causing validation - $this->verifyNotVisible('ctl0_body_ctl8'); - $this->select("ctl0\$body\$VDropDownList2", "label=Disagree"); + $this->assertNotVisible('ctl0_body_ctl8'); + $this->select("ctl0\$body\$VDropDownList2", "Disagree"); $this->pause(1000); - $this->verifyVisible('ctl0_body_ctl8'); + $this->assertVisible('ctl0_body_ctl8'); $this->type("ctl0\$body\$TextBox", "test"); - $this->selectAndWait("ctl0\$body\$VDropDownList2", "label=Agree"); - $this->verifyNotVisible('ctl0_body_ctl8'); + $this->selectAndWait("ctl0\$body\$VDropDownList2", "Agree"); + $this->assertNotVisible('ctl0_body_ctl8'); } } diff --git a/tests/FunctionalTests/quickstart/Controls/ExpressionTestCase.php b/tests/FunctionalTests/quickstart/Controls/ExpressionTestCase.php index 4d47fecd5..8c5add482 100755 --- a/tests/FunctionalTests/quickstart/Controls/ExpressionTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/ExpressionTestCase.php @@ -1,13 +1,13 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TExpression.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TExpression.Home&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); - $this->verifyTextPresent('PRADO QuickStart Sample'); + $this->assertContains('PRADO QuickStart Sample', $this->source()); } } diff --git a/tests/FunctionalTests/quickstart/Controls/HtmlAreaTestCase.php b/tests/FunctionalTests/quickstart/Controls/HtmlAreaTestCase.php index caa7a893b..53ee66973 100755 --- a/tests/FunctionalTests/quickstart/Controls/HtmlAreaTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/HtmlAreaTestCase.php @@ -1,12 +1,12 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.THtmlArea.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.THtmlArea.Home&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); // can't perform any test } diff --git a/tests/FunctionalTests/quickstart/Controls/HyperLinkTestCase.php b/tests/FunctionalTests/quickstart/Controls/HyperLinkTestCase.php index dc0261e71..bc7ef8b85 100755 --- a/tests/FunctionalTests/quickstart/Controls/HyperLinkTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/HyperLinkTestCase.php @@ -1,15 +1,15 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.THyperLink.Home&notheme=true&lang=en", ""); - $this->verifyTitle("PRADO QuickStart Sample", ""); - $this->verifyElementPresent("//a[@href=\"http://www.pradosoft.com/\" and @target=\"_blank\"]"); - $this->verifyTextPresent("Welcome to", ""); - $this->verifyTextPresent("Body contents", ""); - $this->verifyElementPresent("//a[img/@alt='Hello World']"); - $this->verifyElementPresent("//a[contains(text(),'Body contents')]"); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.THyperLink.Home&notheme=true&lang=en"); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); + $this->assertElementPresent("//a[@href=\"http://www.pradosoft.com/\" and @target=\"_blank\"]"); + $this->assertContains("Welcome to", $this->source()); + $this->assertContains("Body contents", $this->source()); + $this->assertElementPresent("//a[img/@alt='Hello World']"); + $this->assertElementPresent("//a[contains(text(),'Body contents')]"); } } diff --git a/tests/FunctionalTests/quickstart/Controls/ImageButtonTestCase.php b/tests/FunctionalTests/quickstart/Controls/ImageButtonTestCase.php index bf531d729..0f86216ef 100755 --- a/tests/FunctionalTests/quickstart/Controls/ImageButtonTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/ImageButtonTestCase.php @@ -1,28 +1,28 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TImageButton.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TImageButton.Home&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); // a click button - $this->clickAndWait("//input[@type='image' and @alt='hello world']", ""); - $this->verifyTextPresent("You clicked at ",""); + $this->byXPath("//input[@type='image' and @alt='hello world']")->click(); + $this->assertContains("You clicked at ", $this->source()); // a command button - $this->clickAndWait("ctl0\$body\$ctl1", ""); - $this->verifyTextPresent("Command name: test, Command parameter: value",""); + $this->byName("ctl0\$body\$ctl1")->click(); + $this->assertContains("Command name: test, Command parameter: value", $this->source()); // a button causing validation - $this->verifyNotVisible('ctl0_body_ctl2'); - $this->click("id=ctl0_body_ctl3", ""); + $this->assertNotVisible('ctl0_body_ctl2'); + $this->byId("ctl0_body_ctl3")->click(); // $this->pause(1000); - $this->verifyVisible('ctl0_body_ctl2'); + $this->assertVisible('ctl0_body_ctl2'); $this->type("ctl0\$body\$TextBox", "test"); - $this->clickAndWait("id=ctl0_body_ctl3", ""); - $this->verifyNotVisible('ctl0_body_ctl2'); + $this->byId("ctl0_body_ctl3")->click(); + $this->assertNotVisible('ctl0_body_ctl2'); } } diff --git a/tests/FunctionalTests/quickstart/Controls/ImageTestCase.php b/tests/FunctionalTests/quickstart/Controls/ImageTestCase.php index 19e80470b..f3bd47752 100755 --- a/tests/FunctionalTests/quickstart/Controls/ImageTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/ImageTestCase.php @@ -1,18 +1,18 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TImage.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TImage.Home&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); - //$this->verifyElementPresent("//img[contains(@src,'/hello_world.gif') and @alt='']"); - $this->verifyElementPresent("//img[contains(@src,'/hello_world.gif') and @alt='Hello World!']"); - $this->verifyTextPresent("Hello World! Hello World! Hello World!", ""); - //$this->verifyElementPresent("//img[contains(@src,'/hello_world.gif') and @align='baseline']"); - //$this->verifyElementPresent("//img[contains(@src,'/hello_world.gif') and contains(@longdesc,'HelloWorld.html')]"); + //$this->assertElementPresent("//img[contains(@src,'/hello_world.gif') and @alt='']"); + $this->assertElementPresent("//img[contains(@src,'/hello_world.gif') and @alt='Hello World!']"); + $this->assertContains("Hello World! Hello World! Hello World!", $this->source()); + //$this->assertElementPresent("//img[contains(@src,'/hello_world.gif') and @align='baseline']"); + //$this->assertElementPresent("//img[contains(@src,'/hello_world.gif') and contains(@longdesc,'HelloWorld.html')]"); } } diff --git a/tests/FunctionalTests/quickstart/Controls/LabelTestCase.php b/tests/FunctionalTests/quickstart/Controls/LabelTestCase.php index 03bba8ed6..a9aa0bbe3 100755 --- a/tests/FunctionalTests/quickstart/Controls/LabelTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/LabelTestCase.php @@ -1,20 +1,20 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TLabel.Home&notheme=true&lang=en", ""); - $this->verifyTitle("PRADO QuickStart Sample", ""); - $this->verifyTextPresent("This is a label with customized color and font.", ""); - $this->verifyTextPresent("This is a form label associated with the TTextBox control below", ""); - $this->verifyTextPresent("This is a label with empty Text property and nonempty body", ""); - $this->verifyTextPresent("This is a disabled label", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TLabel.Home&notheme=true&lang=en"); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); + $this->assertContains("This is a label with customized color and font.", $this->source()); + $this->assertContains("This is a form label associated with the TTextBox control below", $this->source()); + $this->assertContains("This is a label with empty Text property and nonempty body", $this->source()); + $this->assertContains("This is a disabled label", $this->source()); - $this->verifyAttribute("ctl0_body_Label2@disabled","regexp:true|disabled"); + $this->assertAttribute("ctl0_body_Label2@disabled","regexp:true|disabled"); - //$this->verifyAttribute("ctl0_body_Label1@for","ctl0_body_test"); + //$this->assertAttribute("ctl0_body_Label1@for","ctl0_body_test"); $this->type("ctl0\$body\$test", "test"); } diff --git a/tests/FunctionalTests/quickstart/Controls/LinkButtonTestCase.php b/tests/FunctionalTests/quickstart/Controls/LinkButtonTestCase.php index 57e7b9757..97b4863d6 100755 --- a/tests/FunctionalTests/quickstart/Controls/LinkButtonTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/LinkButtonTestCase.php @@ -1,32 +1,32 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TLinkButton.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TLinkButton.Home&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); // regular buttons - $this->clickAndWait("link=link button", ""); - $this->clickAndWait("//a[contains(text(),'body content')]", ""); + $this->byLinkText("link button")->click(); + $this->byXPath("//a[contains(text(),'body content')]")->click(); // a click button - $this->clickAndWait("link=click me", ""); - $this->clickAndWait("link=I'm clicked", ""); + $this->byLinkText("click me")->click(); + $this->byLinkText("I'm clicked")->click(); // a command button - $this->clickAndWait("link=click me", ""); - $this->clickAndWait("//a[contains(text(),'Name: test, Param: value')]", ""); + $this->byLinkText("click me")->click(); + $this->byXPath("//a[contains(text(),'Name: test, Param: value')]")->click(); // a button causing validation - $this->verifyNotVisible('ctl0_body_ctl4'); - $this->click("link=submit", ""); + $this->assertNotVisible('ctl0_body_ctl4'); + $this->byLinkText("submit")->click(); // $this->pause(1000); - $this->verifyVisible('ctl0_body_ctl4'); + $this->assertVisible('ctl0_body_ctl4'); $this->type("ctl0\$body\$TextBox", "test"); - $this->clickAndWait("link=submit", ""); - $this->verifyNotVisible('ctl0_body_ctl4'); + $this->byLinkText("submit")->click(); + $this->assertNotVisible('ctl0_body_ctl4'); } } diff --git a/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php b/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php index 1cae0d43d..11910ba57 100755 --- a/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/ListBoxTestCase.php @@ -1,82 +1,81 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TListBox.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TListBox.Home&notheme=true&lang=en"); // a default single selection listbox - $this->verifyAttribute("ctl0\$body\$ctl0@size","4"); + $this->assertAttribute("ctl0\$body\$ctl0@size","4"); // single selection list box with initial options - $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl1"), array('item 1', 'item 2', 'item 3', 'item 4')); + $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl1"), array('item 1', 'item 2', 'item 3', 'item 4')); $this->assertSelected("ctl0\$body\$ctl1","item 2"); // a single selection list box with customized style - $this->verifyAttribute("ctl0\$body\$ctl2@size","3"); - $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl2"), array('item 1', 'item 2', 'item 3', 'item 4')); + $this->assertAttribute("ctl0\$body\$ctl2@size","3"); + $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl2"), array('item 1', 'item 2', 'item 3', 'item 4')); $this->assertSelected("ctl0\$body\$ctl2","item 2"); // a disabled list box - $this->verifyAttribute("ctl0\$body\$ctl3@disabled","regexp:true|disabled"); + $this->assertAttribute("ctl0\$body\$ctl3@disabled","regexp:true|disabled"); // an auto postback single selection list box - $this->verifyTextNotPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", ""); - $this->selectAndWait("ctl0\$body\$ctl4", "label=item 3"); - $this->verifyTextPresent("exact:Your selection is: (Index: 2, Value: value 3, Text: item 3)", ""); + $this->assertNotContains("Your selection is: (Index: 2, Value: value 3, Text: item 3)", $this->source()); + $this->selectAndWait("ctl0\$body\$ctl4", "item 3"); + $this->assertContains("Your selection is: (Index: 2, Value: value 3, Text: item 3)", $this->source()); // a single selection list box upon postback - $this->select("ctl0\$body\$ListBox1", "label=item 4"); - $this->verifyTextNotPresent("Your selection is: (Index: 3, Value: value 4, Text: item 4)", ""); - $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); - $this->verifyTextPresent("exact:Your selection is: (Index: 3, Value: value 4, Text: item 4)", ""); + $this->select("ctl0\$body\$ListBox1", "item 4"); + $this->assertNotContains("Your selection is: (Index: 3, Value: value 4, Text: item 4)", $this->source()); + $this->byXPath("//input[@type='submit' and @value='Submit']")->click(); + $this->assertContains("Your selection is: (Index: 3, Value: value 4, Text: item 4)", $this->source()); // a multiple selection list box - $this->verifyAttribute("ctl0\$body\$ctl6[]@size","4"); - $this->verifyAttribute("ctl0\$body\$ctl6[]@multiple","regexp:true|multiple"); + $this->assertAttribute("ctl0\$body\$ctl6[]@size","4"); + $this->assertAttribute("ctl0\$body\$ctl6[]@multiple","regexp:true|multiple"); // a multiple selection list box with initial options - $this->verifyAttribute("ctl0\$body\$ctl7[]@multiple","regexp:true|multiple"); + $this->assertAttribute("ctl0\$body\$ctl7[]@multiple","regexp:true|multiple"); $this->assertEquals($this->getSelectOptions("ctl0\$body\$ctl7[]"), array('item 1', 'item 2', 'item 3', 'item 4')); // multiselection list box's behavior upon postback - $this->addSelection("ctl0\$body\$ListBox2[]", "label=item 3"); - $this->clickAndWait("name=ctl0\$body\$ctl8", ""); - $this->verifyText("ctl0_body_MultiSelectionResult2","exact:Your selection is: (Index: 1, Value: value 2, Text: item 2)(Index: 2, Value: value 3, Text: item 3)(Index: 3, Value: value 4, Text: item 4)"); + $this->addSelection("ctl0\$body\$ListBox2[]", "item 3"); + $this->byName("ctl0\$body\$ctl8")->click(); + $this->assertText("ctl0_body_MultiSelectionResult2","Your selection is: (Index: 1, Value: value 2, Text: item 2)(Index: 2, Value: value 3, Text: item 3)(Index: 3, Value: value 4, Text: item 4)"); // Auto postback multiselection list box - $this->addSelection("ctl0\$body\$ctl9[]", "label=item 1"); - $this->waitForPageToLoad(1000); - $this->verifyText("ctl0_body_MultiSelectionResult","exact:Your selection is: (Index: 0, Value: value 1, Text: item 1)(Index: 1, Value: value 2, Text: item 2)(Index: 3, Value: value 4, Text: item 4)"); + $this->addSelection("ctl0\$body\$ctl9[]", "item 1"); + $this->assertText("ctl0_body_MultiSelectionResult","Your selection is: (Index: 0, Value: value 1, Text: item 1)(Index: 1, Value: value 2, Text: item 2)(Index: 3, Value: value 4, Text: item 4)"); // Databind to an integer-indexed array - $this->selectAndWait("ctl0\$body\$DBListBox1[]", "label=item 3"); - $this->verifyTextPresent("exact:Your selection is: (Index: 2, Value: 2, Text: item 3)", ""); + $this->selectAndWait("ctl0\$body\$DBListBox1[]", "item 3"); + $this->assertContains("Your selection is: (Index: 2, Value: 2, Text: item 3)", $this->source()); // Databind to an associative array - $this->selectAndWait("ctl0\$body\$DBListBox2[]", "label=item 2"); - $this->verifyTextPresent("exact:Your selection is: (Index: 1, Value: key 2, Text: item 2)", ""); + $this->selectAndWait("ctl0\$body\$DBListBox2[]", "item 2"); + $this->assertContains("Your selection is: (Index: 1, Value: key 2, Text: item 2)", $this->source()); // Databind with DataTextField and DataValueField specified - $this->selectAndWait("ctl0\$body\$DBListBox3[]", "label=Cary"); - $this->verifyTextPresent("exact:Your selection is: (Index: 2, Value: 003, Text: Cary)", ""); + $this->selectAndWait("ctl0\$body\$DBListBox3[]", "Cary"); + $this->assertContains("Your selection is: (Index: 2, Value: 003, Text: Cary)", $this->source()); // List box is being validated - $this->verifyNotVisible('ctl0_body_ctl10'); - $this->click("id=ctl0_body_ctl11", ""); - $this->verifyVisible('ctl0_body_ctl10'); - $this->select("ctl0\$body\$VListBox1", "label=item 2"); - $this->clickAndWait("id=ctl0_body_ctl11", ""); - $this->verifyNotVisible('ctl0_body_ctl10'); + $this->assertNotVisible('ctl0_body_ctl10'); + $this->byId("ctl0_body_ctl11")->click(); + $this->assertVisible('ctl0_body_ctl10'); + $this->select("ctl0\$body\$VListBox1", "item 2"); + $this->byId("ctl0_body_ctl11")->click(); + $this->assertNotVisible('ctl0_body_ctl10'); // List box causing validation - $this->verifyNotVisible('ctl0_body_ctl12'); - $this->select("ctl0\$body\$VListBox2", "label=Agree"); - $this->verifyVisible('ctl0_body_ctl12'); + $this->assertNotVisible('ctl0_body_ctl12'); + $this->select("ctl0\$body\$VListBox2", "Agree"); + $this->assertVisible('ctl0_body_ctl12'); $this->type("ctl0\$body\$TextBox", "test"); - $this->selectAndWait("ctl0\$body\$VListBox2", "label=Disagree"); - $this->verifyNotVisible('ctl0_body_ctl12'); + $this->selectAndWait("ctl0\$body\$VListBox2", "Disagree"); + $this->assertNotVisible('ctl0_body_ctl12'); } } diff --git a/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php b/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php index 2b47456e5..d7a5ebec0 100755 --- a/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/MultiViewTestCase.php @@ -1,35 +1,35 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TMultiView.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TMultiView.Home&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); // view 1 : type in a string - $this->verifyElementNotPresent('ctl0_body_Result1'); - $this->verifyElementNotPresent('ctl0_body_Result2'); + $this->assertElementNotPresent('ctl0_body_Result1'); + $this->assertElementNotPresent('ctl0_body_Result2'); $this->type('ctl0_body_Memo','test'); - $this->clickAndWait('ctl0$body$ctl0'); // view 2 to select the dropdown - $this->clickAndWait('ctl0$body$ctl4'); + $this->byName('ctl0$body$ctl0')->click(); // view 2 to select the dropdown + $this->byName('ctl0$body$ctl4')->click(); // view 3 : check if the output is updated - $this->verifyTextPresent('Your text input is: test'); - $this->verifyTextPresent('Your color choice is: Red'); - $this->clickAndWait('ctl0$body$ctl7'); + $this->assertContains('Your text input is: test', $this->source()); + $this->assertContains('Your color choice is: Red', $this->source()); + $this->byName('ctl0$body$ctl7')->click(); // view 2 : update dropdownlist - $this->verifyElementNotPresent('ctl0_body_Result1'); - $this->verifyElementNotPresent('ctl0_body_Result2'); - $this->select('ctl0$body$DropDownList', "label=Blue"); - $this->clickAndWait('ctl0$body$ctl4'); + $this->assertElementNotPresent('ctl0_body_Result1'); + $this->assertElementNotPresent('ctl0_body_Result2'); + $this->select('ctl0$body$DropDownList', "Blue"); + $this->byName('ctl0$body$ctl4')->click(); // view 3 : check if the output is updated - $this->verifyTextPresent('Your text input is: test'); - $this->verifyTextPresent('Your color choice is: Blue'); - $this->clickAndWait('ctl0$body$ctl7'); + $this->assertContains('Your text input is: test', $this->source()); + $this->assertContains('Your color choice is: Blue', $this->source()); + $this->byName('ctl0$body$ctl7')->click(); // view 2 : check if dropdownlist maintains state $this->assertSelected('ctl0$body$DropDownList', "Blue"); diff --git a/tests/FunctionalTests/quickstart/Controls/PagerTestCase.php b/tests/FunctionalTests/quickstart/Controls/PagerTestCase.php index a1fefed6a..7e4a66276 100755 --- a/tests/FunctionalTests/quickstart/Controls/PagerTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/PagerTestCase.php @@ -1,56 +1,56 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TPager.Sample1&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TPager.Sample1&notheme=true&lang=en"); // verify datalist content - $this->verifyTextPresent('ITN001',''); - $this->verifyTextPresent('ITN002',''); - $this->verifyTextNotPresent('ITN003',''); + $this->assertContains('ITN001', $this->source()); + $this->assertContains('ITN002', $this->source()); + $this->assertNotContains('ITN003', $this->source()); // verify numeric paging - $this->clickAndWait("ctl0_body_Pager_ctl1", ""); // 2nd page - $this->verifyTextPresent('ITN003',''); - $this->verifyTextPresent('ITN004',''); - $this->verifyTextNotPresent('ITN002',''); - $this->verifyTextNotPresent('ITN005',''); - $this->clickAndWait("ctl0_body_Pager_ctl3", ""); // 4rd page - $this->verifyTextPresent('ITN007',''); - $this->verifyTextPresent('ITN008',''); - $this->verifyTextNotPresent('ITN006',''); - $this->verifyTextNotPresent('ITN009',''); - $this->clickAndWait("ctl0_body_Pager_ctl6", ""); // last page - $this->verifyTextPresent('ITN019',''); - $this->verifyTextNotPresent('ITN018',''); - $this->verifyTextNotPresent('ITN001',''); + $this->byId("ctl0_body_Pager_ctl1")->click(); // 2nd page + $this->assertContains('ITN003', $this->source()); + $this->assertContains('ITN004', $this->source()); + $this->assertNotContains('ITN002', $this->source()); + $this->assertNotContains('ITN005', $this->source()); + $this->byId("ctl0_body_Pager_ctl3")->click(); // 4rd page + $this->assertContains('ITN007', $this->source()); + $this->assertContains('ITN008', $this->source()); + $this->assertNotContains('ITN006', $this->source()); + $this->assertNotContains('ITN009', $this->source()); + $this->byId("ctl0_body_Pager_ctl6")->click(); // last page + $this->assertContains('ITN019', $this->source()); + $this->assertNotContains('ITN018', $this->source()); + $this->assertNotContains('ITN001', $this->source()); // verify next-prev paging - $this->clickAndWait("ctl0_body_Pager2_ctl1", ""); // prev page - $this->verifyTextPresent('ITN017',''); - $this->verifyTextPresent('ITN018',''); - $this->verifyTextNotPresent('ITN019',''); - $this->verifyTextNotPresent('ITN016',''); - $this->clickAndWait("ctl0_body_Pager2_ctl0", ""); // first page - $this->verifyTextPresent('ITN001',''); - $this->verifyTextPresent('ITN002',''); - $this->verifyTextNotPresent('ITN003',''); - $this->clickAndWait("ctl0_body_Pager2_ctl2", ""); // next page - $this->verifyTextPresent('ITN003',''); - $this->verifyTextPresent('ITN004',''); - $this->verifyTextNotPresent('ITN002',''); - $this->verifyTextNotPresent('ITN005',''); + $this->byId("ctl0_body_Pager2_ctl1")->click(); // prev page + $this->assertContains('ITN017', $this->source()); + $this->assertContains('ITN018', $this->source()); + $this->assertNotContains('ITN019', $this->source()); + $this->assertNotContains('ITN016', $this->source()); + $this->byId("ctl0_body_Pager2_ctl0")->click(); // first page + $this->assertContains('ITN001', $this->source()); + $this->assertContains('ITN002', $this->source()); + $this->assertNotContains('ITN003', $this->source()); + $this->byId("ctl0_body_Pager2_ctl2")->click(); // next page + $this->assertContains('ITN003', $this->source()); + $this->assertContains('ITN004', $this->source()); + $this->assertNotContains('ITN002', $this->source()); + $this->assertNotContains('ITN005', $this->source()); $this->assertSelected("ctl0_body_Pager3_ctl0","2"); - $this->selectAndWait("ctl0_body_Pager3_ctl0", "label=5"); - $this->verifyTextPresent('ITN009',''); - $this->verifyTextPresent('ITN010',''); - $this->verifyTextNotPresent('ITN008',''); - $this->verifyTextNotPresent('ITN011',''); - $this->selectAndWait("ctl0_body_Pager3_ctl0", "label=10"); - $this->verifyTextPresent('ITN019',''); - $this->verifyTextNotPresent('ITN018',''); + $this->selectAndWait("ctl0_body_Pager3_ctl0", "5"); + $this->assertContains('ITN009', $this->source()); + $this->assertContains('ITN010', $this->source()); + $this->assertNotContains('ITN008', $this->source()); + $this->assertNotContains('ITN011', $this->source()); + $this->selectAndWait("ctl0_body_Pager3_ctl0", "10"); + $this->assertContains('ITN019', $this->source()); + $this->assertNotContains('ITN018', $this->source()); } } diff --git a/tests/FunctionalTests/quickstart/Controls/PanelTestCase.php b/tests/FunctionalTests/quickstart/Controls/PanelTestCase.php index 3def308b5..0d3e2797c 100755 --- a/tests/FunctionalTests/quickstart/Controls/PanelTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/PanelTestCase.php @@ -1,16 +1,16 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TPanel.Home&notheme=true&lang=en", ""); - $this->verifyTextPresent("This is panel content with", ""); - $this->verifyElementPresent("//span[text()='label']"); - $this->verifyTextPresent("grouping text", ""); - $this->click("//input[@name='ctl0\$body\$ctl17']", ""); - $this->verifyTextNotPresent("You have clicked on 'button2'."); - $this->clickAndWait("//input[@type='submit' and @value='button2']", ""); - $this->verifyTextPresent("You have clicked on 'button2'."); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TPanel.Home&notheme=true&lang=en"); + $this->assertContains("This is panel content with", $this->source()); + $this->assertElementPresent("//span[text()='label']"); + $this->assertContains("grouping text", $this->source()); + $this->byXPath("//input[@name='ctl0\$body\$ctl17']")->click(); + $this->assertNotContains("You have clicked on 'button2'.", $this->source()); + $this->byXPath("//input[@type='submit' and @value='button2']")->click(); + $this->assertContains("You have clicked on 'button2'.", $this->source()); } } diff --git a/tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php b/tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php index 659f20ff0..6242cebee 100755 --- a/tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/RadioButtonListTestCase.php @@ -1,17 +1,17 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TRadioButtonList.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TRadioButtonList.Home&notheme=true&lang=en"); // RadioButton list with default settings: - $this->click("//input[@name='ctl0\$body\$ctl0' and @value='value 3']", ""); + $this->byXPath("//input[@name='ctl0\$body\$ctl0' and @value='value 3']")->click(); // RadioButton list with customized cellpadding, cellspacing, color and text alignment: - $this->click("//input[@name='ctl0\$body\$ctl1' and @value='value 1']", ""); + $this->byXPath("//input[@name='ctl0\$body\$ctl1' and @value='value 1']")->click(); // *** Currently unable to test the following cases: // RadioButton list with vertical (default) repeat direction @@ -20,33 +20,33 @@ function test () // RadioButton list with flow layout and horizontal repeat direction: // RadioButton list's behavior upon postback - $this->click("//input[@name='ctl0\$body\$RadioButtonList' and @value='value 3']", ""); - $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); - $this->verifyTextPresent("Your selection is: (Index: 2, Value: value 3, Text: item 3)", ""); + $this->byXPath("//input[@name='ctl0\$body\$RadioButtonList' and @value='value 3']")->click(); + $this->byXPath("//input[@type='submit' and @value='Submit']")->click(); + $this->assertContains("Your selection is: (Index: 2, Value: value 3, Text: item 3)", $this->source()); // Auto postback check box list - $this->clickAndWait("//input[@name='ctl0\$body\$ctl7' and @value='value 5']", ""); - $this->verifyTextPresent("Your selection is: (Index: 4, Value: value 5, Text: item 5)", ""); + $this->byXPath("//input[@name='ctl0\$body\$ctl7' and @value='value 5']")->click(); + $this->assertContains("Your selection is: (Index: 4, Value: value 5, Text: item 5)", $this->source()); // Databind to an integer-indexed array - $this->clickAndWait("//input[@name='ctl0\$body\$DBRadioButtonList1' and @value='0']", ""); - $this->verifyTextPresent("Your selection is: (Index: 0, Value: 0, Text: item 1)", ""); + $this->byXPath("//input[@name='ctl0\$body\$DBRadioButtonList1' and @value='0']")->click(); + $this->assertContains("Your selection is: (Index: 0, Value: 0, Text: item 1)", $this->source()); // Databind to an associative array: - $this->clickAndWait("//input[@name='ctl0\$body\$DBRadioButtonList2' and @value='key 2']", ""); - $this->verifyTextPresent("Your selection is: (Index: 1, Value: key 2, Text: item 2)", ""); + $this->byXPath("//input[@name='ctl0\$body\$DBRadioButtonList2' and @value='key 2']")->click(); + $this->assertContains("Your selection is: (Index: 1, Value: key 2, Text: item 2)", $this->source()); // Databind with DataTextField and DataValueField specified - $this->clickAndWait("//input[@name='ctl0\$body\$DBRadioButtonList3' and @value='003']", ""); - $this->verifyTextPresent("Your selection is: (Index: 2, Value: 003, Text: Cary)", ""); + $this->byXPath("//input[@name='ctl0\$body\$DBRadioButtonList3' and @value='003']")->click(); + $this->assertContains("Your selection is: (Index: 2, Value: 003, Text: Cary)", $this->source()); // RadioButton list causing validation - $this->verifyNotVisible('ctl0_body_ctl8'); - $this->click("//input[@name='ctl0\$body\$ctl9' and @value='Agree']", ""); + $this->assertNotVisible('ctl0_body_ctl8'); + $this->byXPath("//input[@name='ctl0\$body\$ctl9' and @value='Agree']")->click(); // $this->pause(1000); - $this->verifyVisible('ctl0_body_ctl8'); + $this->assertVisible('ctl0_body_ctl8'); $this->type("ctl0\$body\$TextBox", "test"); - $this->clickAndWait("//input[@name='ctl0\$body\$ctl9' and @value='Disagree']", ""); - $this->verifyNotVisible('ctl0_body_ctl8'); + $this->byXPath("//input[@name='ctl0\$body\$ctl9' and @value='Disagree']")->click(); + $this->assertNotVisible('ctl0_body_ctl8'); } } diff --git a/tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php b/tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php index 220312356..214b15967 100755 --- a/tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/RadioButtonTestCase.php @@ -1,56 +1,56 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TRadioButton.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TRadioButton.Home&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); // a regular radiobutton - $this->click("//input[@name='ctl0\$body\$ctl0' and @value='ctl0\$body\$ctl0']", ""); + $this->byXPath("//input[@name='ctl0\$body\$ctl0' and @value='ctl0\$body\$ctl0']")->click(); // a radiobutton with customized value - $this->click("//input[@name='ctl0\$body\$ctl1' and @value='value']", ""); + $this->byXPath("//input[@name='ctl0\$body\$ctl1' and @value='value']")->click(); // an auto postback radiobutton - $this->verifyTextNotPresent("I'm clicked"); - $this->clickAndWait("//input[@name='ctl0\$body\$ctl2' and @value='ctl0\$body\$ctl2']", ""); - $this->verifyTextPresent("I'm clicked"); - $this->click("//input[@name='ctl0\$body\$ctl2' and @value='ctl0\$body\$ctl2']", ""); - $this->verifyTextPresent("I'm clicked"); + $this->assertNotContains("I'm clicked", $this->source()); + $this->byXPath("//input[@name='ctl0\$body\$ctl2' and @value='ctl0\$body\$ctl2']")->click(); + $this->assertContains("I'm clicked", $this->source()); + $this->byXPath("//input[@name='ctl0\$body\$ctl2' and @value='ctl0\$body\$ctl2']")->click(); + $this->assertContains("I'm clicked", $this->source()); // a radiobutton causing validation on a textbox - $this->verifyNotVisible('ctl0_body_ctl3'); - $this->click("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']", ""); + $this->assertNotVisible('ctl0_body_ctl3'); + $this->byXPath("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']")->click(); $this->pause(1000); - $this->verifyVisible('ctl0_body_ctl3'); - $this->click("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']", ""); + $this->assertVisible('ctl0_body_ctl3'); + $this->byXPath("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']")->click(); $this->pause(1000); - $this->verifyVisible('ctl0_body_ctl3'); + $this->assertVisible('ctl0_body_ctl3'); $this->type("ctl0\$body\$TextBox", "test"); - $this->clickAndWait("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']", ""); - $this->verifyNotVisible('ctl0_body_ctl3'); + $this->byXPath("//input[@name='ctl0\$body\$ctl4' and @value='ctl0\$body\$ctl4']")->click(); + $this->assertNotVisible('ctl0_body_ctl3'); // a radiobutton validated by a required field validator - $this->verifyNotVisible('ctl0_body_ctl6'); - $this->click("//input[@type='submit' and @value='Submit']", ""); + $this->assertNotVisible('ctl0_body_ctl6'); + $this->byXPath("//input[@type='submit' and @value='Submit']")->click(); $this->pause(1000); - $this->verifyVisible('ctl0_body_ctl6'); - $this->click("//input[@name='ctl0\$body\$RadioButton' and @value='ctl0\$body\$RadioButton']", ""); - $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); - $this->verifyNotVisible('ctl0_body_ctl6'); + $this->assertVisible('ctl0_body_ctl6'); + $this->byXPath("//input[@name='ctl0\$body\$RadioButton' and @value='ctl0\$body\$RadioButton']")->click(); + $this->byXPath("//input[@type='submit' and @value='Submit']")->click(); + $this->assertNotVisible('ctl0_body_ctl6'); // a radiobutton group - $this->clickAndWait("name=ctl0\$body\$ctl7", ""); - $this->verifyTextPresent("Your selection is empty"); - $this->click("//input[@name='ctl0\$body\$RadioGroup' and @value='ctl0\$body\$Radio2']", ""); - $this->clickAndWait("name=ctl0\$body\$ctl7", ""); - $this->verifyTextPresent("Your selection is 2"); - $this->click("//input[@name='ctl0\$body\$RadioGroup' and @value='ctl0\$body\$Radio3']", ""); - $this->click("//input[@name='ctl0\$body\$Radio4' and @value='ctl0\$body\$Radio4']", ""); - $this->clickAndWait("name=ctl0\$body\$ctl7", ""); - $this->verifyTextPresent("Your selection is 34"); + $this->byName("ctl0\$body\$ctl7")->click(); + $this->assertContains("Your selection is empty", $this->source()); + $this->byXPath("//input[@name='ctl0\$body\$RadioGroup' and @value='ctl0\$body\$Radio2']")->click(); + $this->byName("ctl0\$body\$ctl7")->click(); + $this->assertContains("Your selection is 2", $this->source()); + $this->byXPath("//input[@name='ctl0\$body\$RadioGroup' and @value='ctl0\$body\$Radio3']")->click(); + $this->byXPath("//input[@name='ctl0\$body\$Radio4' and @value='ctl0\$body\$Radio4']")->click(); + $this->byName("ctl0\$body\$ctl7")->click(); + $this->assertContains("Your selection is 34", $this->source()); } } diff --git a/tests/FunctionalTests/quickstart/Controls/Repeater1TestCase.php b/tests/FunctionalTests/quickstart/Controls/Repeater1TestCase.php index 948055e15..4d7db9b39 100755 --- a/tests/FunctionalTests/quickstart/Controls/Repeater1TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/Repeater1TestCase.php @@ -1,27 +1,27 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample1&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample1&notheme=true&lang=en"); // verify if all required texts are present - $this->verifyTextPresent('ID',''); - $this->verifyTextPresent('Name',''); - $this->verifyTextPresent('Quantity',''); - $this->verifyTextPresent('Price',''); - $this->verifyTextPresent('Imported',''); - $this->verifyTextPresent('ITN001',''); - $this->verifyTextPresent('Motherboard',''); - $this->verifyTextPresent('Yes',''); - $this->verifyTextPresent('ITN019',''); - $this->verifyTextPresent('Speaker',''); - $this->verifyTextPresent('No',''); - $this->verifyTextPresent('Computer Parts Inventory',''); + $this->assertContains('ID', $this->source()); + $this->assertContains('Name', $this->source()); + $this->assertContains('Quantity', $this->source()); + $this->assertContains('Price', $this->source()); + $this->assertContains('Imported', $this->source()); + $this->assertContains('ITN001', $this->source()); + $this->assertContains('Motherboard', $this->source()); + $this->assertContains('Yes', $this->source()); + $this->assertContains('ITN019', $this->source()); + $this->assertContains('Speaker', $this->source()); + $this->assertContains('No', $this->source()); + $this->assertContains('Computer Parts Inventory', $this->source()); // verify specific table tags - $this->verifyElementPresent("//td[@colspan='5']"); - $this->verifyElementPresent("//table[@cellpadding='2']"); + $this->assertElementPresent("//td[@colspan='5']"); + $this->assertElementPresent("//table[@cellpadding='2']"); } } diff --git a/tests/FunctionalTests/quickstart/Controls/Repeater2TestCase.php b/tests/FunctionalTests/quickstart/Controls/Repeater2TestCase.php index 7d989fd05..8eb8c8636 100755 --- a/tests/FunctionalTests/quickstart/Controls/Repeater2TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/Repeater2TestCase.php @@ -1,35 +1,35 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample2&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample2&notheme=true&lang=en"); // verify if all required texts are present - $this->verifyTextPresent('North',''); - $this->verifyTextPresent('John',''); - $this->verifyTextPresent('Developer',''); - $this->verifyTextPresent('South',''); - $this->verifyTextPresent('Carter',''); - $this->verifyTextPresent('Program Manager',''); + $this->assertContains('North', $this->source()); + $this->assertContains('John', $this->source()); + $this->assertContains('Developer', $this->source()); + $this->assertContains('South', $this->source()); + $this->assertContains('Carter', $this->source()); + $this->assertContains('Program Manager', $this->source()); // verify specific table tags - $this->verifyElementPresent("//table[@cellspacing='1']"); - $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl1_Cell' and contains(text(),'North')]",""); - $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl1_Cell']",""); - $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl2_Cell']",""); - $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl3_Cell']",""); - $this->verifyElementPresent("//td[@id='ctl0_body_Repeater_ctl4_Cell']",""); - $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl1_Row']",""); - $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl2_Row']",""); - $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl3_Row']",""); - $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl1_Row']",""); - $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl2_Row']",""); - $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl3_Row']",""); - $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl3_Repeater2_ctl1_Row']",""); - $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl3_Repeater2_ctl2_Row']",""); - $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl4_Repeater2_ctl1_Row']",""); - $this->verifyElementPresent("//tr[@id='ctl0_body_Repeater_ctl4_Repeater2_ctl2_Row']",""); + $this->assertElementPresent("//table[@cellspacing='1']"); + $this->assertElementPresent("//td[@id='ctl0_body_Repeater_ctl1_Cell' and contains(text(),'North')]",""); + $this->assertElementPresent("//td[@id='ctl0_body_Repeater_ctl1_Cell']",""); + $this->assertElementPresent("//td[@id='ctl0_body_Repeater_ctl2_Cell']",""); + $this->assertElementPresent("//td[@id='ctl0_body_Repeater_ctl3_Cell']",""); + $this->assertElementPresent("//td[@id='ctl0_body_Repeater_ctl4_Cell']",""); + $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl1_Row']",""); + $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl2_Row']",""); + $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl3_Row']",""); + $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl1_Row']",""); + $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl2_Row']",""); + $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl3_Row']",""); + $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl3_Repeater2_ctl1_Row']",""); + $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl3_Repeater2_ctl2_Row']",""); + $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl4_Repeater2_ctl1_Row']",""); + $this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl4_Repeater2_ctl2_Row']",""); } } diff --git a/tests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php b/tests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php index a5031af51..3572a36f4 100755 --- a/tests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/Repeater3TestCase.php @@ -1,35 +1,35 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample3&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample3&notheme=true&lang=en"); // verify product name is required - $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl0'); + $this->assertNotVisible('ctl0_body_Repeater_ctl0_ctl0'); $this->type("ctl0_body_Repeater_ctl0_ProductName", ""); - $this->click("//input[@type='submit' and @value='Save']", ""); - $this->verifyVisible('ctl0_body_Repeater_ctl0_ctl0'); + $this->byXPath("//input[@type='submit' and @value='Save']")->click(); + $this->assertVisible('ctl0_body_Repeater_ctl0_ctl0'); // verify product price is of proper format - $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl1'); + $this->assertNotVisible('ctl0_body_Repeater_ctl0_ctl1'); $this->type("ctl0_body_Repeater_ctl0_ProductPrice", "abc"); - $this->click("//input[@type='submit' and @value='Save']", ""); - $this->verifyVisible('ctl0_body_Repeater_ctl0_ctl1'); + $this->byXPath("//input[@type='submit' and @value='Save']")->click(); + $this->assertVisible('ctl0_body_Repeater_ctl0_ctl1'); // perform postback - $this->click("ctl0_body_Repeater_ctl0_ProductImported",''); + $this->byId("ctl0_body_Repeater_ctl0_ProductImported",'')->click(); $this->type("ctl0_body_Repeater_ctl0_ProductName", "Mother Board"); $this->type("ctl0_body_Repeater_ctl0_ProductPrice", "99.01"); - $this->select("ctl0_body_Repeater_ctl3_ProductCategory", "label=Accessories"); - $this->clickAndWait("//input[@type='submit' and @value='Save']", ""); - $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl0'); - $this->verifyNotVisible('ctl0_body_Repeater_ctl0_ctl1'); + $this->select("ctl0_body_Repeater_ctl3_ProductCategory", "Accessories"); + $this->byXPath("//input[@type='submit' and @value='Save']")->click(); + $this->assertNotVisible('ctl0_body_Repeater_ctl0_ctl0'); + $this->assertNotVisible('ctl0_body_Repeater_ctl0_ctl1'); // verify postback results - $this->verifyElementPresent("//td[text()='Mother Board']",''); - $this->verifyElementNotPresent("//td[text()='Input Devices']",''); - $this->verifyElementPresent("//td[text()='99.01']",''); + $this->assertElementPresent("//td[text()='Mother Board']",''); + $this->assertElementNotPresent("//td[text()='Input Devices']",''); + $this->assertElementPresent("//td[text()='99.01']",''); } } diff --git a/tests/FunctionalTests/quickstart/Controls/StatementsTestCase.php b/tests/FunctionalTests/quickstart/Controls/StatementsTestCase.php index a7c4c579a..df0e6f89e 100755 --- a/tests/FunctionalTests/quickstart/Controls/StatementsTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/StatementsTestCase.php @@ -1,13 +1,13 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TStatements.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TStatements.Home&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); - $this->verifyTextPresent('UniqueID is \'ctl0$body$ctl0\''); + $this->assertContains('UniqueID is \'ctl0$body$ctl0\'', $this->source()); } } diff --git a/tests/FunctionalTests/quickstart/Controls/TabPanelTestCase.php b/tests/FunctionalTests/quickstart/Controls/TabPanelTestCase.php index d01e824d7..13392ca5c 100755 --- a/tests/FunctionalTests/quickstart/Controls/TabPanelTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/TabPanelTestCase.php @@ -1,47 +1,47 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TTabPanel.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TTabPanel.Home&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); // verify initial visibility - $this->verifyNotVisible('ctl0_body_View1'); // view 1 - $this->verifyVisible('ctl0_body_View2'); // view 2 - $this->verifyNotVisible('ctl0_body_ctl2'); // view 3 + $this->assertNotVisible('ctl0_body_View1'); // view 1 + $this->assertVisible('ctl0_body_View2'); // view 2 + $this->assertNotVisible('ctl0_body_ctl2'); // view 3 // switching to the first view - $this->click('ctl0_body_View1_0'); + $this->byId('ctl0_body_View1_0')->click(); $this->pause(500); - $this->verifyVisible('ctl0_body_View1'); // view 1 - $this->verifyNotVisible('ctl0_body_View2'); // view 2 - $this->verifyNotVisible('ctl0_body_ctl2'); // view 3 - $this->verifyNotVisible('ctl0_body_View11'); // view 11 - $this->verifyVisible('ctl0_body_View21'); // view 21 + $this->assertVisible('ctl0_body_View1'); // view 1 + $this->assertNotVisible('ctl0_body_View2'); // view 2 + $this->assertNotVisible('ctl0_body_ctl2'); // view 3 + $this->assertNotVisible('ctl0_body_View11'); // view 11 + $this->assertVisible('ctl0_body_View21'); // view 21 // switching to View11 - $this->click('ctl0_body_View11_0'); + $this->byId('ctl0_body_View11_0')->click(); $this->pause(500); - $this->verifyVisible('ctl0_body_View1'); // view 1 - $this->verifyNotVisible('ctl0_body_View2'); // view 2 - $this->verifyNotVisible('ctl0_body_ctl2'); // view 3 - $this->verifyVisible('ctl0_body_View11'); // view 11 - $this->verifyNotVisible('ctl0_body_View21'); // view 21 + $this->assertVisible('ctl0_body_View1'); // view 1 + $this->assertNotVisible('ctl0_body_View2'); // view 2 + $this->assertNotVisible('ctl0_body_ctl2'); // view 3 + $this->assertVisible('ctl0_body_View11'); // view 11 + $this->assertNotVisible('ctl0_body_View21'); // view 21 // switching to the third view - $this->click('ctl0_body_ctl2_0'); + $this->byId('ctl0_body_ctl2_0')->click(); $this->pause(500); - $this->verifyNotVisible('ctl0_body_View1'); // view 1 - $this->verifyNotVisible('ctl0_body_View2'); // view 2 - $this->verifyVisible('ctl0_body_ctl2'); // view 3 + $this->assertNotVisible('ctl0_body_View1'); // view 1 + $this->assertNotVisible('ctl0_body_View2'); // view 2 + $this->assertVisible('ctl0_body_ctl2'); // view 3 // submit: check if the visibility is kept - $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); - $this->verifyNotVisible('ctl0_body_View1'); // view 1 - $this->verifyNotVisible('ctl0_body_View2'); // view 2 - $this->verifyVisible('ctl0_body_ctl2'); // view 3 + $this->byXPath("//input[@type='submit' and @value='Submit']")->click(); + $this->assertNotVisible('ctl0_body_View1'); // view 1 + $this->assertNotVisible('ctl0_body_View2'); // view 2 + $this->assertVisible('ctl0_body_ctl2'); // view 3 } } diff --git a/tests/FunctionalTests/quickstart/Controls/TableTestCase.php b/tests/FunctionalTests/quickstart/Controls/TableTestCase.php index 128f4b22d..aafd6f80a 100755 --- a/tests/FunctionalTests/quickstart/Controls/TableTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/TableTestCase.php @@ -1,18 +1,18 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TTable.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TTable.Home&notheme=true&lang=en"); - $this->verifyElementPresent("//table[@rules='all' and @border='1']"); - $this->verifyElementPresent("//table/caption[@align='bottom' and text()='This is table caption']"); - $this->verifyElementPresent("//th[text()='header cell 2']"); - $this->verifyElementPresent("//tr[@align='right']/td[text()='text']"); - $this->verifyElementPresent("//td[@align='center' and contains(text(),'cell 5')]"); + $this->assertElementPresent("//table[@rules='all' and @border='1']"); + $this->assertElementPresent("//table/caption[@align='bottom' and text()='This is table caption']"); + $this->assertElementPresent("//th[text()='header cell 2']"); + $this->assertElementPresent("//tr[@align='right']/td[text()='text']"); + $this->assertElementPresent("//td[@align='center' and contains(text(),'cell 5')]"); - $this->verifyElementPresent("//th[text()='Header 1']"); - $this->verifyElementPresent("//td[text()='Cell 1']"); + $this->assertElementPresent("//th[text()='Header 1']"); + $this->assertElementPresent("//td[text()='Cell 1']"); } } diff --git a/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php b/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php index a34647020..3865e33d6 100755 --- a/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/TextBoxTestCase.php @@ -1,58 +1,58 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TTextBox.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TTextBox.Home&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); // a normal textbox $this->type("ctl0\$body\$ctl0", "test"); // textbox with maxlength set - $this->verifyAttribute("ctl0\$body\$ctl1@size","4"); - $this->verifyAttribute("ctl0\$body\$ctl1@maxlength","6"); + $this->assertAttribute("ctl0\$body\$ctl1@size","4"); + $this->assertAttribute("ctl0\$body\$ctl1@maxlength","6"); $this->type("ctl0\$body\$ctl1", "textte"); // vCard textboxes - $this->verifyAttribute("ctl0\$body\$ctl2@vcard_name","vCard.FirstName"); + $this->assertAttribute("ctl0\$body\$ctl2@vcard_name","vCard.FirstName"); $this->type("ctl0\$body\$ctl2", "first"); - $this->verifyAttribute("ctl0\$body\$ctl3@vcard_name","vCard.LastName"); + $this->assertAttribute("ctl0\$body\$ctl3@vcard_name","vCard.LastName"); $this->type("ctl0\$body\$ctl3", "last"); // a disabled textbox - $this->verifyAttribute("ctl0\$body\$ctl4@disabled","regexp:true|disabled"); + $this->assertAttribute("ctl0\$body\$ctl4@disabled","regexp:true|disabled"); // a read-only textbox - $this->verifyAttribute("ctl0\$body\$ctl5@readonly","regexp:true|readonly"); + $this->assertAttribute("ctl0\$body\$ctl5@readonly","regexp:true|readonly"); // auto postback textbox, CausesValidation=false - $this->verifyValue("ctl0\$body\$ctl6", "change me"); - $this->typeAndWait("ctl0\$body\$ctl6", "change mes"); - $this->verifyValue("ctl0\$body\$ctl6", "text changed"); + $this->assertValue("ctl0\$body\$ctl6", "change me"); + $this->typeSpecial("ctl0\$body\$ctl6", "change mes"); + $this->assertValue("ctl0\$body\$ctl6", "text changed"); // auto postback textbox, CausesValidation=true - $this->verifyNotVisible('ctl0_body_ctl7'); - $this->type("ctl0\$body\$TextBox3", "test"); + $this->assertNotVisible('ctl0_body_ctl7'); + $this->typeSpecial("ctl0\$body\$TextBox3", "test"); // $this->pause(1000); - $this->verifyVisible('ctl0_body_ctl7'); - $this->typeAndWait("ctl0\$body\$TextBox3", "non test"); - $this->verifyNotVisible('ctl0_body_ctl7'); + $this->assertVisible('ctl0_body_ctl7'); + $this->typeSpecial("ctl0\$body\$TextBox3", "non test"); + $this->assertNotVisible('ctl0_body_ctl7'); // submitting textbox with a button $this->type("ctl0\$body\$TextBox1", "texttext"); - $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); - $this->verifyValue("ctl0\$body\$TextBox1", "You just entered 'texttext'."); + $this->byXPath("//input[@type='submit' and @value='Submit']")->click(); + $this->assertValue("ctl0\$body\$TextBox1", "You just entered 'texttext'."); // SafeText - $this->verifyText("ctl0_body_Output","test"); - $this->typeAndWait("ctl0\$body\$TextBox2","malicious code"); - $this->verifyText("ctl0_body_Output","malicious code"); + $this->assertText("ctl0_body_Output","test"); + $this->typeSpecial("ctl0\$body\$TextBox2","malicious code"); + $this->assertText("ctl0_body_Output","malicious code"); // password - $this->verifyAttribute("ctl0\$body\$ctl9@type","password"); + $this->assertAttribute("ctl0\$body\$ctl9@type","password"); // ------------------multiline textbox---------------------- @@ -64,28 +64,28 @@ function test () "); // a disabled multiline textbox - $this->verifyAttribute("ctl0\$body\$ctl12@disabled","regexp:true|disabled"); + $this->assertAttribute("ctl0\$body\$ctl12@disabled","regexp:true|disabled"); // a read-only multiline textbox - $this->verifyAttribute("ctl0\$body\$ctl13@readonly","regexp:true|readonly"); - $this->verifyAttribute("ctl0\$body\$ctl13@wrap","off"); + $this->assertAttribute("ctl0\$body\$ctl13@readonly","regexp:true|readonly"); + $this->assertAttribute("ctl0\$body\$ctl13@wrap","off"); // auto postback textbox - $this->verifyValue("ctl0\$body\$ctl14", "change me"); - $this->typeAndWait("ctl0\$body\$ctl14", "change mes"); - $this->verifyValue("ctl0\$body\$ctl14", "text changed"); - $this->verifyValue("ctl0\$body\$ctl10", "This is a\nmultiline\ntextbox."); - $this->verifyValue("ctl0\$body\$ctl11", "This is a multiline text box. + $this->assertValue("ctl0\$body\$ctl14", "change me"); + $this->typeSpecial("ctl0\$body\$ctl14", "change mes"); + $this->assertValue("ctl0\$body\$ctl14", "text changed"); + $this->assertValue("ctl0\$body\$ctl10", "This is a\nmultiline\ntextbox."); + $this->assertValue("ctl0\$body\$ctl11", "This is a multiline text box. In HTML, it is displayed as a textarea. End of message "); // textbox associated with a validator - $this->verifyNotVisible('ctl0_body_ctl15'); - $this->type("ctl0\$body\$MultiTextBox3", "demo"); + $this->assertNotVisible('ctl0_body_ctl15'); + $this->typeSpecial("ctl0\$body\$MultiTextBox3", "demo"); // $this->pause(1000); - $this->verifyVisible('ctl0_body_ctl15'); - $this->typeAndWait("ctl0\$body\$MultiTextBox3", "non demo"); - $this->verifyNotVisible('ctl0_body_ctl15'); + $this->assertVisible('ctl0_body_ctl15'); + $this->typeSpecial("ctl0\$body\$MultiTextBox3", "non demo"); + $this->assertNotVisible('ctl0_body_ctl15'); } } diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php index 5e7018c4d..7ac553499 100755 --- a/tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/Wizard1TestCase.php @@ -1,24 +1,24 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample1&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample1&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); // step 1 - $this->verifyTextPresent('Wizard Step 1'); - $this->verifyTextNotPresent('Wizard Step 2'); - $this->verifyVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton'); - $this->verifyAttribute('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton@disabled','regexp:true|disabled'); - $this->select('ctl0$body$Wizard1$DropDownList1', "label=Purple"); - $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl1'); + $this->assertContains('Wizard Step 1', $this->source()); + $this->assertNotContains('Wizard Step 2', $this->source()); + $this->assertVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton'); + $this->assertAttribute('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton@disabled','regexp:true|disabled'); + $this->select('ctl0$body$Wizard1$DropDownList1', "Purple"); + $this->byName('ctl0$body$Wizard1$ctl6$ctl1')->click(); // step 2 - $this->verifyTextPresent('Your favorite color is: Purple'); - $this->verifyTextNotPresent('Wizard Step 1'); - $this->verifyTextPresent('Wizard Step 2'); + $this->assertContains('Your favorite color is: Purple', $this->source()); + $this->assertNotContains('Wizard Step 1', $this->source()); + $this->assertContains('Wizard Step 2', $this->source()); } } diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php index a77280ffa..85ef86552 100755 --- a/tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/Wizard2TestCase.php @@ -1,24 +1,24 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample2&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample2&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); // step 1 - $this->verifyTextPresent('Please let us know your preference'); - $this->verifyTextNotPresent('Thank you for your answer'); - $this->verifyVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton'); - $this->verifyAttribute('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton@disabled','regexp:true|disabled'); - $this->select('ctl0$body$Wizard1$DropDownList1', "label=Blue"); - $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl1'); + $this->assertContains('Please let us know your preference', $this->source()); + $this->assertNotContains('Thank you for your answer', $this->source()); + $this->assertVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton'); + $this->assertAttribute('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton@disabled','regexp:true|disabled'); + $this->select('ctl0$body$Wizard1$DropDownList1', "Blue"); + $this->byName('ctl0$body$Wizard1$ctl6$ctl1')->click(); // step 2 - $this->verifyTextPresent('Your favorite color is: Blue'); - $this->verifyTextNotPresent('Please let us know your preference'); - $this->verifyTextPresent('Thank you for your answer'); + $this->assertContains('Your favorite color is: Blue', $this->source()); + $this->assertNotContains('Please let us know your preference', $this->source()); + $this->assertContains('Thank you for your answer', $this->source()); } } diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php index ec0efe905..2568f2338 100755 --- a/tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/Wizard3TestCase.php @@ -1,44 +1,44 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample3&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample3&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); // step 1 - $this->verifyTextPresent('A Mini Survey'); - $this->verifyTextPresent('PRADO QuickStart Sample'); - $this->click('ctl0_body_Wizard3_StudentCheckBox'); - $this->clickAndWait('ctl0$body$Wizard3$ctl4$ctl0'); + $this->assertContains('A Mini Survey', $this->source()); + $this->assertContains('PRADO QuickStart Sample', $this->source()); + $this->byId('ctl0_body_Wizard3_StudentCheckBox')->click(); + $this->byName('ctl0$body$Wizard3$ctl4$ctl0')->click(); // step 2 - $this->select('ctl0$body$Wizard3$DropDownList11', "label=Chemistry"); - $this->clickAndWait('ctl0$body$Wizard3$ctl5$ctl1'); + $this->select('ctl0$body$Wizard3$DropDownList11', "Chemistry"); + $this->byName('ctl0$body$Wizard3$ctl5$ctl1')->click(); // step 3 - $this->select('ctl0$body$Wizard3$DropDownList22', "label=Tennis"); - $this->clickAndWait('ctl0$body$Wizard3$ctl6$ctl1'); + $this->select('ctl0$body$Wizard3$DropDownList22', "Tennis"); + $this->byName('ctl0$body$Wizard3$ctl6$ctl1')->click(); // step 4 - $this->verifyTextPresent('You are a college student'); - $this->verifyTextPresent('You are in major: Chemistry'); - $this->verifyTextPresent('Your favorite sport is: Tennis'); + $this->assertContains('You are a college student', $this->source()); + $this->assertContains('You are in major: Chemistry', $this->source()); + $this->assertContains('Your favorite sport is: Tennis', $this->source()); // run the example again. this time we skip the page asking about major - $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample3&notheme=true", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample3&notheme=true"); // step 1 - $this->clickAndWait('ctl0$body$Wizard3$ctl4$ctl0'); + $this->byName('ctl0$body$Wizard3$ctl4$ctl0')->click(); // step 3 - $this->select('ctl0$body$Wizard3$DropDownList22', "label=Baseball"); - $this->clickAndWait('ctl0$body$Wizard3$ctl6$ctl1'); + $this->select('ctl0$body$Wizard3$DropDownList22', "Baseball"); + $this->byName('ctl0$body$Wizard3$ctl6$ctl1')->click(); // step 4 - $this->verifyTextNotPresent('You are a college student'); - $this->verifyTextPresent('Your favorite sport is: Baseball'); + $this->assertNotContains('You are a college student', $this->source()); + $this->assertContains('Your favorite sport is: Baseball', $this->source()); } } diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php index f2b8ad6e8..41d3463eb 100755 --- a/tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/Wizard4TestCase.php @@ -1,42 +1,42 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample4&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample4&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); // step 1 - $this->verifyTextPresent('Step 1 of 3'); - $this->select('ctl0_body_Wizard1_DropDownList1', "label=Cyan"); - $this->clickAndWait('ctl0_body_Wizard1_SideBarList_ctl2_SideBarButton'); + $this->assertContains('Step 1 of 3', $this->source()); + $this->select('ctl0_body_Wizard1_DropDownList1', "Cyan"); + $this->byId('ctl0_body_Wizard1_SideBarList_ctl2_SideBarButton')->click(); // step 3 - $this->verifyTextPresent('Step 3 of 3'); - $this->verifyTextPresent('Thank you for completing this survey.'); - $this->clickAndWait('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton'); + $this->assertContains('Step 3 of 3', $this->source()); + $this->assertContains('Thank you for completing this survey.', $this->source()); + $this->byId('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton')->click(); // step 1 $this->assertSelected('ctl0_body_Wizard1_DropDownList1', "Cyan"); - $this->select('ctl0_body_Wizard1_DropDownList1', "label=Black"); - $this->clickAndWait('ctl0_body_Wizard1_ctl4_ctl0'); + $this->select('ctl0_body_Wizard1_DropDownList1', "Black"); + $this->byId('ctl0_body_Wizard1_ctl4_ctl0')->click(); // step 2 - $this->verifyTextPresent('Step 2 of 3'); - $this->verifyTextPresent('Your favorite color is: Black'); - $this->clickAndWait('ctl0_body_Wizard1_ctl5_ctl0'); + $this->assertContains('Step 2 of 3', $this->source()); + $this->assertContains('Your favorite color is: Black', $this->source()); + $this->byId('ctl0_body_Wizard1_ctl5_ctl0')->click(); // step 1 - $this->verifyTextPresent('Step 1 of 3'); + $this->assertContains('Step 1 of 3', $this->source()); $this->assertSelected('ctl0_body_Wizard1_DropDownList1', "Black"); - $this->clickAndWait('ctl0_body_Wizard1_ctl4_ctl0'); + $this->byId('ctl0_body_Wizard1_ctl4_ctl0')->click(); // step 2 - $this->clickAndWait('ctl0_body_Wizard1_ctl5_ctl1'); + $this->byId('ctl0_body_Wizard1_ctl5_ctl1')->click(); // step 3 - $this->verifyTextPresent('Step 3 of 3'); + $this->assertContains('Step 3 of 3', $this->source()); } } diff --git a/tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php b/tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php index eb5edb3b7..4c41a0741 100755 --- a/tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/Wizard5TestCase.php @@ -1,35 +1,35 @@ open("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample5&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TWizard.Sample5&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); // step 1 - $this->verifyTextPresent('Please let us know your preference'); - $this->verifyVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton'); - $this->verifyVisible('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton'); - $this->verifyAttribute('ctl0_body_Wizard1_SideBarList_ctl2_SideBarButton@disabled','regexp:true|disabled'); - $this->select('ctl0_body_Wizard1_DropDownList1', "label=Cyan"); - $this->clickAndWait('ctl0$body$Wizard1$ctl4$ctl0'); + $this->assertContains('Please let us know your preference', $this->source()); + $this->assertVisible('ctl0_body_Wizard1_SideBarList_ctl0_SideBarButton'); + $this->assertVisible('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton'); + $this->assertAttribute('ctl0_body_Wizard1_SideBarList_ctl2_SideBarButton@disabled','regexp:true|disabled'); + $this->select('ctl0_body_Wizard1_DropDownList1', "Cyan"); + $this->byName('ctl0$body$Wizard1$ctl4$ctl0')->click(); // step 2 - $this->select('ctl0_body_Wizard1_Step2_DropDownList2','label=Football'); - $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl0'); + $this->select('ctl0_body_Wizard1_Step2_DropDownList2','Football'); + $this->byName('ctl0$body$Wizard1$ctl6$ctl0')->click(); // step 1 $this->assertSelected('ctl0_body_Wizard1_DropDownList1','Cyan'); - $this->clickAndWait('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton'); + $this->byId('ctl0_body_Wizard1_SideBarList_ctl1_SideBarButton')->click(); // step 2 $this->assertSelected('ctl0_body_Wizard1_Step2_DropDownList2','Football'); - $this->clickAndWait('ctl0$body$Wizard1$ctl6$ctl1'); + $this->byName('ctl0$body$Wizard1$ctl6$ctl1')->click(); // step 3 - $this->verifyTextPresent('Your favorite color is: Cyan'); - $this->verifyTextPresent('Your favorite sport is: Football'); + $this->assertContains('Your favorite color is: Cyan', $this->source()); + $this->assertContains('Your favorite sport is: Football', $this->source()); } } diff --git a/tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php b/tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php index 3d531b47d..8f5557ca9 100755 --- a/tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php +++ b/tests/FunctionalTests/quickstart/Fundamentals/HangmanTestCase.php @@ -1,32 +1,32 @@ open("../../demos/quickstart/index.php?page=Fundamentals.Samples.Hangman.Home&notheme=true&lang=en", ""); - $this->verifyTitle("Hangman Game", ""); - $this->verifyTextPresent("Medium game; you are allowed 5 misses.", ""); - $this->clickAndWait("//input[@type='submit' and @value='Play!']", ""); - $this->verifyTextPresent("You must choose a difficulty level", ""); - $this->clickAndWait("//input[@type='submit' and @value='Play!']", ""); - $this->click("//input[@name='ctl0\$body\$LevelSelection' and @value='3']", ""); - $this->clickAndWait("//input[@type='submit' and @value='Play!']", ""); - $this->verifyTextPresent("Please make a guess", ""); - $this->verifyTextPresent("maximum of 3", ""); - $this->clickAndWait("link=B", ""); - $this->clickAndWait("link=F", ""); - $this->clickAndWait("link=Give up?", ""); - $this->verifyTextPresent("You Lose", ""); - $this->clickAndWait("link=Start Again", ""); - $this->clickAndWait("//input[@type='submit' and @value='Play!']", ""); - $this->verifyTextPresent("Please make a guess", ""); - $this->verifyTextPresent("maximum of 3", ""); - $this->clickAndWait("link=Give up?", ""); - $this->verifyTextPresent("You Lose", ""); - $this->clickAndWait("link=Start Again", ""); - $this->click("//input[@name='ctl0\$body\$LevelSelection' and @value='5']", ""); - $this->clickAndWait("//input[@type='submit' and @value='Play!']", ""); - $this->verifyTextPresent("maximum of 5", ""); + $this->url("../../demos/quickstart/index.php?page=Fundamentals.Samples.Hangman.Home&notheme=true&lang=en"); + $this->assertEquals("Hangman Game", $this->title()); + $this->assertContains("Medium game; you are allowed 5 misses.", $this->source()); + $this->byXPath("//input[@type='submit' and @value='Play!']")->click(); + $this->assertContains("You must choose a difficulty level", $this->source()); + $this->byXPath("//input[@type='submit' and @value='Play!']")->click(); + $this->byXPath("//input[@name='ctl0\$body\$LevelSelection' and @value='3']")->click(); + $this->byXPath("//input[@type='submit' and @value='Play!']")->click(); + $this->assertContains("Please make a guess", $this->source()); + $this->assertContains("maximum of 3", $this->source()); + $this->byLinkText("B")->click(); + $this->byLinkText("F")->click(); + $this->byLinkText("Give up?")->click(); + $this->assertContains("You Lose", $this->source()); + $this->byLinkText("Start Again")->click(); + $this->byXPath("//input[@type='submit' and @value='Play!']")->click(); + $this->assertContains("Please make a guess", $this->source()); + $this->assertContains("maximum of 3", $this->source()); + $this->byLinkText("Give up?")->click(); + $this->assertContains("You Lose", $this->source()); + $this->byLinkText("Start Again")->click(); + $this->byXPath("//input[@name='ctl0\$body\$LevelSelection' and @value='5']")->click(); + $this->byXPath("//input[@type='submit' and @value='Play!']")->click(); + $this->assertContains("maximum of 5", $this->source()); } } diff --git a/tests/FunctionalTests/tickets/protected/controls/ToggleImageButton.php b/tests/FunctionalTests/tickets/protected/controls/ToggleImageButton.php index 9aecda84f..0165edac6 100755 --- a/tests/FunctionalTests/tickets/protected/controls/ToggleImageButton.php +++ b/tests/FunctionalTests/tickets/protected/controls/ToggleImageButton.php @@ -6,7 +6,6 @@ * @author Christophe BOULAIN (Christophe.Boulain@ceram.fr) * @copyright Copyright © 2007, CERAM Sophia Antipolis * @license url nameoflicense - * @version $Id: ToggleImageButton.php 2043 2007-06-30 15:07:50Z xue $ * */ diff --git a/tests/FunctionalTests/tickets/protected/pages/ExtendedToggleImageButton.php b/tests/FunctionalTests/tickets/protected/pages/ExtendedToggleImageButton.php index 934efcefb..7bc53ba3d 100755 --- a/tests/FunctionalTests/tickets/protected/pages/ExtendedToggleImageButton.php +++ b/tests/FunctionalTests/tickets/protected/pages/ExtendedToggleImageButton.php @@ -1,16 +1,15 @@ - + @@ -30,7 +30,6 @@
-
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket220.page b/tests/FunctionalTests/tickets/protected/pages/Ticket220.page index e4c8fa956..395657ecb 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket220.page +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket220.page @@ -21,10 +21,10 @@ { element = $("<%= $this->label1->ClientID %>"); if(element) - element.innerHTML = "Label 1: "+inspect(ClientScriptInfo); + element.innerHTML = "Label 1: "+ClientScriptInfo.join('; '); else alert("failed"); }); - \ No newline at end of file + diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket290.page b/tests/FunctionalTests/tickets/protected/pages/Ticket290.page index e9d40b92f..3d4bf6477 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket290.page +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket290.page @@ -1,18 +1,17 @@ -

Needs manual testing

- + - - - diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket586.page b/tests/FunctionalTests/tickets/protected/pages/Ticket586.page index 29751cab8..31bc72378 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket586.page +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket586.page @@ -1,5 +1,4 @@ -

Needs manual testing

diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.tpl b/tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.tpl index bf2f8fab1..b245a50d7 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.tpl +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.tpl @@ -1,7 +1,7 @@ - - + @@ -30,7 +30,6 @@
-
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket659.php b/tests/FunctionalTests/tickets/protected/pages/Ticket659.php index cb266fd77..85b87d555 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket659.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket659.php @@ -1,12 +1,11 @@ isPostBack && !$this->isCallback) { - $this->refreshLog(); + $this->clearLog(null, null); } } - + public function refreshLog () { $this->logBox->Text=file_get_contents(prado::getPathOfNameSpace('Ticket703.Logs.LogFile', '.txt')); } - + public function clearLog ($sender, $param) { $file=prado::getPathOfNameSpace('Ticket703.Logs.LogFile', '.txt'); file_put_contents($file, ''); $this->refreshLog(); } - + public function addLog($sender,$param) { - prado::log($this->logMessage->getText(), TLogger::DEBUG, "Tickets"); + prado::log($this->logMessage->getText(), TLogger::DEBUG, "Tickets"); } } \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket719.page b/tests/FunctionalTests/tickets/protected/pages/Ticket719.page index b36d2d664..3f2bc17b5 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket719.page +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket719.page @@ -1,5 +1,4 @@ -

Needs manual testing