summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/ActiveControls')
-rw-r--r--framework/Web/UI/ActiveControls/TActiveButton.php6
-rw-r--r--framework/Web/UI/ActiveControls/TActiveCheckBox.php8
-rw-r--r--framework/Web/UI/ActiveControls/TActiveCheckBoxList.php30
-rwxr-xr-xframework/Web/UI/ActiveControls/TActiveClientScript.php10
-rw-r--r--framework/Web/UI/ActiveControls/TActiveControlAdapter.php29
-rw-r--r--framework/Web/UI/ActiveControls/TActiveCustomValidator.php5
-rw-r--r--framework/Web/UI/ActiveControls/TActiveDataGrid.php4
-rw-r--r--framework/Web/UI/ActiveControls/TActiveDataList.php21
-rwxr-xr-xframework/Web/UI/ActiveControls/TActiveDatePicker.php31
-rw-r--r--framework/Web/UI/ActiveControls/TActiveDropDownList.php4
-rwxr-xr-xframework/Web/UI/ActiveControls/TActiveFileUpload.php115
-rw-r--r--framework/Web/UI/ActiveControls/TActiveHiddenField.php2
-rw-r--r--framework/Web/UI/ActiveControls/TActiveHyperLink.php4
-rw-r--r--framework/Web/UI/ActiveControls/TActiveImage.php4
-rw-r--r--framework/Web/UI/ActiveControls/TActiveImageButton.php16
-rw-r--r--framework/Web/UI/ActiveControls/TActiveLabel.php4
-rw-r--r--framework/Web/UI/ActiveControls/TActiveLinkButton.php6
-rw-r--r--framework/Web/UI/ActiveControls/TActiveListBox.php10
-rw-r--r--framework/Web/UI/ActiveControls/TActiveListControlAdapter.php5
-rw-r--r--framework/Web/UI/ActiveControls/TActivePageAdapter.php29
-rw-r--r--framework/Web/UI/ActiveControls/TActivePager.php50
-rw-r--r--framework/Web/UI/ActiveControls/TActivePanel.php6
-rw-r--r--framework/Web/UI/ActiveControls/TActiveRadioButton.php6
-rw-r--r--framework/Web/UI/ActiveControls/TActiveRadioButtonList.php32
-rw-r--r--framework/Web/UI/ActiveControls/TActiveRatingList.php8
-rw-r--r--framework/Web/UI/ActiveControls/TActiveRepeater.php1
-rw-r--r--framework/Web/UI/ActiveControls/TActiveTextBox.php4
-rw-r--r--framework/Web/UI/ActiveControls/TAutoComplete.php11
-rw-r--r--framework/Web/UI/ActiveControls/TBaseActiveControl.php8
-rw-r--r--framework/Web/UI/ActiveControls/TCallback.php4
-rw-r--r--framework/Web/UI/ActiveControls/TCallbackClientScript.php455
-rw-r--r--framework/Web/UI/ActiveControls/TCallbackClientSide.php8
-rw-r--r--framework/Web/UI/ActiveControls/TCallbackEventParameter.php3
-rw-r--r--framework/Web/UI/ActiveControls/TCallbackOptions.php4
-rwxr-xr-xframework/Web/UI/ActiveControls/TCallbackResponseAdapter.php5
-rwxr-xr-xframework/Web/UI/ActiveControls/TDraggable.php37
-rwxr-xr-xframework/Web/UI/ActiveControls/TDropContainer.php58
-rw-r--r--framework/Web/UI/ActiveControls/TEventTriggeredCallback.php4
-rw-r--r--framework/Web/UI/ActiveControls/TInPlaceTextBox.php10
-rw-r--r--framework/Web/UI/ActiveControls/TTimeTriggeredCallback.php4
-rw-r--r--framework/Web/UI/ActiveControls/TTriggeredCallback.php4
-rw-r--r--framework/Web/UI/ActiveControls/TValueTriggeredCallback.php4
42 files changed, 556 insertions, 513 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 ab15f091..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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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
*/
@@ -89,7 +87,6 @@ class TActiveControlAdapter extends TControlAdapter
public function render($writer)
{
$this->getPage()->getClientScript()->registerPradoScript('ajax');
- $this->renderCallbackClientScripts();
if($this->_control->getVisible(false))
{
parent::render($writer);
@@ -99,25 +96,6 @@ class TActiveControlAdapter extends TControlAdapter
}
/**
- * Register the callback clientscripts and sets the post loader IDs.
- */
- protected function renderCallbackClientScripts()
- {
- $cs = $this->getPage()->getClientScript();
- $key = 'Prado.CallbackRequest.addPostLoaders';
- if(!$cs->isEndScriptRegistered($key))
- {
- $data = $this->getPage()->getPostDataLoaders();
- if(count($data) > 0)
- {
- $options = TJavaScript::encode($data,false);
- $script = "Prado.CallbackRequest.addPostLoaders({$options});";
- $cs->registerEndScript($key, $script);
- }
- }
- }
-
- /**
* @param TBaseActiveControl change base active control
*/
public function setBaseActiveControl($control)
@@ -197,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
*/
@@ -387,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
*/
@@ -431,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
*/
@@ -456,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
*/
@@ -548,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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 &copy; 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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..b478e119 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();
@@ -295,35 +293,35 @@ EOS;
Options.fileType = '{$params->fileType}';
Options.errorCode = '{$params->errorCode}';
Options.callbackToken = '{$this->pushParamsAndGetToken($params)}';
- parent.Prado.WebUI.TactiveFileUpload.onFileUpload(Options);
+ parent.Prado.WebUI.TActiveFileUpload.onFileUpload(Options);
</script>
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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 b2aa9960..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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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
*/
@@ -135,18 +133,6 @@ class TActiveImageButton extends TImageButton implements IActiveControl, ICallba
}
/**
- * Register the x and y hidden input names of the position clicked.
- * @param THtmlWriter the renderer.
- */
- public function onPreRender($writer)
- {
- parent::onPreRender($writer);
- $uid = $uid=$this->getUniqueID();
- $this->getPage()->registerPostDataLoader($uid.'_x');
- $this->getPage()->registerPostDataLoader($uid.'_y');
- }
-
- /**
* Ensure that the ID attribute is rendered and registers the javascript code
* for initializing the active control.
*/
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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 dfb4bf6e..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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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
*/
@@ -95,8 +93,6 @@ class TActiveListBox extends TListBox implements IActiveControl, ICallbackEventH
$client = $this->getPage()->getCallbackClient();
$client->setAttribute($this, 'multiple', $multiple ? 'multiple' : false);
$client->setAttribute($this, 'name', $multiple ? $multi_id : $id);
- if($multiple)
- $client->addPostDataLoader($multi_id);
}
}
@@ -130,10 +126,6 @@ class TActiveListBox extends TListBox implements IActiveControl, ICallbackEventH
{
parent::onPreRender($param);
$this->getAdapter()->updateListItems();
- $multiple = $this->getIsMultiSelect();
- $id = $this->getUniqueID(); $multi_id = $id.'[]';
- if($multiple)
- $this->getPage()->registerPostDataLoader($multi_id);
}
/**
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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 03fe2f16..8f5055f6 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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
*/
@@ -150,7 +148,6 @@ class TActivePageAdapter extends TControlAdapter
{
Prado::trace("ActivePage redirect()",'System.Web.UI.ActiveControls.TActivePageAdapter');
$this->appendContentPart($this->getResponse(), self::CALLBACK_REDIRECT, $url);
- //$this->getResponse()->appendHeader(self::CALLBACK_REDIRECT.': '.$url);
}
/**
@@ -176,7 +173,6 @@ class TActivePageAdapter extends TControlAdapter
$data = TJavaScript::jsonEncode($responseData);
$this->appendContentPart($response, self::CALLBACK_DATA_HEADER, $data);
- //$response->appendHeader(self::CALLBACK_DATA_HEADER.': '.$data);
}
}
@@ -187,7 +183,6 @@ class TActivePageAdapter extends TControlAdapter
{
$pagestate = $this->getPage()->getClientState();
$this->appendContentPart($response, self::CALLBACK_PAGESTATE_HEADER, $pagestate);
- //$response->appendHeader(self::CALLBACK_PAGESTATE_HEADER.': '.$pagestate);
}
}
@@ -198,7 +193,7 @@ class TActivePageAdapter extends TControlAdapter
if($this->getPage()->getClientScript()->hasEndScripts())
{
$writer = $response->createHtmlWriter();
- $this->getPage()->getClientScript()->renderEndScripts($writer);
+ $this->getPage()->getClientScript()->renderEndScriptsCallback($writer);
$this->getPage()->getCallbackClient()->evaluateScript($writer);
}
@@ -206,7 +201,6 @@ class TActivePageAdapter extends TControlAdapter
$executeJavascript = $this->getCallbackClientHandler()->getClientFunctionsToExecute();
$actions = TJavaScript::jsonEncode($executeJavascript);
$this->appendContentPart($response, self::CALLBACK_ACTION_HEADER, $actions);
- //$response->appendHeader(self::CALLBACK_ACTION_HEADER.': '.$actions);
$cs = $this->Page->getClientScript();
@@ -296,7 +290,7 @@ class TActivePageAdapter extends TControlAdapter
}
/**
- * Gets callback parameter. JSON encoding is assumed.
+ * Gets callback parameter.
* @return string postback event parameter
*/
public function getCallbackEventParameter()
@@ -304,8 +298,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 +333,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
*/
@@ -357,14 +349,22 @@ class TCallbackErrorHandler extends TErrorHandler
{
$response = $this->getApplication()->getResponse();
$trace = $this->getExceptionStackTrace($exception);
+ // avoid error on non-utf8 strings
try {
$trace = TJavaScript::jsonEncode($trace);
} catch (Exception $e) {
// strip everythin not 7bit ascii
$trace = preg_replace('/[^(\x20-\x7F)]*/','', serialize($trace));
}
- $response->setStatusCode(500, 'Internal Server Error');
- $response->appendHeader(TActivePageAdapter::CALLBACK_ERROR_HEADER.': '.$trace);
+
+ // avoid exception loop if headers have already been sent
+ try {
+ $response->setStatusCode(500, 'Internal Server Error');
+ } catch (Exception $e) { }
+
+ $content = $response->createHtmlWriter();
+ $content->getWriter()->setBoundary(TActivePageAdapter::CALLBACK_ERROR_HEADER);
+ $content->write($trace);
}
else
{
@@ -406,7 +406,6 @@ 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..078bd5be 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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
@@ -126,6 +124,7 @@ class TActivePager extends TPager implements IActiveControl, ICallbackEventHandl
{
$button=new TLabel;
$button->setText($text);
+ $button->setCssClass($this->getButtonCssClass());
return $button;
}
}
@@ -144,28 +143,29 @@ 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->setCssClass($this->getButtonCssClass());
+
+ $button->attachEventHandler('OnCallback', array($this, 'handleCallback'));
$button->getAdapter()->getBaseActiveControl()->setClientSide(
$this->getClientSide()
);
-
+
return $button;
}
-
+
/**
* Event handler to the OnCallback active buttons or active dropdownlist.
- * This handler will raise the {@link onCallback OnCallback} event
+ * This handler will raise the {@link onCallback OnCallback} event
*
* @param mixed $sender
* @param TCallbackEventParameter $param
@@ -181,14 +181,14 @@ 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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..6f6dd847 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
* @package System.Web.UI.ActiveControls
@@ -105,8 +105,8 @@ class TActiveRatingList extends TRatingList implements IActiveControl, ICallback
if($this->getActiveControl()->canUpdateClientSide())
{
$client = $this->getPage()->getCallbackClient();
- $code = parent::getClientClassName().'.'.$func;
- $client->callClientFunction($code,array($this,$value));
+ $code = 'Prado.Registry[\''.$this->ClientID.'\'].'.$func.'('.$value.')';
+ $client->evaluateScript($code,array($value));
}
}
@@ -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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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
index 5e144040..4ed0d34c 100644
--- a/framework/Web/UI/ActiveControls/TAutoComplete.php
+++ b/framework/Web/UI/ActiveControls/TAutoComplete.php
@@ -4,9 +4,8 @@
*
* @author Wei Zhuo <weizhuo[at]gamil[dot]com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @version $Id: TAutoComplete.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Web.UI.ActiveControls
*/
@@ -77,7 +76,6 @@ Prado::using('System.Web.UI.ActiveControls.TCallbackEventParameter');
* "informal" are ignored as text for suggestions.
*
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
- * @version $Id: TAutoComplete.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Web.UI.ActiveControls
* @since 3.1
*/
@@ -276,11 +274,12 @@ class TAutoComplete extends TActiveTextBox implements INamingContainer
}
/**
- * Renders the end tag and registers javascript effects library.
+ * Renders the end tag and registers the needed javascript library.
*/
public function renderEndTag($writer)
{
- $this->getPage()->getClientScript()->registerPradoScript('effects');
+ $cs=$this->getPage()->getClientScript();
+ $cs->registerPradoScript('autocomplete');
parent::renderEndTag($writer);
$this->renderResultPanel($writer);
}
@@ -375,7 +374,6 @@ class TAutoComplete extends TActiveTextBox implements INamingContainer
* suggestion selected by the user, -1 if not suggestion is selected.
*
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
- * @version $Id: TAutoComplete.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Web.UI.ActiveControls
* @since 3.1
*/
@@ -416,7 +414,6 @@ class TAutoCompleteEventParameter extends TCallbackEventParameter
* item template.
*
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
- * @version $Id: TAutoComplete.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Web.UI.ActiveControls
* @since 3.1
*/
diff --git a/framework/Web/UI/ActiveControls/TBaseActiveControl.php b/framework/Web/UI/ActiveControls/TBaseActiveControl.php
index 61230719..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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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
*/
@@ -332,6 +329,9 @@ class TBaseActiveCallbackControl extends TBaseActiveControl
$options['CausesValidation']= $validate ? '' : false;
$options['ValidationGroup']=$this->getValidationGroup();
$options['CallbackParameter'] = $this->getCallbackParameter();
+ // needed for TCallback
+ if(!isset($options['EventTarget']))
+ $options['EventTarget'] = $this->getControl()->getUniqueID();
return $options;
}
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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 40051f76..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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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
*/
@@ -17,7 +16,7 @@
* executed on the client-side (i.e. the browser client that is viewing
* the page) during a callback response.
*
- * The avaiable methods includes setting/clicking input elements, changing Css
+ * The available methods includes setting/clicking input elements, changing Css
* styles, hiding/showing elements, and adding visual effects to elements on the
* page. The client-side methods can be access through the CallbackClient
* property available in TPage.
@@ -27,8 +26,33 @@
* $this->getPage()->getCallbackClient()->hide($myTextBox);
* </code>
*
- * @author Wei Zhuo <weizhuo[at]gamil[dot]com>
- * @version $Id: TCallbackClientScript.php 3245 2013-01-07 20:23:32Z ctrlaltca $
+ * To call a specific jQuery method on an element, use the {@link jQuery} method:
+ * <code>
+ * // simple example: focus a textbox
+ * $this->getCallbackClient()->jQuery($myTextBox, 'focus');
+ *
+ * // complex example: resize a textbox using an animation
+ * $this->getCallbackClient()->jQuery($myTextBox, 'animate', array(
+ * array( 'width' => '+=100',
+ * 'height' => '+=50'
+ * ),
+ * array('duration' => 1000)
+ * ));
+ * </code>
+ *
+ * To call a jQueryUI effect on an element, use the {@link juiEffect} method:
+ * <code>
+ * // simple example: focus a textbox
+ * $this->getCallbackClient()->juiEffect($myTextBox, 'highlight');
+ * </code>
+ *
+ * In order to use the jQueryUI effects, the jqueryui script must be registered:
+ * <code>
+ * $this->getPage()->getClientScript()->registerPradoScript('jqueryui');
+ * </code>
+ *
+ * @author Wei Zhuo <weizhuo[at]gmail[dot]com>
+ * @author Fabio Bas <ctrlaltca[at]gmail[dot]com>
* @package System.Web.UI.ActiveControls
* @since 3.1
*/
@@ -61,27 +85,48 @@ class TCallbackClientScript extends TApplicationComponent
* @param string javascript function name
* @param array list of arguments for the function
*/
- public function callClientFunction($function, $params=null)
+ public function callClientFunction($function, $params=array())
{
if(!is_array($params))
$params = array($params);
if(count($params) > 0)
{
- if($params[0] instanceof TControl)
+ if ($params[0] instanceof ISurroundable)
+ $params[0] = $params[0]->getSurroundingTagID();
+ elseif($params[0] instanceof TControl)
$params[0] = $params[0]->getClientID();
}
$this->_actions->add(array($function => $params));
}
/**
+ * Executes a jQuery client-side method over an element.
+ * @param string control or element id
+ * @param string jQuery method name
+ * @param array list of arguments for the function
+ */
+ public function jQuery($element, $method, $params=array())
+ {
+ if ($element instanceof ISurroundable)
+ $element = $element->getSurroundingTagID();
+ elseif($element instanceof TControl)
+ $element = $element->getClientID();
+
+ if(!is_array($params))
+ $params = array($params);
+
+ $this->_actions->add(array('Prado.Element.j' => array($element, $method, $params)));
+ }
+
+ /**
* Client script to set the value of a particular input element.
* @param TControl control element to set the new value
* @param string new value
*/
public function setValue($input, $text)
{
- $this->callClientFunction('Prado.Element.setValue', array($input, $text));
+ $this->jQuery($input, 'val', $text);
}
/**
@@ -106,6 +151,11 @@ class TCallbackClientScript extends TApplicationComponent
'Value', 'Index', 'Clear', 'Indices', 'Values', 'All', 'Invert');
$type = ($type===null) ? $this->getSelectionControlType($control) : $type;
$total = $this->getSelectionControlIsListType($control) ? $control->getItemCount() : 1;
+
+ // pass the ID to avoid getting the surrounding elements (ISurroundable)
+ if($control instanceof TControl)
+ $control = $control->getClientID();
+
$this->callClientFunction('Prado.Element.select',
array($control, $type.$method, $value, $total));
}
@@ -127,12 +177,12 @@ 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)
{
- $this->callClientFunction('Prado.Element.click', $control);
+ $this->jQuery($control, 'trigger', 'click');
}
/**
@@ -152,8 +202,7 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function raiseClientEvent($control, $eventName)
{
- $this->callClientFunction('Event.fireEvent',
- array($control, strtolower($eventName)));
+ $this->jQuery($control, 'trigger', $eventName);
}
/**
@@ -164,9 +213,9 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function setAttribute($control, $name, $value)
{
- // Attributes should be applied on Surrounding tag, except for 'disabled' attribute
+ // Attributes should be applied on Surrounding tag, except for 'disabled' attribute
if ($control instanceof ISurroundable && strtolower($name)!=='disabled')
- $control=$control->getSurroundingTagID();
+ $control=$control->getSurroundingTagID();
$this->callClientFunction('Prado.Element.setAttribute',array($control, $name, $value));
}
@@ -182,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())
@@ -206,9 +255,7 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function show($element)
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->callClientFunction('Element.show', $element);
+ $this->jQuery($element, 'show');
}
/**
@@ -217,22 +264,33 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function hide($element)
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->callClientFunction('Element.hide', $element);
+ $this->jQuery($element, 'hide');
}
/**
* Toggles the visibility of the element.
* @param TControl control element or element id
- * @param string visual effect, such as, 'appear' or 'slide' or 'blind'.
+ * @param string visual effect, such as, 'fade' or 'slide'.
* @param array additional options.
*/
public function toggle($element, $effect=null, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->callClientFunction('Element.toggle', array($element,$effect,$options));
+ switch(strtolower($effect))
+ {
+ case 'fade':
+ $method='fadeToggle';
+ break;
+ case 'slide':
+ $method='slideToggle';
+ break;
+ default:
+ $method='toggle';
+ // avoid fancy effect by default
+ if(!array_key_exists('duration', $options))
+ $options['duration']=0;
+ break;
+ }
+ $this->jQuery($element, $method, $options);
}
/**
@@ -241,14 +299,7 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function remove($element)
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->callClientFunction('Element.remove', $element);
- }
-
- public function addPostDataLoader($name)
- {
- $this->callClientFunction('Prado.CallbackRequest.addPostLoaders', $name);
+ $this->jQuery($element, 'remove');
}
/**
@@ -259,9 +310,7 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function update($element, $content)
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->replace($element, $content, 'Element.update');
+ $this->jQuery($element, 'html', $content);
}
/**
@@ -271,9 +320,7 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function addCssClass($element, $cssClass)
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->callClientFunction('Element.addClassName', array($element, $cssClass));
+ $this->jQuery($element, 'addClass', $cssClass);
}
/**
@@ -283,31 +330,19 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function removeCssClass($element, $cssClass)
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->callClientFunction('Element.removeClassName', array($element, $cssClass));
+ $this->jQuery($element, 'removeClass', $cssClass);
}
/**
- * Sets the CssClass of an element.
- * @param TControl control element or element id
- * @param string new CssClass name for the element.
- */
- /*public function setCssClass($element, $cssClass)
- {
- $this->callClientFunction('Prado.Element.CssClass.set', array($element, $cssClass));
- }*/
-
- /**
* 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
*/
- public function scrollTo($element)
+ public function scrollTo($element, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->callClientFunction('Element.scrollTo', $element);
+ $this->callClientFunction('Prado.Element.scrollTo', array($element, $options));
}
/**
@@ -316,7 +351,7 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function focus($element)
{
- $this->callClientFunction('Prado.Element.focus', $element);
+ $this->jQuery($element, 'trigger', 'focus');
}
/**
@@ -327,9 +362,7 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function setStyle($element, $styles)
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->callClientFunction('Prado.Element.setStyle', array($element, $styles));
+ $this->jQuery($element, 'css', array($styles));
}
/**
@@ -339,9 +372,7 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function appendContent($element, $content)
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->replace($element, $content, 'Prado.Element.Insert.append');
+ $this->jQuery($element, 'append', $content);
}
/**
@@ -351,9 +382,7 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function prependContent($element, $content)
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->replace($element, $content, 'Prado.Element.Insert.prepend');
+ $this->jQuery($element, 'prepend', $content);
}
/**
@@ -363,9 +392,7 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function insertContentAfter($element, $content)
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->replace($element, $content, 'Prado.Element.Insert.after');
+ $this->jQuery($element, 'after', $content);
}
/**
@@ -375,9 +402,7 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function insertContentBefore($element, $content)
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->replace($element, $content, 'Prado.Element.Insert.before');
+ $this->jQuery($element, 'before', $content);
}
/**
@@ -387,15 +412,13 @@ class TCallbackClientScript extends TApplicationComponent
* will be used for replacement.
* @param TControl control element or HTML element id.
* @param string HTML fragement or the control to be rendered
- * @param string replacement method, default is to replace the outter
- * html content.
* @param string provide a custom boundary.
* @see insertAbout
* @see insertBelow
* @see insertBefore
* @see insertAfter
*/
- protected function replace($element, $content, $method="Element.replace", $boundary=null)
+ protected function replace($element, $content, $boundary=null)
{
if($content instanceof TControl)
{
@@ -408,8 +431,7 @@ class TCallbackClientScript extends TApplicationComponent
$content = null;
}
- $this->callClientFunction('Prado.Element.replace',
- array($element, $method, $content, $boundary));
+ $this->callClientFunction('Prado.Element.replace', array($element, $content, $boundary));
}
/**
@@ -419,8 +441,6 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function replaceContent($element,$content)
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
$this->replace($element, $content);
}
@@ -430,7 +450,16 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function evaluateScript($writer)
{
- $this->replace(null, $writer, 'Prado.Element.evaluateScript');
+ if($writer instanceof THtmlWriter)
+ {
+ $boundary = $this->getResponseContentBoundary($writer);
+ $content = null;
+ } else {
+ $boundary = null;
+ $content = $writer;
+ }
+
+ $this->callClientFunction('Prado.Element.evaluateScript', array($content, $boundary));
}
/**
@@ -445,11 +474,11 @@ class TCallbackClientScript extends TApplicationComponent
{
$boundary = $this->getRenderedContentBoundary($content);
}
- else if($content instanceof THtmlWriter)
+ elseif($content instanceof THtmlWriter)
{
$boundary = $this->getResponseContentBoundary($content);
}
-
+
$this->callClientFunction('Prado.Element.appendScriptBlock', array($boundary));
}
@@ -483,223 +512,311 @@ class TCallbackClientScript extends TApplicationComponent
return null;
}
+ /* VISUAL EFFECTS */
+
/**
* Add a visual effect the element.
* @param string visual effect function name.
* @param TControl control element or element id
* @param array visual effect key-value pair options.
*/
- public function visualEffect($type, $element, $options=null)
+ public function visualEffect($type, $element, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->callClientFunction($type, array($element, $options));
+ $this->jQuery($element, $type, $options);
}
+ /* BASIC EFFECTS (JQUERY CORE) */
+
/**
* Visual Effect: Gradually make the element appear.
+ * This effect doesn't need jQueryUI.
* @param TControl control element or element id
* @param array visual effect key-value pair options.
*/
- public function appear($element, $options=null)
+ public function fadeIn($element, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->visualEffect('Effect.Appear', $element, $options);
+ $this->visualEffect('fadeIn', $element, $options);
}
/**
- * Visual Effect: Blind down.
+ * Visual Effect: Gradually fade the element.
+ * This effect doesn't need jQueryUI.
* @param TControl control element or element id
* @param array visual effect key-value pair options.
*/
- public function blindDown($element, $options=null)
+ public function fadeOut($element, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->visualEffect('Effect.BlindDown', $element, $options);
+ $this->visualEffect('fadeOut', $element, $options);
}
/**
- * Visual Effect: Blind up.
+ * Set the opacity on a html element or control.
+ * This effect doesn't need jQueryUI.
+ * @param TControl control element or element id
+ * @param float opacity value between 1 and 0
+ */
+ public function fadeTo($element, $value, $duration=500)
+ {
+ $value = TPropertyValue::ensureFloat($value);
+ $this->visualEffect('fadeTo', $element, array($duration, $value));
+ }
+
+ /**
+ * Visual Effect: Slide down.
+ * This effect doesn't need jQueryUI.
* @param TControl control element or element id
* @param array visual effect key-value pair options.
*/
- public function blindUp($element, $options=null)
+ public function slideDown($element, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->visualEffect('Effect.BlindUp', $element, $options);
+ $this->visualEffect('slideDown', $element, $options);
+ }
+ /**
+ * Visual Effect: Slide up.
+ * This effect doesn't need jQueryUI.
+ * @param TControl control element or element id
+ * @param array visual effect key-value pair options.
+ */
+ public function slideUp($element, $options=array())
+ {
+ $this->visualEffect('slideUp', $element, $options);
}
+ /* OLD METHODS, DEPRECATED, BACKWARDS-COMPATIBILITY */
+
/**
- * Visual Effect: Drop out.
+ * Alias of fadeIn()
+ * @deprecated since 3.4
* @param TControl control element or element id
* @param array visual effect key-value pair options.
*/
- public function dropOut($element, $options=null)
+ public function appear($element, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->visualEffect('Effect.DropOut', $element, $options);
+ $this->fadeIn($element, $options);
}
/**
- * Visual Effect: Gradually fade the element.
+ * Alias of fadeOut()
+ * @deprecated since 3.4
+ * @param TControl control element or element id
+ * @param array visual effect key-value pair options.
+ */
+ public function fade($element, $options=array())
+ {
+ $this->fadeOut($element, $options);
+ }
+
+ /**
+ * Alias of fadeTo()
+ * @deprecated since 3.4
+ * @param TControl control element or element id
+ * @param float opacity value between 1 and 0
+ */
+ public function setOpacity($element, $value)
+ {
+ $this->fadeTo($element, $value);
+ }
+
+ /* JQUERY UI EFFECTS */
+
+ /**
+ * Add a jQuery-ui effect the element.
+ * This method needs jQueryUI.
+ * @param string visual effect function name.
+ * @param TControl control element or element id
+ * @param array effect options.
+ */
+ public function juiEffect($element, $effect, $options=array())
+ {
+ $options['effect']=$effect;
+ $this->jQuery($element, 'effect', array($options));
+ }
+
+ /**
+ * Visual Effect: Blind.
+ * This effect needs jQueryUI.
* @param TControl control element or element id
* @param array visual effect key-value pair options.
*/
- public function fade($element, $options=null)
+ public function blind($element, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->visualEffect('Effect.Fade', $element, $options);
+ $this->juiEffect($element, 'blind', $options);
+ }
+
+ /**
+ * Visual Effect: Drop out.
+ * This effect needs jQueryUI.
+ * @param TControl control element or element id
+ * @param array visual effect key-value pair options.
+ */
+ public function drop($element, $options=array())
+ {
+ $this->juiEffect($element, 'drop', $options);
}
/**
* Visual Effect: Fold.
+ * This effect needs jQueryUI.
* @param TControl control element or element id
* @param array visual effect key-value pair options.
*/
- public function fold($element, $options = null)
+ public function fold($element, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->visualEffect('Effect.Fold', $element, $options);
+ $this->juiEffect($element, 'fold', $options);
}
/**
* Visual Effect: Gradually make an element grow to a predetermined size.
+ * This effect needs jQueryUI.
* @param TControl control element or element id
* @param array visual effect key-value pair options.
*/
- public function grow($element, $options=null)
+ public function size($element, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->visualEffect('Effect.Grow', $element, $options);
+ $this->juiEffect($element, 'size', $options);
}
/**
* Visual Effect: Gradually grow and fade the element.
+ * This effect needs jQueryUI.
* @param TControl control element or element id
* @param array visual effect key-value pair options.
*/
- public function puff($element, $options=null)
+ public function puff($element, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->visualEffect('Effect.Puff', $element, $options);
+ $this->juiEffect($element, 'puff', $options);
}
/**
* Visual Effect: Pulsate.
+ * This effect needs jQueryUI.
* @param TControl control element or element id
* @param array visual effect key-value pair options.
*/
- public function pulsate($element, $options=null)
+ public function pulsate($element, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->visualEffect('Effect.Pulsate', $element, $options);
+ $this->juiEffect($element, 'pulsate', $options);
}
/**
* Visual Effect: Shake the element.
+ * This effect needs jQueryUI.
* @param TControl control element or element id
* @param array visual effect key-value pair options.
*/
- public function shake($element, $options=null)
+ public function shake($element, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->visualEffect('Effect.Shake', $element, $options);
+ $this->juiEffect($element, 'shake', $options);
}
/**
- * Visual Effect: Shrink the element.
+ * Visual Effect: Scale the element.
+ * This effect needs jQueryUI.
* @param TControl control element or element id
* @param array visual effect key-value pair options.
*/
- public function shrink($element, $options=null)
+ public function scale($element, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->visualEffect('Effect.Shrink', $element, $options);
+ $this->juiEffect($element, 'scale', $options);
}
/**
- * Visual Effect: Slide down.
+ * Visual Effect: High light the element for about 2 seconds.
+ * This effect needs jQueryUI.
* @param TControl control element or element id
* @param array visual effect key-value pair options.
*/
- public function slideDown($element, $options=null)
+ public function highlight($element, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->visualEffect('Effect.SlideDown', $element, $options);
+ $this->juiEffect($element, 'highlight', $options);
}
+ /* jui - OLD METHODS, DEPRECATED, BACKWARDS-COMPATIBILITY */
+
/**
- * Visual Effect: Side up.
+ * Alias of blind(), presets the direction to 'down'
+ * @deprecated since 3.4
* @param TControl control element or element id
* @param array visual effect key-value pair options.
*/
- public function slideUp($element, $options=null)
+ public function blindDown($element, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->visualEffect('Effect.SlideUp', $element, $options);
+ $options['direction']='down';
+ $this->blind($element, $options);
}
/**
- * Visual Effect: Squish the element.
+ * Alias of blind(), presets the direction to 'up'
+ * @deprecated since 3.4
* @param TControl control element or element id
* @param array visual effect key-value pair options.
*/
- public function squish($element, $options=null)
+ public function blindUp($element, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->visualEffect('Effect.Squish', $element, $options);
+ $options['direction']='up';
+ $this->blind($element, $options);
}
/**
- * Visual Effect: Switch Off effect.
+ * Alias of drop()
+ * @deprecated since 3.4
* @param TControl control element or element id
* @param array visual effect key-value pair options.
*/
- public function switchOff($element, $options=null)
+ public function dropOut($element, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->visualEffect('Effect.SwitchOff', $element, $options);
+ $this->drop($element, $options);
}
/**
- * Visual Effect: High light the element for about 2 seconds.
+ * Alias of size()
+ * @deprecated since 3.4
* @param TControl control element or element id
* @param array visual effect key-value pair options.
*/
- public function highlight($element, $options=null)
+ public function grow($element, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $this->visualEffect('Prado.Effect.Highlight', $element, $options);
+ $this->size($element, $options);
}
/**
- * Set the opacity on a html element or control.
+ * Alias of scale()
+ * @deprecated since 3.4
* @param TControl control element or element id
- * @param float opacity value between 1 and 0
+ * @param array visual effect key-value pair options.
*/
- public function setOpacity($element, $value)
+ public function shrink($element, $options=array())
{
- if ($element instanceof ISurroundable)
- $element=$element->getSurroundingTagID();
- $value = TPropertyValue::ensureFloat($value);
- $this->callClientFunction('Element.setOpacity', array($element,$value));
+ $options['percent']=0;
+ $this->scale($element, $options);
}
+
+ /**
+ * Alias of scale()
+ * @deprecated since 3.4
+ * @param TControl control element or element id
+ * @param array visual effect key-value pair options.
+ */
+ public function squish($element, $options=array())
+ {
+ $options['origin']=array('top', 'left');
+ $options['percent']=0;
+ $this->scale($element, $options);
+ }
+
+ /**
+ * Alias of scale()
+ * @deprecated since 3.4
+ * @param TControl control element or element id
+ * @param array visual effect key-value pair options.
+ */
+ public function switchOff($element, $options=array())
+ {
+ $options['direction']='vertical';
+ $options['percent']=0;
+ $this->scale($element, $options);
+ }
+
}
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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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
*/