summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/protected
diff options
context:
space:
mode:
authorwei <>2006-06-18 06:49:29 +0000
committerwei <>2006-06-18 06:49:29 +0000
commit2d88e84697fa4a36b7a2077b9e086aa2f9d3d67a (patch)
tree0c2c4e1cbe197018e264cf1de3ed6a2351771cfa /tests/FunctionalTests/active-controls/protected
parent313378ad2905fc07be00183b2acc61284c1c2c39 (diff)
Add ActiveCheckBox
Diffstat (limited to 'tests/FunctionalTests/active-controls/protected')
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page29
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.php32
2 files changed, 61 insertions, 0 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page
new file mode 100644
index 00000000..9ff09bb6
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page
@@ -0,0 +1,29 @@
+<com:TForm ID="form1">
+ <h1>Active CheckBox Test</h1>
+ <com:TActiveCheckBox ID="checkbox1" Text="CheckBox 1" OnCallback="checkbox_requested" />
+ <com:TActiveCheckBox ID="checkbox2" Text="CheckBox 2" OnCallback="checkbox_requested">
+ <prop:ActiveControl.ClientSide OnLoading="$('status').show()" OnComplete="$('status').hide()" />
+ </com:TActiveCheckBox>
+ <div style="margin:1em; padding:0.5em; text-align:center; border:1px solid #ccc;">
+ <com:TActiveLabel ID="label1" Text="Label 1" />
+ </div>
+ <div style="margin:1em; padding: 1em; text-align: center">
+ <com:TActiveButton id="change_text1"
+ OnClick="change_checkbox1_text" Text="Change CheckBox 1 Text"/>
+ <com:TActiveButton id="change_checked1"
+ OnClick="change_checkbox1_checked" Text="Toggle CheckBox 1"/>
+
+ <com:TActiveButton id="change_text2"
+ OnClick="change_checkbox2_text" Text="Change CheckBox 2 Text"/>
+ <com:TActiveButton id="change_checked2"
+ OnClick="change_checkbox2_checked" Text="Toggle CheckBox 2"/>
+ </div>
+ <div id="status" style="margin:1em; padding:0.5em;
+ text-align:center;
+ background-color:#900;
+ color:white; display: none;
+ position: absolute; right: 0; top: 0">
+ Loading...
+ </div>
+ <com:TJavascriptLogger />
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.php
new file mode 100644
index 00000000..d762ab28
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.php
@@ -0,0 +1,32 @@
+<?php
+
+class ActiveCheckBoxTest extends TPage
+{
+ function change_checkbox1_text()
+ {
+ $this->checkbox1->Text = "Hello CheckBox 1";
+ }
+
+ function change_checkbox1_checked()
+ {
+ $this->checkbox1->Checked = !$this->checkbox1->Checked;
+ }
+
+ function change_checkbox2_text()
+ {
+ $this->checkbox2->Text = "CheckBox 2 World";
+ }
+
+ function change_checkbox2_checked()
+ {
+ $this->checkbox2->Checked = !$this->checkbox2->Checked;
+ }
+
+ function checkbox_requested($sender, $param)
+ {
+ $this->label1->Text = "Label 1:".$sender->Text.
+ ($sender->checked ? ' Checked ' : ' Not Checked');
+ }
+}
+
+?> \ No newline at end of file