diff options
Diffstat (limited to 'framework/Web/UI/ActiveControls')
42 files changed, 694 insertions, 300 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveButton.php b/framework/Web/UI/ActiveControls/TActiveButton.php index 16ba5339..697e96f1 100644 --- a/framework/Web/UI/ActiveControls/TActiveButton.php +++ b/framework/Web/UI/ActiveControls/TActiveButton.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActiveButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -29,7 +28,6 @@ Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter'); * will update the button's caption upon callback response completion. * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> - * @version $Id: TActiveButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -63,7 +61,7 @@ class TActiveButton extends TButton implements ICallbackEventHandler, IActiveCon } /** - * Raises the callback event. This method is required by + * Raises the callback event. This method is required by * {@link ICallbackEventHandler} interface. If {@link getCausesValidation CausesValidation} * is true, it will invoke the page's {@link TPage::validate validate} * method first. It will raise {@link onClick OnClick} event first diff --git a/framework/Web/UI/ActiveControls/TActiveCheckBox.php b/framework/Web/UI/ActiveControls/TActiveCheckBox.php index 6221150d..b5d7393c 100644 --- a/framework/Web/UI/ActiveControls/TActiveCheckBox.php +++ b/framework/Web/UI/ActiveControls/TActiveCheckBox.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActiveCheckBox.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -26,7 +25,6 @@ Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter'); * changed during a callback. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: TActiveCheckBox.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -121,9 +119,9 @@ class TActiveCheckBox extends TCheckBox implements ICallbackEventHandler, IActiv /** * 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 - * + * * @param THtmlWriter the writer for the rendering purpose * @param string checkbox id * @param string onclick js diff --git a/framework/Web/UI/ActiveControls/TActiveCheckBoxList.php b/framework/Web/UI/ActiveControls/TActiveCheckBoxList.php index a42044fb..ea174c94 100644 --- a/framework/Web/UI/ActiveControls/TActiveCheckBoxList.php +++ b/framework/Web/UI/ActiveControls/TActiveCheckBoxList.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActiveCheckBoxList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -30,7 +29,6 @@ Prado::using('System.Web.UI.ActiveControls.TActiveListControlAdapter'); * List items can not be changed dynamically during a callback request. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: TActiveCheckBoxList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -78,7 +76,7 @@ class TActiveCheckBoxList extends TCheckBoxList implements IActiveControl, ICall */ protected function createRepeatedControl() { - $control = new TActiveCheckBox; + $control = new TActiveCheckBoxListItem; $control->getAdapter()->setBaseActiveControl($this->getActiveControl()); return $control; } @@ -117,5 +115,29 @@ class TActiveCheckBoxList extends TCheckBoxList implements IActiveControl, ICall $this->getClientClassName(), $this->getPostBackOptions()); } + /** + * Gets the name of the javascript class responsible for performing postback for this control. + * This method overrides the parent implementation. + * @return string the javascript class name + */ + protected function getClientClassName() + { + return 'Prado.WebUI.TActiveCheckBoxList'; + } +} + +class TActiveCheckBoxListItem extends TActiveCheckBox +{ + /** + * Override client implementation to avoid emitting the javascript + * + * @param THtmlWriter the writer for the rendering purpose + * @param string checkbox id + * @param string onclick js + */ + protected function renderInputTag($writer,$clientID,$onclick) + { + TCheckBox::renderInputTag($writer,$clientID,$onclick); + } } diff --git a/framework/Web/UI/ActiveControls/TActiveClientScript.php b/framework/Web/UI/ActiveControls/TActiveClientScript.php index 8fce726a..4443ea30 100755 --- a/framework/Web/UI/ActiveControls/TActiveClientScript.php +++ b/framework/Web/UI/ActiveControls/TActiveClientScript.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActiveClientScript.php 3144 2012-05-19 10:07:03Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -15,13 +14,13 @@ * * This is the active counterpart of the {@link TClientScript} class. * - * TActiveClientScript has the ability to render itself on ajax + * TActiveClientScript has the ability to render itself on ajax * callbacks. This means that every variable or function declared in javascript * code will be available to the page. * * Beware that when rendered on normal (postback) or ajax callbacks, some - * javascript code won't behave in the same way. - * When rendered as part of a normal/postback response, scripts will execute instantly + * javascript code won't behave in the same way. + * When rendered as part of a normal/postback response, scripts will execute instantly * where they are in the page and in a synchronous fashion. * Instead, when they are rendered as part of a callback response, * they will be executed when all DOM modifications are complete and any dynamic @@ -30,7 +29,6 @@ * This can potentially hurt compatibility and graceful fallback. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: TActiveClientScript.php 3144 2012-05-19 10:07:03Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.2 */ diff --git a/framework/Web/UI/ActiveControls/TActiveControlAdapter.php b/framework/Web/UI/ActiveControls/TActiveControlAdapter.php index 6c209ac5..bf1bc9f5 100644 --- a/framework/Web/UI/ActiveControls/TActiveControlAdapter.php +++ b/framework/Web/UI/ActiveControls/TActiveControlAdapter.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActiveControlAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -29,7 +28,6 @@ Prado::using('System.Web.UI.ActiveControls.TBaseActiveControl'); * corresponding client-side properties. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: TActiveControlAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -177,7 +175,6 @@ class TActiveControlAdapter extends TControlAdapter * Tracking changes to the page state during callback. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: TActiveControlAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -367,7 +364,6 @@ class TCallbackPageStateTracker * Calculates the viewstate changes during the request. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: TActiveControlAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -411,7 +407,6 @@ abstract class TViewStateDiff * Calculate the changes to a scalar value. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: TActiveControlAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -436,7 +431,6 @@ class TScalarDiff extends TViewStateDiff * Calculates the changes to the Style properties. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: TActiveControlAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -528,7 +522,6 @@ class TStyleDiff extends TViewStateDiff * Calculate the changes to attributes collection. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: TActiveControlAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TActiveCustomValidator.php b/framework/Web/UI/ActiveControls/TActiveCustomValidator.php index cc2a54a1..f05704fc 100644 --- a/framework/Web/UI/ActiveControls/TActiveCustomValidator.php +++ b/framework/Web/UI/ActiveControls/TActiveCustomValidator.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActiveCustomValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -28,7 +27,6 @@ Prado::using('System.Web.UI.ActiveControls.TCallbackClientSide'); * will be true when validation is made during a callback request. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: TActiveCustomValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -186,7 +184,6 @@ class TActiveCustomValidator extends TCustomValidator * Custom Validator callback client side options class. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: TActiveCustomValidator.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TActiveDataGrid.php b/framework/Web/UI/ActiveControls/TActiveDataGrid.php index 00c9cb49..d5084e2d 100644 --- a/framework/Web/UI/ActiveControls/TActiveDataGrid.php +++ b/framework/Web/UI/ActiveControls/TActiveDataGrid.php @@ -107,7 +107,7 @@ class TActiveDataGrid extends TDataGrid implements IActiveControl, ISurroundable * If it is enabled (clickable), its command name and parameter will also be set. * It overrides the datagrid's original method to create active controls instead, thus * the pager will do callbacks instead of the regular postbacks. - * @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 @@ -786,7 +786,6 @@ class TActiveLiteralColumn extends TLiteralColumn { * TActiveDataGridPager represents a pager in an activedatagrid. * * @author Fabio Bas <ctrlaltca@gmail.com> - * @version $Id: TDataGrid.php 3057 2011-11-09 12:35:57Z ctrlaltca@gmail.com $ * @package System.Web.UI.ActiveControls * @since 3.2.1 */ @@ -813,7 +812,6 @@ class TActiveDataGridPager extends TDataGridPager * The {@link getPager Pager} property indicates the datagrid pager related with the event. * * @author Fabio Bas <ctrlaltca@gmail.com> - * @version $Id: TActiveDataGrid.php 3057 2011-11-09 12:35:57Z ctrlaltca@gmail.com $ * @package System.Web.UI.ActiveControls * @since 3.2.1 */ diff --git a/framework/Web/UI/ActiveControls/TActiveDataList.php b/framework/Web/UI/ActiveControls/TActiveDataList.php index dbf70067..6b749b40 100644 --- a/framework/Web/UI/ActiveControls/TActiveDataList.php +++ b/framework/Web/UI/ActiveControls/TActiveDataList.php @@ -1,12 +1,11 @@ <?php /** * TActiveDataList class file - * + * * @author Marcos Aurelio Nobre <marconobre@gmail.com> * @copyright Copyright © 2008, PradoSoft * @license http://www.pradosoft.com/license * @package System.Web.UI.ActiveControls - * @version $Id: TActiveDataList.php 2706 2009-09-24 14:42:30Z rojaro $ */ /** @@ -14,7 +13,7 @@ * * TActiveDataList represents a data bound and updatable grid control which is the * active counterpart to the original {@link TDataList} control. - * + * * This component can be used in the same way as the regular datalist, the only * difference is that the active datalist uses callbacks instead of postbacks * for interaction. @@ -25,10 +24,10 @@ * @package System.Web.UI.ActiveControls */ class TActiveDataList extends TDataList implements IActiveControl { - + /** * Creates a new callback control, sets the adapter to - * TActiveControlAdapter. + * TActiveControlAdapter. */ public function __construct() { @@ -43,7 +42,7 @@ class TActiveDataList extends TDataList implements IActiveControl { { return $this->getAdapter()->getBaseActiveControl(); } - + /** * Sets the data source object associated with the repeater control. * In addition, the render method of all connected pagers is called so they @@ -59,7 +58,7 @@ class TActiveDataList extends TDataList implements IActiveControl { $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); } } - + /** * Returns the id of the surrounding container (span). * @return string container id @@ -68,7 +67,7 @@ class TActiveDataList extends TDataList implements IActiveControl { { return $this->ClientID.'_Container'; } - + /** * Renders the repeater. * If the repeater did not pass the prerender phase yet, it will register itself for rendering later. @@ -85,10 +84,10 @@ class TActiveDataList extends TDataList implements IActiveControl { $this->getPage()->getAdapter()->registerControlToRender($this,$writer); } } - + /** * Loops through all {@link TActivePager} on the page and registers the ones which are set to paginate - * the repeater for rendering. This is to ensure that the connected pagers are also rendered if the + * the repeater for rendering. This is to ensure that the connected pagers are also rendered if the * data source changed. */ private function renderPager() @@ -102,7 +101,7 @@ class TActiveDataList extends TDataList implements IActiveControl { } } } - + /** * Renders the repeater by writing a span tag with the container id obtained from {@link getContainerID()} * which will be called by the replacement method of the client script to update it's content. diff --git a/framework/Web/UI/ActiveControls/TActiveDatePicker.php b/framework/Web/UI/ActiveControls/TActiveDatePicker.php index 279739a8..ad363d9c 100755 --- a/framework/Web/UI/ActiveControls/TActiveDatePicker.php +++ b/framework/Web/UI/ActiveControls/TActiveDatePicker.php @@ -1,13 +1,12 @@ <?php /** * TActiveDatePicker class file - * + * * @author Bradley Booms <Bradley.Booms@nsighttel.com> * @author 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: TActiveDatePicker.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -18,20 +17,19 @@ Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter'); /** * TActiveDatePicker class - * + * * The active control counter part to date picker control. * When the date selection is changed, the {@link onCallback OnCallback} event is * raised. - * + * * @author Bradley Booms <Bradley.Booms@nsighttel.com> * @author Christophe Boulain <Christophe.Boulain@gmail.com> - * @version $Id: TActiveDatePicker.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1.3 */ class TActiveDatePicker extends TDatePicker implements ICallbackEventHandler, IActiveControl { - + /** * @return boolean a value indicating whether an automatic postback to the server * will occur whenever the user modifies the text in the TActiveDatePicker control and @@ -67,7 +65,7 @@ class TActiveDatePicker extends TDatePicker implements ICallbackEventHandler, I $options['AutoPostBack'] = $this->getAutoPostBack(); return $options; } - + /** * Creates a new callback control, sets the adapter to * TActiveControlAdapter. If you override this class, be sure to set the @@ -78,7 +76,7 @@ class TActiveDatePicker extends TDatePicker implements ICallbackEventHandler, I parent::__construct(); $this->setAdapter(new TActiveControlAdapter($this)); } - + /** * @return TBaseActiveCallbackControl standard callback control options. */ @@ -103,21 +101,21 @@ class TActiveDatePicker extends TDatePicker implements ICallbackEventHandler, I $cb->select($id.TControl::CLIENT_ID_SEPARATOR.'day', 'Value', $date['mday'], 'select'); $cb->select($id.TControl::CLIENT_ID_SEPARATOR.'month', 'Value', $date['mon']-1, 'select'); $cb->select($id.TControl::CLIENT_ID_SEPARATOR.'year', 'Value', $date['year'], 'select'); - + } } } - + /** * 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); - } - + } + /** * This method is invoked when a callback is requested. The method raises * 'OnCallback' event to fire up the event handlers. If you override this @@ -128,7 +126,7 @@ class TActiveDatePicker extends TDatePicker implements ICallbackEventHandler, I public function onCallback($param){ $this->raiseEvent('OnCallback', $this, $param); } - + /** * Registers the javascript code to initialize the date picker. */ @@ -174,9 +172,8 @@ class TActiveDatePicker extends TDatePicker implements ICallbackEventHandler, I * is changed. * The formatted date according to {@link TDatePicker::getDateFormat DateFormat} is sent * as parameter to this event - * + * * @author Fabio Bas <ctrlaltca[at]gmail[dot]com> - * @version $Id: TActiveDatePicker.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.2.1 */ diff --git a/framework/Web/UI/ActiveControls/TActiveDropDownList.php b/framework/Web/UI/ActiveControls/TActiveDropDownList.php index f0f8bba2..0de95078 100644 --- a/framework/Web/UI/ActiveControls/TActiveDropDownList.php +++ b/framework/Web/UI/ActiveControls/TActiveDropDownList.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActiveDropDownList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -31,7 +30,6 @@ Prado::using('System.Web.UI.ActiveControls.TActiveListControlAdapter'); * List items can be changed dynamically during a callback request. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: TActiveDropDownList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ diff --git a/framework/Web/UI/ActiveControls/TActiveFileUpload.php b/framework/Web/UI/ActiveControls/TActiveFileUpload.php index 10aa2ed3..61bf7816 100755 --- a/framework/Web/UI/ActiveControls/TActiveFileUpload.php +++ b/framework/Web/UI/ActiveControls/TActiveFileUpload.php @@ -1,11 +1,10 @@ <?php /** * TActiveFileUpload.php - * + * * @author Bradley Booms <Bradley.Booms@nsighttel.com> * @author Christophe Boulain <Christophe.Boulain@gmail.com> * @author Gabor Berczi <gabor.berczi@devworx.hu> (issue 349 remote vulnerability fix) - * @version $Id: TActiveFileUpload.php 3232 2013-01-02 14:42:24Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -17,7 +16,7 @@ Prado::using('System.Web.UI.WebControls.TFileUpload'); /** * TActiveFileUpload - * + * * TActiveFileUpload displays a file upload field on a page. Upon postback, * the text entered into the field will be treated as the name of the file * that will be uploaded to the server. The property {@link getHasFile HasFile} @@ -31,22 +30,21 @@ Prado::using('System.Web.UI.WebControls.TFileUpload'); * * TActiveFileUpload raises {@link onFileUpload OnFileUpload} event if a file is uploaded * (whether it succeeds or not). - * + * * TActiveFileUpload actually does a postback in a hidden IFrame, and then does a callback. * This callback then raises the {@link onFileUpload OnFileUpload} event. After the postback * a status icon is displayed; either a green checkmark if the upload is successful, * or a red x if there was an error. - * + * * @author Bradley Booms <Bradley.Booms@nsighttel.com> * @author Christophe Boulain <Christophe.Boulain@gmail.com> - * @version $Id: TActiveFileUpload.php 3232 2013-01-02 14:42:24Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ -class TActiveFileUpload extends TFileUpload implements IActiveControl, ICallbackEventHandler, INamingContainer +class TActiveFileUpload extends TFileUpload implements IActiveControl, ICallbackEventHandler, INamingContainer { - + const SCRIPT_PATH = 'prado/activefileupload'; - + /** * @var THiddenField a flag to tell which component is doing the callback. */ @@ -68,7 +66,7 @@ class TActiveFileUpload extends TFileUpload implements IActiveControl, ICallback */ private $_target; - + /** * Creates a new callback control, sets the adapter to * TActiveControlAdapter. If you override this class, be sure to set the @@ -78,8 +76,8 @@ class TActiveFileUpload extends TFileUpload implements IActiveControl, ICallback parent::__construct(); $this->setAdapter(new TActiveControlAdapter($this)); } - - + + /** * @param string asset file in the self::SCRIPT_PATH directory. * @return string asset file url. @@ -89,8 +87,8 @@ class TActiveFileUpload extends TFileUpload implements IActiveControl, ICallback $base = $this->getPage()->getClientScript()->getPradoScriptAssetUrl(); return $base.'/'.self::SCRIPT_PATH.'/'.$file; } - - + + /** * This method is invoked when a file is uploaded. * If you override this method, be sure to call the parent implementation to ensure @@ -103,10 +101,10 @@ class TActiveFileUpload extends TFileUpload implements IActiveControl, ICallback // save the file so that it will persist past the end of this return. $localName = str_replace('\\', '/', tempnam(Prado::getPathOfNamespace($this->getTempPath()),'')); parent::saveAs($localName); - + $filename=addslashes($this->getFileName()); - - + + $params = new TActiveFileUploadCallbackParams; $params->localName = $localName; $params->fileName = $filename; @@ -128,11 +126,11 @@ class TActiveFileUpload extends TFileUpload implements IActiveControl, ICallback parent.Prado.WebUI.TActiveFileUpload.onFileUpload(Options); </script> EOS; - + exit(); } } - + /** * @return string the path where the uploaded file will be stored temporarily, in namespace format * default "Application.runtime.*" @@ -140,7 +138,7 @@ EOS; 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 @@ EOS; 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 @@ EOS; 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 @@ EOS; 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 <b>OnFileUpload</b> 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 @@ EOS; { $this->onFileUpload($this->getPage()->getRequest()->itemAt('TActiveFileUpload_TargetId')); } - + protected function pushParamsAndGetToken(TActiveFileUploadCallbackParams $params) { if ($cache = Prado::getApplication()->getCache()) @@ -237,10 +235,10 @@ EOS; } 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 @@ EOS; 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 @@ EOS; $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 <<<EOS <script language="Javascript"> Options = new Object(); @@ -300,30 +298,30 @@ EOS; 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 @@ EOS; $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 @@ EOS; 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 @@ EOS; 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 @@ EOS; } /** - * @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 @@ EOS; /** * TActiveFileUploadCallbackParams is an internal class used by {@link TActiveFileUpload}. - * + * * @author Bradley Booms <Bradley.Booms@nsighttel.com> * @author Christophe Boulain <Christophe.Boulain@gmail.com> - * @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 0d4b3737..28be574a 100644 --- a/framework/Web/UI/ActiveControls/TActiveHiddenField.php +++ b/framework/Web/UI/ActiveControls/TActiveHiddenField.php @@ -4,7 +4,7 @@ * * @author Carl G. Mathisen <carlgmathisen@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$ * @package System.Web.UI.ActiveControls diff --git a/framework/Web/UI/ActiveControls/TActiveHyperLink.php b/framework/Web/UI/ActiveControls/TActiveHyperLink.php index 6ba8a801..13161eec 100644 --- a/framework/Web/UI/ActiveControls/TActiveHyperLink.php +++ b/framework/Web/UI/ActiveControls/TActiveHyperLink.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 <weizhuo[at]gmail[dot]com> - * @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 752c7a04..27ec337e 100644 --- a/framework/Web/UI/ActiveControls/TActiveImage.php +++ b/framework/Web/UI/ActiveControls/TActiveImage.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 <weizhuo[at]gmail[dot]com> - * @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 8fe5e33d..17068412 100644 --- a/framework/Web/UI/ActiveControls/TActiveImageButton.php +++ b/framework/Web/UI/ActiveControls/TActiveImageButton.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 <b>after</b> the {@link onClick OnClick} event. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @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 4fd19a56..0a20e2b0 100644 --- a/framework/Web/UI/ActiveControls/TActiveLabel.php +++ b/framework/Web/UI/ActiveControls/TActiveLabel.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @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 @@ Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter'); * the client-side "for" attribute on the label. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @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 d8a8ffcb..304d1cef 100644 --- a/framework/Web/UI/ActiveControls/TActiveLinkButton.php +++ b/framework/Web/UI/ActiveControls/TActiveLinkButton.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 @@ Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter'); * will update the link text upon callback response completion. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: TActiveLinkButton.php 3292 2013-05-31 08:51:42Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -145,7 +143,7 @@ class TActiveLinkButton extends TLinkButton implements IActiveControl, ICallback $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 913cdeda..efc9dfcc 100644 --- a/framework/Web/UI/ActiveControls/TActiveListBox.php +++ b/framework/Web/UI/ActiveControls/TActiveListBox.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 @@ Prado::using('System.Web.UI.ActiveControls.TActiveListControlAdapter'); * List items can be added dynamically during a callback request. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @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 e48b9364..ca88477d 100644 --- a/framework/Web/UI/ActiveControls/TActiveListControlAdapter.php +++ b/framework/Web/UI/ActiveControls/TActiveListControlAdapter.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 @@ Prado::using('System.Web.UI.WebControls.TListControl'); * during callback response. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: TActiveListControlAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -170,7 +168,6 @@ class TActiveListControlAdapter extends TActiveControlAdapter implements IListCo * repopulate the client-side options. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @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 c594ed42..bce3beb0 100644 --- a/framework/Web/UI/ActiveControls/TActivePageAdapter.php +++ b/framework/Web/UI/ActiveControls/TActivePageAdapter.php @@ -5,9 +5,8 @@ * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @author Gabor Berczi <gabor.berczi@devworx.hu> (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 @@ Prado::using('System.Web.UI.ActiveControls.TCallbackEventParameter'); * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @author Gabor Berczi <gabor.berczi@devworx.hu> (lazyload additions & progressive rendering) - * @version $Id: TActivePageAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -296,7 +294,7 @@ class TActivePageAdapter extends TControlAdapter } /** - * Gets callback parameter. JSON encoding is assumed. + * Gets callback parameter. * @return string postback event parameter */ public function getCallbackEventParameter() @@ -304,8 +302,7 @@ class TActivePageAdapter extends TControlAdapter 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 +337,6 @@ class TActivePageAdapter extends TControlAdapter * the error stack trace. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: TActivePageAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -406,7 +402,6 @@ class TCallbackErrorHandler extends TErrorHandler * TInvalidCallbackException class. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @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 7dcd3212..b49faa37 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 @@ Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter'); /** * 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 <b>after</b> 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 @@ class TActivePager extends TPager implements IActiveControl, ICallbackEventHandl parent::__construct(); $this->setAdapter(new TActiveControlAdapter($this)); } - + /** * @return TBaseActiveControl standard active control options. */ @@ -60,11 +58,11 @@ class TActivePager extends TPager implements IActiveControl, ICallbackEventHandl /** * 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 @@ class TActivePager extends TPager implements IActiveControl, ICallbackEventHandl { $this->raiseEvent('OnCallback', $this, $param); } - + /** * Builds a dropdown list pager * Override parent implementation to build Active dropdown lists. @@ -90,25 +88,25 @@ class TActivePager extends TPager implements IActiveControl, ICallbackEventHandl 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 @@ -144,28 +142,28 @@ class TActivePager extends TPager implements IActiveControl, ICallbackEventHandl 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->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 +179,14 @@ class TActivePager extends TPager implements IActiveControl, ICallbackEventHandl { $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 39636cad..4b00b013 100644 --- a/framework/Web/UI/ActiveControls/TActivePanel.php +++ b/framework/Web/UI/ActiveControls/TActivePanel.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 @@ Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter'); * </code> * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: TActivePanel.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -87,7 +85,7 @@ class TActivePanel extends TPanel implements IActiveControl 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 d192536a..46dbbaf7 100644 --- a/framework/Web/UI/ActiveControls/TActiveRadioButton.php +++ b/framework/Web/UI/ActiveControls/TActiveRadioButton.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 <weizhuo[at]gmail[dot]com> - * @version $Id: TActiveRadioButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -121,7 +119,7 @@ class TActiveRadioButton extends TRadioButton implements IActiveControl, ICallba * 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 3244ce11..84a71951 100644 --- a/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php +++ b/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 @@ Prado::using('System.Web.UI.ActiveControls.TActiveRadioButton'); * List items can not be changed dynamically during a callback request. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: TActiveRadioButtonList.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -79,7 +77,7 @@ class TActiveRadioButtonList extends TRadioButtonList implements IActiveControl, */ protected function createRepeatedControl() { - $control = new TActiveRadioButton; + $control = new TActiveRadioButtonItem; $control->getAdapter()->setBaseActiveControl($this->getActiveControl()); return $control; } @@ -117,5 +115,31 @@ class TActiveRadioButtonList extends TRadioButtonList implements IActiveControl, $this->getActiveControl()->registerCallbackClientScript( $this->getClientClassName(), $this->getPostBackOptions()); } + + /** + * Gets the name of the javascript class responsible for performing postback for this control. + * This method overrides the parent implementation. + * @return string the javascript class name + */ + protected function getClientClassName() + { + return 'Prado.WebUI.TActiveRadioButtonList'; + } + } + +class TActiveRadioButtonItem extends TActiveRadioButton +{ + /** + * Override client implementation to avoid emitting the javascript + * + * @param THtmlWriter the writer for the rendering purpose + * @param string checkbox id + * @param string onclick js + */ + protected function renderInputTag($writer,$clientID,$onclick) + { + TRadioButton::renderInputTag($writer,$clientID,$onclick); + } +}
\ No newline at end of file diff --git a/framework/Web/UI/ActiveControls/TActiveRatingList.php b/framework/Web/UI/ActiveControls/TActiveRatingList.php index 022efe65..2b1c764c 100644 --- a/framework/Web/UI/ActiveControls/TActiveRatingList.php +++ b/framework/Web/UI/ActiveControls/TActiveRatingList.php @@ -5,7 +5,7 @@ * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @author Bradley Booms <bradley[dot]booms[at]gmail[dot]com> * @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 @@ class TActiveRatingList extends TRatingList implements IActiveControl, ICallback 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 08e6f93a..08aeefab 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 <programmierung@landwehr-software.de> * @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 5f96ff29..1b8791fd 100644 --- a/framework/Web/UI/ActiveControls/TActiveTextBox.php +++ b/framework/Web/UI/ActiveControls/TActiveTextBox.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 @@ Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter'); * event. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @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 new file mode 100644 index 00000000..4ed0d34c --- /dev/null +++ b/framework/Web/UI/ActiveControls/TAutoComplete.php @@ -0,0 +1,438 @@ +<?php +/** + * TAutoComplete class file. + * + * @author Wei Zhuo <weizhuo[at]gamil[dot]com> + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2005-2014 PradoSoft + * @license http://www.pradosoft.com/license/ + * @package System.Web.UI.ActiveControls + */ + +/** + * Load active text box. + */ +Prado::using('System.Web.UI.ActiveControls.TActiveTextBox'); +Prado::using('System.Web.UI.ActiveControls.TCallbackEventParameter'); + +/** + * TAutoComplete class. + * + * TAutoComplete is a textbox that provides a list of suggestion on + * the current partial word typed in the textbox. The suggestions are + * requested using callbacks, and raises the {@link onSuggestion OnSuggestion} + * event. The events of the TActiveText (from which TAutoComplete is extended from) + * and {@link onSuggestion OnSuggestion} are mutually exculsive. That is, + * if {@link onTextChange OnTextChange} and/or {@link onCallback OnCallback} + * events are raise, then {@link onSuggestion OnSuggestion} will not be raise, and + * vice versa. + * + * The list of suggestions should be set in the {@link onSuggestion OnSuggestion} + * event handler. The partial word to match the suggestion is in the + * {@link TCallbackEventParameter::getCallbackParameter TCallbackEventParameter::CallbackParameter} + * property. The datasource of the TAutoComplete must be set using {@link setDataSource} + * method. This sets the datasource for the suggestions repeater, available through + * the {@link getSuggestions Suggestions} property. Header, footer templates and + * other properties of the repeater can be access via the {@link getSuggestions Suggestions} + * property and its sub-properties. + * + * The {@link setTextCssClass TextCssClass} property if set is used to find + * the element within the Suggestions.ItemTemplate and Suggestions.AlternatingItemTemplate + * that contains the actual text for the suggestion selected. That is, + * only text inside elements with CSS class name equal to {@link setTextCssClass TextCssClass} + * will be used as suggestions. + * + * To return the list of suggestions back to the browser, supply a non-empty data source + * and call databind. For example, + * <code> + * function autocomplete_suggestion($sender, $param) + * { + * $token = $param->getToken(); //the partial word to match + * $sender->setDataSource($this->getSuggestionsFor($token)); //set suggestions + * $sender->dataBind(); + * } + * </code> + * + * The suggestion will be rendered when the {@link dataBind()} method is called + * <strong>during a callback request</strong>. + * + * When an suggestion is selected, that is, when the use has clicked, pressed + * the "Enter" key, or pressed the "Tab" key, the {@link onSuggestionSelected OnSuggestionSelected} + * event is raised. The + * {@link TCallbackEventParameter::getCallbackParameter TCallbackEventParameter::CallbackParameter} + * property contains the index of the selected suggestion. + * + * TAutoComplete allows multiple suggestions within one textbox with each + * word or phrase separated by any characters specified in the + * {@link setSeparator Separator} property. The {@link setFrequency Frequency} + * and {@link setMinChars MinChars} properties sets the delay and minimum number + * of characters typed, respectively, before requesting for sugggestions. + * + * Use {@link onTextChange OnTextChange} and/or {@link onCallback OnCallback} events + * to handle post backs due to {@link setAutoPostBack AutoPostBack}. + * + * In the {@link getSuggestions Suggestions} TRepater item template, all HTML text elements + * are considered as text for the suggestion. Text within HTML elements with CSS class name + * "informal" are ignored as text for suggestions. + * + * @author Wei Zhuo <weizhuo[at]gmail[dot]com> + * @package System.Web.UI.ActiveControls + * @since 3.1 + */ +class TAutoComplete extends TActiveTextBox implements INamingContainer +{ + /** + * @var ITemplate template for repeater items + */ + private $_repeater=null; + /** + * @var TPanel result panel holding the suggestion items. + */ + private $_resultPanel=null; + + /** + * @return string word or token separators (delimiters). + */ + public function getSeparator() + { + return $this->getViewState('tokens', ''); + } + + /** + * @return string word or token separators (delimiters). + */ + public function setSeparator($value) + { + $this->setViewState('tokens', TPropertyValue::ensureString($value), ''); + } + + /** + * @return float maximum delay (in seconds) before requesting a suggestion. + */ + public function getFrequency() + { + return $this->getViewState('frequency', ''); + } + + /** + * @param float maximum delay (in seconds) before requesting a suggestion. + * Default is 0.4. + */ + public function setFrequency($value) + { + $this->setViewState('frequency', TPropertyValue::ensureFloat($value),''); + } + + /** + * @return integer minimum number of characters before requesting a suggestion. + */ + public function getMinChars() + { + return $this->getViewState('minChars',''); + } + + /** + * @param integer minimum number of characters before requesting a suggestion. + */ + public function setMinChars($value) + { + $this->setViewState('minChars', TPropertyValue::ensureInteger($value), ''); + } + + /** + * @param string Css class name of the element to use for suggestion. + */ + public function setTextCssClass($value) + { + $this->setViewState('TextCssClass', $value); + } + + /** + * @return string Css class name of the element to use for suggestion. + */ + public function getTextCssClass() + { + return $this->getViewState('TextCssClass'); + } + + /** + * Raises the callback event. This method is overrides the parent implementation. + * If {@link setAutoPostBack AutoPostBack} is enabled it will raise + * {@link onTextChanged OnTextChanged} event event and then the + * {@link onCallback OnCallback} event. The {@link onSuggest OnSuggest} event is + * raise if the request is to find sugggestions, the {@link onTextChanged OnTextChanged} + * and {@link onCallback OnCallback} events are <b>NOT</b> raised. + * This method is mainly used by framework and control developers. + * @param TCallbackEventParameter the event parameter + */ + public function raiseCallbackEvent($param) + { + $token = $param->getCallbackParameter(); + if(is_array($token) && count($token) == 2) + { + if($token[1] === '__TAutoComplete_onSuggest__') + { + $parameter = new TAutoCompleteEventParameter($this->getResponse(), $token[0]); + $this->onSuggest($parameter); + } + else if($token[1] === '__TAutoComplete_onSuggestionSelected__') + { + $parameter = new TAutoCompleteEventParameter($this->getResponse(), null, $token[0]); + $this->onSuggestionSelected($parameter); + } + } + else if($this->getAutoPostBack()) + parent::raiseCallbackEvent($param); + } + + /** + * This method is invoked when an autocomplete suggestion is requested. + * The method raises 'OnSuggest' event. If you override this + * method, be sure to call the parent implementation so that the event + * handler can be invoked. + * @param TCallbackEventParameter event parameter to be passed to the event handlers + */ + public function onSuggest($param) + { + $this->raiseEvent('OnSuggest', $this, $param); + } + + /** + * This method is invoked when an autocomplete suggestion is selected. + * The method raises 'OnSuggestionSelected' event. If you override this + * method, be sure to call the parent implementation so that the event + * handler can be invoked. + * @param TCallbackEventParameter event parameter to be passed to the event handlers + */ + public function onSuggestionSelected($param) + { + $this->raiseEvent('OnSuggestionSelected', $this, $param); + } + + /** + * @param array data source for suggestions. + */ + public function setDataSource($data) + { + $this->getSuggestions()->setDataSource($data); + } + + /** + * Overrides parent implementation. Callback {@link renderSuggestions()} when + * page's IsCallback property is true. + */ + public function dataBind() + { + parent::dataBind(); + if($this->getPage()->getIsCallback()) + $this->renderSuggestions($this->getResponse()->createHtmlWriter()); + } + + /** + * @return TPanel suggestion results panel. + */ + public function getResultPanel() + { + if($this->_resultPanel===null) + $this->_resultPanel = $this->createResultPanel(); + return $this->_resultPanel; + } + + /** + * @return TPanel new instance of result panel. Default uses TPanel. + */ + protected function createResultPanel() + { + $panel = Prado::createComponent('System.Web.UI.WebControls.TPanel'); + $this->getControls()->add($panel); + $panel->setID('result'); + return $panel; + } + + /** + * @return TRepeater suggestion list repeater + */ + public function getSuggestions() + { + if($this->_repeater===null) + $this->_repeater = $this->createRepeater(); + return $this->_repeater; + } + + /** + * @return TRepeater new instance of TRepater to render the list of suggestions. + */ + protected function createRepeater() + { + $repeater = Prado::createComponent('System.Web.UI.WebControls.TRepeater'); + $repeater->setHeaderTemplate(new TAutoCompleteTemplate('<ul>')); + $repeater->setFooterTemplate(new TAutoCompleteTemplate('</ul>')); + $repeater->setItemTemplate(new TTemplate('<li><%# $this->DataItem %></li>',null)); + $repeater->setEmptyTemplate(new TAutoCompleteTemplate('<ul></ul>')); + $this->getControls()->add($repeater); + return $repeater; + } + + /** + * Renders the end tag and registers the needed javascript library. + */ + public function renderEndTag($writer) + { + $cs=$this->getPage()->getClientScript(); + $cs->registerPradoScript('autocomplete'); + parent::renderEndTag($writer); + $this->renderResultPanel($writer); + } + + /** + * Renders the result panel. + * @param THtmlWriter the renderer. + */ + protected function renderResultPanel($writer) + { + $this->getResultPanel()->render($writer); + } + + /** + * Renders the suggestions during a callback respones. + * @param THtmlWriter the renderer. + */ + public function renderCallback($writer) + { + $this->renderSuggestions($writer); + } + + /** + * Renders the suggestions repeater. + * @param THtmlWriter the renderer. + */ + public function renderSuggestions($writer) + { + if($this->getActiveControl()->canUpdateClientSide()) + { + $this->getSuggestions()->render($writer); + $boundary = $writer->getWriter()->getBoundary(); + $this->getResponse()->getAdapter()->setResponseData($boundary); + } + } + + /** + * @return array list of callback options. + */ + protected function getPostBackOptions() + { + //disallow page state update ? + //$this->getActiveControl()->getClientSide()->setEnablePageStateUpdate(false); + $options = array(); + if(strlen($string = $this->getSeparator())) + { + $string = strtr($string,array('\t'=>"\t",'\n'=>"\n",'\r'=>"\r")); + $token = preg_split('//', $string, -1, PREG_SPLIT_NO_EMPTY); + $options['tokens'] = $token; + } + if($this->getAutoPostBack()) + { + $options = array_merge($options,parent::getPostBackOptions()); + $options['AutoPostBack'] = true; + } + if(strlen($select = $this->getTextCssClass())) + $options['select'] = $select; + $options['ResultPanel'] = $this->getResultPanel()->getClientID(); + $options['ID'] = $this->getClientID(); + $options['EventTarget'] = $this->getUniqueID(); + if(($minchars=$this->getMinChars())!=='') + $options['minChars'] = $minchars; + if(($frequency=$this->getFrequency())!=='') + $options['frequency'] = $frequency; + $options['CausesValidation'] = $this->getCausesValidation(); + $options['ValidationGroup'] = $this->getValidationGroup(); + return $options; + } + + /** + * Override parent implementation, no javascript is rendered here instead + * the javascript required for active control is registered in {@link addAttributesToRender}. + */ + protected function renderClientControlScript($writer) + { + } + + /** + * @return string corresponding javascript class name for this TActiveButton. + */ + protected function getClientClassName() + { + return 'Prado.WebUI.TAutoComplete'; + } +} + +/** + * TAutCompleteEventParameter contains the {@link getToken Token} requested by + * the user for a partial match of the suggestions. + * + * The {@link getSelectedIndex SelectedIndex} is a zero-based index of the + * suggestion selected by the user, -1 if not suggestion is selected. + * + * @author Wei Zhuo <weizhuo[at]gmail[dot]com> + * @package System.Web.UI.ActiveControls + * @since 3.1 + */ +class TAutoCompleteEventParameter extends TCallbackEventParameter +{ + private $_selectedIndex=-1; + + /** + * Creates a new TCallbackEventParameter. + */ + public function __construct($response, $parameter, $index=-1) + { + parent::__construct($response, $parameter); + $this->_selectedIndex=$index; + } + + /** + * @return int selected suggestion zero-based index, -1 if not selected. + */ + public function getSelectedIndex() + { + return $this->_selectedIndex; + } + + /** + * @return string token for matching a list of suggestions. + */ + public function getToken() + { + return $this->getCallbackParameter(); + } +} + +/** + * TAutoCompleteTemplate class. + * + * TAutoCompleteTemplate is the default template for TAutoCompleteTemplate + * item template. + * + * @author Wei Zhuo <weizhuo[at]gmail[dot]com> + * @package System.Web.UI.ActiveControls + * @since 3.1 + */ +class TAutoCompleteTemplate extends TComponent implements ITemplate +{ + private $_template; + + public function __construct($template) + { + $this->_template = $template; + } + /** + * Instantiates the template. + * It creates a {@link TDataList} control. + * @param TControl parent to hold the content within the template + */ + public function instantiateIn($parent) + { + $parent->getControls()->add($this->_template); + } +} + diff --git a/framework/Web/UI/ActiveControls/TBaseActiveControl.php b/framework/Web/UI/ActiveControls/TBaseActiveControl.php index f4daec02..c9b6f36e 100644 --- a/framework/Web/UI/ActiveControls/TBaseActiveControl.php +++ b/framework/Web/UI/ActiveControls/TBaseActiveControl.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 @@ Prado::using('System.Web.UI.ActiveControls.TCallbackClientSide'); * response returns. * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> - * @version $Id: TBaseActiveControl.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -155,7 +153,6 @@ class TBaseActiveControl extends TComponent * </code> * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @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 2c20567c..557001b2 100644 --- a/framework/Web/UI/ActiveControls/TCallback.php +++ b/framework/Web/UI/ActiveControls/TCallback.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @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 @@ Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter'); * </code> * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @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 96c8d38e..82f597bb 100644 --- a/framework/Web/UI/ActiveControls/TCallbackClientScript.php +++ b/framework/Web/UI/ActiveControls/TCallbackClientScript.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 */ @@ -54,7 +53,6 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @author Fabio Bas <ctrlaltca[at]gmail[dot]com> - * @version $Id: TCallbackClientScript.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -94,7 +92,7 @@ class TCallbackClientScript extends TApplicationComponent if(count($params) > 0) { - if ($params[0] instanceof ISurroundable) + if ($params[0] instanceof ISurroundable) $params[0] = $params[0]->getSurroundingTagID(); elseif($params[0] instanceof TControl) $params[0] = $params[0]->getClientID(); @@ -110,7 +108,7 @@ class TCallbackClientScript extends TApplicationComponent */ public function jQuery($element, $method, $params=array()) { - if ($element instanceof ISurroundable) + if ($element instanceof ISurroundable) $element = $element->getSurroundingTagID(); elseif($element instanceof TControl) $element = $element->getClientID(); @@ -179,7 +177,7 @@ class TCallbackClientScript extends TApplicationComponent /** * Client script to click on an element. <b>This client-side function is unpredictable.</b> - * + * * @param TControl control element or element id */ public function click($control) @@ -233,14 +231,14 @@ class TCallbackClientScript extends TApplicationComponent { $promptText = $control->getPromptText(); $promptValue = $control->getPromptValue(); - + if($promptValue==='') $promptValue = $promptText; - + if($promptValue!=='') $options[] = array($promptText, $promptValue); } - + foreach($items as $item) { if($item->getHasAttributes()) @@ -338,7 +336,7 @@ class TCallbackClientScript extends TApplicationComponent /** * Scroll the top of the browser viewing area to the location of the * element. - * + * * @param TControl control element or element id * @param array additional options: 'duration' in ms, 'offset' from the top in pixels */ @@ -480,7 +478,7 @@ class TCallbackClientScript extends TApplicationComponent { $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 ec993c14..449bea80 100644 --- a/framework/Web/UI/ActiveControls/TCallbackClientSide.php +++ b/framework/Web/UI/ActiveControls/TCallbackClientSide.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 <weizhuo[at]gamil[dot]com> - * @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 728ebbba..2d4451a8 100644 --- a/framework/Web/UI/ActiveControls/TCallbackEventParameter.php +++ b/framework/Web/UI/ActiveControls/TCallbackEventParameter.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @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 <weizhuo[at]gamil[dot]com> - * @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 19d53aeb..0d929ed1 100644 --- a/framework/Web/UI/ActiveControls/TCallbackOptions.php +++ b/framework/Web/UI/ActiveControls/TCallbackOptions.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 <weizhuo[at]gmail[dot]com> - * @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 47b5fae4..cad3c9ee 100755 --- a/framework/Web/UI/ActiveControls/TCallbackResponseAdapter.php +++ b/framework/Web/UI/ActiveControls/TCallbackResponseAdapter.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 <weizhuo[at]gmail[dot]com> - * @version $Id: TCallbackResponseAdapter.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -110,7 +108,6 @@ class TCallbackResponseAdapter extends THttpResponseAdapter * is generated using microtime. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @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 df92bec5..fe2ac4cc 100755 --- a/framework/Web/UI/ActiveControls/TDraggable.php +++ b/framework/Web/UI/ActiveControls/TDraggable.php @@ -1,17 +1,16 @@ <?php /** * TDraggable class file - * + * * @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 $ */ /** * TDraggable is a control which can be dragged - * + * * This control will make "draggable" control. * Properties : * @@ -21,14 +20,13 @@ * <b>{@link setRevert Revert}</b>: Set to True if you want your dragged element to revert to its initial position if not dropped on a valid area. * <b>{@link setConstraint Constraint}</b>: Set this to Horizontal or Vertical if you want to constraint your move in one direction. * <b>{@link setHandle Handle}</b>: - * + * * @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 @@ class TDraggable extends TPanel { $this->setViewState('DragHandle', TPropertyValue::ensureString($value), null); } - + /** * Get the handle id or css class * @return string @@ -47,7 +45,7 @@ class TDraggable extends TPanel { 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 @@ class TDraggable extends TPanel { 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 @@ class TDraggable extends TPanel $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 @@ class TDraggable extends TPanel { 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 @@ class TDraggable extends TPanel $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 @@ class TDraggable extends TPanel { return $this->getViewState('Constraint', TDraggableConstraint::None); } - + /** * Set wether the element should be constrainted in one direction * @param CDraggableConstraint @@ -135,7 +133,7 @@ class TDraggable extends TPanel { $this->setViewState('Constraint', TPropertyValue::ensureEnum($value, 'TDraggableConstraint'), TDraggableConstraint::None); } - + /** * Registers clientscripts * @@ -166,7 +164,7 @@ class TDraggable extends TPanel $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 @@ class TDraggable extends TPanel { return 'Draggable'; } - + /** * Gets the post back options for this textbox. * @return array @@ -193,7 +191,7 @@ class TDraggable extends TPanel 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 @@ class TDraggable extends TPanel return $options; } - + } /** @@ -213,7 +211,6 @@ class TDraggable extends TPanel * @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 43e8017c..e0fea5df 100755 --- a/framework/Web/UI/ActiveControls/TDropContainer.php +++ b/framework/Web/UI/ActiveControls/TDropContainer.php @@ -1,13 +1,11 @@ <?php /** * TDropContainer class file - * + * * @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 */ @@ -24,29 +22,28 @@ Prado::using('System.Web.UI.ActiveControls.TActivePanel'); /** * TDropContainer is a panel where TDraggable controls can be dropped. * When a TDraggable component is dropped into a TDropContainer, the {@link OnDrop OnDrop} event is raised. - * The {@link TDropContainerEventParameter} param will contain the dropped control. - * + * The {@link TDropContainerEventParameter} param will contain the dropped control. + * * Properties : - * + * * <b>{@link setAcceptCssClass AcceptCssClass}</b> : a coma delimited classname of elements that the drop container can accept. * <b>{@link setHoverCssClass HoverCssClass}</b>: CSS classname of the container when a draggable element hovers over the container. - * + * * Events: - * + * * <b>{@link OnDrop OnDrop}</b> : raised when a TDraggable control is dropped. The dropped control id is encapsulated in the event parameter, * as well as mouse coordinates and key modifiers status * - * + * * @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 -{ +class TDropContainer extends TPanel implements IActiveControl, ICallbackEventHandler +{ private $_container=null; - + /** * Creates a new callback control, sets the adapter to * TActiveControlAdapter. If you override this class, be sure to set the @@ -91,7 +88,7 @@ class TDropContainer extends TPanel implements IActiveControl, ICallbackEventHan { $this->setViewState('Accepts', TPropertyValue::ensureArray($value), ''); } - + /** * Sets the Css class name used when a draggble element is hovering * over this container. @@ -111,8 +108,8 @@ class TDropContainer extends TPanel implements IActiveControl, ICallbackEventHan { return $this->getViewState('HoverClass', ''); } - - + + /** * Raises callback event. This method is required bu {@link ICallbackEventHandler} * interface. @@ -125,19 +122,19 @@ class TDropContainer extends TPanel implements IActiveControl, ICallbackEventHan $this->onDrop($param->getCallbackParameter()); $this->onCallback($param); } - + /** - * Raises the onDrop event. + * Raises the onDrop event. * The drop parameters are encapsulated into a {@link TDropContainerEventParameter} - * + * * @param object $dropControlId */ public function onDrop ($dropParams) { $this->raiseEvent('OnDrop', $this, new TDropContainerEventParameter ($dropParams)); - + } - + /** * This method is invoked when a callback is requested. The method raises * 'OnCallback' event to fire up the event handlers. If you override this @@ -149,7 +146,7 @@ class TDropContainer extends TPanel implements IActiveControl, ICallbackEventHan { $this->raiseEvent('OnCallback', $this, $param); } - + /** * Gets the post back options for this textbox. * @return array @@ -163,7 +160,7 @@ class TDropContainer extends TPanel implements IActiveControl, ICallbackEventHan $options['hoverclass'] = $this->getHoverCssClass(); return $options; } - + /** * Gets the name of the javascript class responsible for performing postback for this control. * This method overrides the parent implementation. @@ -172,7 +169,7 @@ class TDropContainer extends TPanel implements IActiveControl, ICallbackEventHan protected function getClientClassName() { return 'Prado.WebUI.DropContainer'; - } + } /** * Registers clientscripts @@ -198,7 +195,7 @@ class TDropContainer extends TPanel implements IActiveControl, ICallbackEventHan $this->getActiveControl()->registerCallbackClientScript( $this->getClientClassName(), $this->getPostBackOptions()); } - + /** * Creates child control * Override parent implementation to create a container which will contain all @@ -214,7 +211,7 @@ class TDropContainer extends TPanel implements IActiveControl, ICallbackEventHan parent::getControls()->add($this->_container); } } - + /** * Override parent implementation to return the container control collection. * @@ -225,7 +222,7 @@ class TDropContainer extends TPanel implements IActiveControl, ICallbackEventHan $this->ensureChildControls(); return $this->_container->getControls(); } - + /** * Renders and replaces the panel's content on the client-side. * When render() is called before the OnPreRender event, such as when render() @@ -246,19 +243,18 @@ class TDropContainer extends TPanel implements IActiveControl, ICallbackEventHan $this->getPage()->getAdapter()->registerControlToRender($this->_container,$writer); } } - + } /** * TDropContainerEventParameter class - * + * * TDropContainerEventParameter encapsulate the parameter * data for <b>OnDrop</b> event of TDropContainer components - * + * * @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 4f1dbbf8..53d6aead 100644 --- a/framework/Web/UI/ActiveControls/TEventTriggeredCallback.php +++ b/framework/Web/UI/ActiveControls/TEventTriggeredCallback.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 @@ Prado::using('System.Web.UI.ActiveControls.TTriggeredCallback'); * {@link setPreventDefaultAction PreventDefaultAction} is set to true. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @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 5309b7e8..012f2da3 100644 --- a/framework/Web/UI/ActiveControls/TInPlaceTextBox.php +++ b/framework/Web/UI/ActiveControls/TInPlaceTextBox.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 @@ Prado::using('System.Web.UI.ActiveControls.TActiveTextBox'); * * 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 <weizhuo[at]gmail[dot]com> - * @version $Id: TInPlaceTextBox.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -145,7 +143,7 @@ class TInPlaceTextBox extends TActiveTextBox $client->setValue($this, $value); } } - + /** * Update ClientSide Readonly property * @param boolean value @@ -232,7 +230,7 @@ class TInPlaceTextBox extends TActiveTextBox 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 46df7a22..bc250521 100644 --- a/framework/Web/UI/ActiveControls/TTimeTriggeredCallback.php +++ b/framework/Web/UI/ActiveControls/TTimeTriggeredCallback.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 @@ Prado::using('System.Web.UI.ActiveControls.TCallback'); * {@link setStartTimerOnLoad StartTimerOnLoad} is true. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @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 2365326b..544707b0 100644 --- a/framework/Web/UI/ActiveControls/TTriggeredCallback.php +++ b/framework/Web/UI/ActiveControls/TTriggeredCallback.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 @@ Prado::using('System.Web.UI.ActiveControls.TCallback'); * property sets the control ID to observe the trigger. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @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 e9db1bed..0b323066 100644 --- a/framework/Web/UI/ActiveControls/TValueTriggeredCallback.php +++ b/framework/Web/UI/ActiveControls/TValueTriggeredCallback.php @@ -4,9 +4,8 @@ * * @author Wei Zhuo <weizhuo[at]gamil[dot]com> * @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 @@ Prado::using('System.Web.UI.ActiveControls.TTriggeredCallback'); * observed, the polling interval is reset to the original value. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id: TValueTriggeredCallback.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ |