diff options
Diffstat (limited to 'framework/Web/UI/ActiveControls/TInPlaceTextBox.php')
| -rw-r--r-- | framework/Web/UI/ActiveControls/TInPlaceTextBox.php | 24 | 
1 files changed, 22 insertions, 2 deletions
| diff --git a/framework/Web/UI/ActiveControls/TInPlaceTextBox.php b/framework/Web/UI/ActiveControls/TInPlaceTextBox.php index 4c75aa2b..4bc70149 100644 --- a/framework/Web/UI/ActiveControls/TInPlaceTextBox.php +++ b/framework/Web/UI/ActiveControls/TInPlaceTextBox.php @@ -35,7 +35,10 @@ Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');   * After the callback request returns sucessfully, the textbox is enabled.
   * If the {@link setAutoHideTextBox AutoHideTextBox} property is true, then
   * the textbox will be hidden and the label is then shown.
 - *
 + * + * 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$
   * @package System.Web.UI.ActiveControls
 @@ -141,6 +144,21 @@ class TInPlaceTextBox extends TActiveTextBox  			$client->update($this->getLabelClientID(), $value);
  			$client->setValue($this, $value);
  		}
 +	} +	 +	/** +	 * Update ClientSide Readonly property +	 * @param boolean value +	 * @since 3.1.2 +	 */ +	public function setReadOnly ($value) +	{ +		$value=TPropertyValue::ensureBoolean($value); +		TTextBox::setReadOnly($value); +		if ($this->getActiveControl()->canUpdateClientSide()) +		{ +			$this->callClientFunction('setReadOnly', $value); +		}  	}
  	/**
 @@ -213,7 +231,9 @@ class TInPlaceTextBox extends TActiveTextBox  		}
  		if($this->hasEventHandler('OnLoadingText'))
 -			$options['LoadTextOnEdit'] = true;
 +			$options['LoadTextOnEdit'] = true; +			 +		$options['ReadOnly']=$this->getReadOnly();
  		return $options;
  	}
 | 
