summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--framework/Web/UI/ActiveControls/TActiveCheckBox.php8
-rw-r--r--framework/Web/UI/ActiveControls/TActiveDropDownList.php5
-rw-r--r--framework/Web/UI/ActiveControls/TActiveListBox.php5
-rw-r--r--framework/Web/UI/ActiveControls/TActiveRadioButton.php7
5 files changed, 18 insertions, 8 deletions
diff --git a/HISTORY b/HISTORY
index 9eef2203..9c367538 100644
--- a/HISTORY
+++ b/HISTORY
@@ -9,6 +9,7 @@ BUG: TActiveLinkButton and TActiveRadioButtonList crashes if it's the only activ
BUG: TUrlMapping encoded extra parameters twice (Michael)
BUG: Issue#89 - TActiveFileUpload doesn't work (Carl)
CHG: Removal of generator meta tag in THead
+ENH: TActiveCheckBox, TActiveRadioButton, TActiveDropDownList, TActiveListBox won't raise callback if AutoPostBack is false (Christophe)
ENH: Issue#36 - Refactored TRatingList/TActiveRatingList, and added some docs (Bradley)
ENH: Issue#52 - Upgraded to TinyMCE 3.2.1
ENH: Issue#72 - Add wildcard support to TUrlMapping (friendly-urls) (Michael)
diff --git a/framework/Web/UI/ActiveControls/TActiveCheckBox.php b/framework/Web/UI/ActiveControls/TActiveCheckBox.php
index 55244372..3e078876 100644
--- a/framework/Web/UI/ActiveControls/TActiveCheckBox.php
+++ b/framework/Web/UI/ActiveControls/TActiveCheckBox.php
@@ -121,6 +121,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
@@ -128,8 +131,9 @@ class TActiveCheckBox extends TCheckBox implements ICallbackEventHandler, IActiv
protected function renderInputTag($writer,$clientID,$onclick)
{
parent::renderInputTag($writer,$clientID,$onclick);
- $this->getActiveControl()->registerCallbackClientScript(
- $this->getClientClassName(), $this->getPostBackOptions());
+ if ($this->getAutoPostBack())
+ $this->getActiveControl()->registerCallbackClientScript(
+ $this->getClientClassName(), $this->getPostBackOptions());
}
/**
diff --git a/framework/Web/UI/ActiveControls/TActiveDropDownList.php b/framework/Web/UI/ActiveControls/TActiveDropDownList.php
index e66b4cbd..c9458494 100644
--- a/framework/Web/UI/ActiveControls/TActiveDropDownList.php
+++ b/framework/Web/UI/ActiveControls/TActiveDropDownList.php
@@ -105,8 +105,9 @@ class TActiveDropDownList extends TDropDownList implements ICallbackEventHandler
{
parent::addAttributesToRender($writer);
$writer->addAttribute('id',$this->getClientID());
- $this->getActiveControl()->registerCallbackClientScript(
- $this->getClientClassName(), $this->getPostBackOptions());
+ if ($this->getAutoPostBack())
+ $this->getActiveControl()->registerCallbackClientScript(
+ $this->getClientClassName(), $this->getPostBackOptions());
}
/**
diff --git a/framework/Web/UI/ActiveControls/TActiveListBox.php b/framework/Web/UI/ActiveControls/TActiveListBox.php
index 3deb9a0f..29857ee5 100644
--- a/framework/Web/UI/ActiveControls/TActiveListBox.php
+++ b/framework/Web/UI/ActiveControls/TActiveListBox.php
@@ -149,8 +149,9 @@ class TActiveListBox extends TListBox implements IActiveControl, ICallbackEventH
{
parent::addAttributesToRender($writer);
$writer->addAttribute('id',$this->getClientID());
- $this->getActiveControl()->registerCallbackClientScript(
- $this->getClientClassName(), $this->getPostBackOptions());
+ if ($this->getAutoPostBack())
+ $this->getActiveControl()->registerCallbackClientScript(
+ $this->getClientClassName(), $this->getPostBackOptions());
}
}
diff --git a/framework/Web/UI/ActiveControls/TActiveRadioButton.php b/framework/Web/UI/ActiveControls/TActiveRadioButton.php
index f7e9a286..8e2195d3 100644
--- a/framework/Web/UI/ActiveControls/TActiveRadioButton.php
+++ b/framework/Web/UI/ActiveControls/TActiveRadioButton.php
@@ -120,12 +120,15 @@ 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)
{
parent::renderInputTag($writer,$clientID,$onclick);
- $this->getActiveControl()->registerCallbackClientScript(
- $this->getClientClassName(), $this->getPostBackOptions());
+ if ($this->getAutoPostBack())
+ $this->getActiveControl()->registerCallbackClientScript(
+ $this->getClientClassName(), $this->getPostBackOptions());
}
/**