summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TPage.php
diff options
context:
space:
mode:
authorxue <>2007-03-31 13:48:42 +0000
committerxue <>2007-03-31 13:48:42 +0000
commit9bd22d04bfc3f78e4f29fdec2fab3c7a3c27de9a (patch)
tree019d7ad0316e9f34ce11a2fa98ee7254e88783da /framework/Web/UI/TPage.php
parentce428db89f1f3ac5ff1b9b519522aa4701c9c4ad (diff)
Fixed #571.
Diffstat (limited to 'framework/Web/UI/TPage.php')
-rw-r--r--framework/Web/UI/TPage.php19
1 files changed, 14 insertions, 5 deletions
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);
}
/**