summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web')
-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);
}
/**