summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls
diff options
context:
space:
mode:
authorwei <>2006-10-01 03:09:18 +0000
committerwei <>2006-10-01 03:09:18 +0000
commit36f2ce766bde98c11d57b889fd9e1a7f8dff6010 (patch)
tree87c33c9e4447e20159932824b4de6167da495d49 /tests/FunctionalTests/active-controls
parent1c32172efb18e8d08ea483e2460813670ebfe1a5 (diff)
Fixed #350 and #148, Add TActiveRatingList, should remove TRatingList from WebControls.
Diffstat (limited to 'tests/FunctionalTests/active-controls')
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/RatingList.page72
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/RatingList.php22
2 files changed, 94 insertions, 0 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/RatingList.page b/tests/FunctionalTests/active-controls/protected/pages/RatingList.page
new file mode 100644
index 00000000..190e6020
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/RatingList.page
@@ -0,0 +1,72 @@
+<com:THead/>
+<com:TForm>
+<style>
+ body
+ {
+ background-color: pink
+ }
+</style>
+<com:TLabel ID="label1" Text="Rate It:" />
+<com:TActiveRatingList ID="list1" CaptionID="label1" RatingStyle="blocks" OnCallback="list1_oncallback">
+ <com:TListItem Text="1 Star" />
+ <com:TListItem Text="2 Star" />
+ <com:TListItem Text="3 Star" />
+ <com:TListItem Text="4 Star" />
+ <com:TListItem Text="5 Star" />
+ <prop:ActiveControl.ClientSide
+ OnLoading="Element.show('status')"
+ OnComplete="Element.hide('status')" />
+</com:TActiveRatingList>
+
+
+<com:TActiveRatingList ID="list2" Rating="3.5" RatingStyle="blocks" ReadOnly="true">
+ <com:TListItem Text="1 Star" />
+ <com:TListItem Text="2 Star" />
+ <com:TListItem Text="3 Star" />
+ <com:TListItem Text="4 Star" />
+ <com:TListItem Text="5 Star" />
+</com:TActiveRatingList>
+
+<br />
+
+<com:TActiveRatingList RepeatColumns="5">
+ <com:TListItem Text="1 Star" />
+ <com:TListItem Text="2 Star" />
+ <com:TListItem Text="3 Star" />
+ <com:TListItem Text="4 Star" />
+ <com:TListItem Text="5 Star" />
+ <com:TListItem Text="6 Star" />
+ <com:TListItem Text="7 Star" />
+ <com:TListItem Text="8 Star" />
+ <com:TListItem Text="9 Star" />
+ <com:TListItem Text="10 Star" />
+ <prop:ActiveControl.ClientSide
+ OnLoading="Element.show('status')"
+ OnComplete="Element.hide('status')" />
+</com:TActiveRatingList>
+
+
+<com:TActiveRatingList ID="list3" Rating="3.5" ReadOnly="true">
+ <com:TListItem Text="1 Star" />
+ <com:TListItem Text="2 Star" />
+ <com:TListItem Text="3 Star" />
+ <com:TListItem Text="4 Star" />
+ <com:TListItem Text="5 Star" />
+</com:TActiveRatingList>
+
+<br />
+
+ <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:TActiveButton ID="button1" Text="Enable List" OnClick="button1_clicked" />
+<com:TActiveButton ID="button2" Text="Set Index 3" OnClick="button2_clicked" />
+
+<com:TJavascriptLogger />
+
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/RatingList.php b/tests/FunctionalTests/active-controls/protected/pages/RatingList.php
new file mode 100644
index 00000000..d31b6166
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/RatingList.php
@@ -0,0 +1,22 @@
+<?php
+
+class RatingList extends TPage
+{
+ function list1_oncallback($sender, $param)
+ {
+ $sender->Enabled=false;
+ }
+
+ function button1_clicked($sender, $param)
+ {
+ $this->list1->Enabled = true;
+ }
+
+ function button2_clicked($sender, $param)
+ {
+ $this->list1->SelectedIndex=3;
+ $this->list1->Enabled=false;
+ }
+}
+
+?> \ No newline at end of file