summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwei <>2007-03-26 07:40:53 +0000
committerwei <>2007-03-26 07:40:53 +0000
commitfb29e39241b47fee99a17fab73447b9e23eabd83 (patch)
treeba567d674a9d11018600824da3d0fcf1300e5c6b
parentbd0116cd205fea7d71849625352ac8a9adf7d14f (diff)
update tests for radio button, update ajax3.js (null post values are ignored)
-rw-r--r--.gitattributes1
-rw-r--r--demos/quickstart/protected/pages/Tutorial/AddressBook.page9
-rw-r--r--framework/Web/Javascripts/prado/ajax3.js2
-rw-r--r--framework/Web/UI/ActiveControls/TActiveRadioButtonList.php1
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.php1
-rw-r--r--tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php4
6 files changed, 16 insertions, 2 deletions
diff --git a/.gitattributes b/.gitattributes
index 403b6594..d001a74e 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1230,6 +1230,7 @@ demos/quickstart/protected/pages/GettingStarted/zh/Introduction.page -text
demos/quickstart/protected/pages/Search.page -text
demos/quickstart/protected/pages/Search.php -text
demos/quickstart/protected/pages/Services/SoapService.page -text
+demos/quickstart/protected/pages/Tutorial/AddressBook.page -text
demos/quickstart/protected/pages/Tutorial/AjaxChat.page -text
demos/quickstart/protected/pages/Tutorial/CurrencyConverter.page -text
demos/quickstart/protected/pages/Tutorial/chat1.png -text
diff --git a/demos/quickstart/protected/pages/Tutorial/AddressBook.page b/demos/quickstart/protected/pages/Tutorial/AddressBook.page
new file mode 100644
index 00000000..896521b1
--- /dev/null
+++ b/demos/quickstart/protected/pages/Tutorial/AddressBook.page
@@ -0,0 +1,9 @@
+<com:TContent ID="body">
+ <h1>A Simple Address Book</h1>
+ <p>This tutorial introduces the basics of connecting to a database
+ using <a href="?page=Database.ActiveRecord">ActiveRecord</a>
+ and using <a href="?page=Database.Scaffold">Active Record scaffolds </a>to quickly
+ build a simple address book.
+ </p>
+
+</com:TContent> \ No newline at end of file
diff --git a/framework/Web/Javascripts/prado/ajax3.js b/framework/Web/Javascripts/prado/ajax3.js
index f6bb048f..51d0186b 100644
--- a/framework/Web/Javascripts/prado/ajax3.js
+++ b/framework/Web/Javascripts/prado/ajax3.js
@@ -610,7 +610,7 @@ Prado.CallbackRequest.prototype =
if(element.type && element.name == name)
{
value = $F(element);
- if(typeof(value) != "undefined")
+ if(typeof(value) != "undefined" && value != null)
data[name] = value;
}
})
diff --git a/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php b/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php
index 0eb3f83a..6e3fef6f 100644
--- a/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php
+++ b/framework/Web/UI/ActiveControls/TActiveRadioButtonList.php
@@ -95,6 +95,7 @@ class TActiveRadioButtonList extends TRadioButtonList implements IActiveControl,
*/
public function raiseCallbackEvent($param)
{
+ var_dump($_POST);
$this->onCallback($param);
}
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.php
index 930d671b..ee805e11 100644
--- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.php
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonListTest.php
@@ -5,6 +5,7 @@ class ActiveRadioButtonListTest extends TPage
function list1_callback($sender, $param)
{
$values = $sender->getSelectedValues();
+ var_dump($values);
$this->label1->setText("Selection: ".implode(', ', $values));
}
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php
index 44435199..5899a6ba 100644
--- a/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveDropDownListTestCase.php
@@ -23,8 +23,10 @@ class ActiveDropDownListTestCase extends SeleniumTestCase
// due to clearing selection and then updating the selection
// otherwise it should not fire the changed event (fired by js because of change to options).
- $this->assertText("label1", "Selection 1: value 1");
+ $this->assertText("label1", "Label 1");
+ $this->select("list1", "item 1");
+ $this->pause(800);
$this->select("list2", "value 1 - item 4");
$this->pause(800);
$this->assertText("label1", "Selection 2: value 1 - item 4");