diff options
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | framework/Web/UI/TPage.php | 19 |
2 files changed, 15 insertions, 5 deletions
@@ -29,6 +29,7 @@ ENH: Ticket#519 - Update TActiveRecord implementation (Wei) ENH: Ticket#537 - TActiveRecord Pk info ENH [usage: http://trac.pradosoft.com/prado/ticket/537] (Wei) ENH: Ticket#561 - Powered by PRADO image to become an asset (Qiang) ENH: Ticket#569 - Added TTextBox.PersistPassword property (Qiang) +ENH: Ticket#571 - Made TPage.ClientSupportsJavaScript property writable (Qiang) ENH: Added PRADO_CHMOD constant so that users can specify the permission of PRADO-created directories (Qiang) ENH: Added Display property to TWebControl (Wei) ENH: Added TUser.getState() and setState() for storing user session data (Qiang) diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php index 96ac6d36..59a3e859 100644 --- a/framework/Web/UI/TPage.php +++ b/framework/Web/UI/TPage.php @@ -157,6 +157,10 @@ class TPage extends TTemplateControl * @var boolean true if loading post data.
*/
private $_isLoadingPostData=false;
+ /**
+ * @var boolean whether client supports javascript
+ */
+ private $_enableJavaScript=true;
/**
* Constructor.
@@ -953,14 +957,19 @@ class TPage extends TTemplateControl }
/**
- * @return boolean whether client supports javascript. Currently, this
- * method always returns true. If future, we may add some browser capability
- * detection functionality.
+ * @return boolean whether client supports javascript. Defaults to true.
*/
public function getClientSupportsJavaScript()
{
- // todo
- return true;
+ return $this->_enableJavaScript;
+ }
+
+ /**
+ * @param boolean whether client supports javascript. If false, javascript will not be generated for controls.
+ */
+ public function setClientSupportsJavaScript($value)
+ {
+ $this->_enableJavaScript=TPropertyValue::ensureBoolean($value);
}
/**
|