From 9e2820e98640f4ca262db7279a514826341df3e0 Mon Sep 17 00:00:00 2001
From: wei <>
Date: Sun, 8 Oct 2006 05:11:23 +0000
Subject: Fixed #414, #411, #415
---
.../protected/pages/RatingList.page | 40 +++++++++++---
.../active-controls/protected/pages/RatingList.php | 9 ++++
.../pages/RepeaterWithActiveControls.page | 61 ++++++++++++++++++++++
.../protected/pages/RepeaterWithActiveControls.php | 61 ++++++++++++++++++++++
4 files changed, 163 insertions(+), 8 deletions(-)
create mode 100644 tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.page
create mode 100644 tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.php
(limited to 'tests/FunctionalTests')
diff --git a/tests/FunctionalTests/active-controls/protected/pages/RatingList.page b/tests/FunctionalTests/active-controls/protected/pages/RatingList.page
index a615363b..f9be4aee 100644
--- a/tests/FunctionalTests/active-controls/protected/pages/RatingList.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/RatingList.page
@@ -15,13 +15,41 @@
{
background-position: 10px -90px;
}
+ .more td.rating_hover
+ {
+ background-position: 10px -290px;
+ }
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
@@ -58,7 +86,7 @@
-
+
@@ -76,10 +104,6 @@
Loading...
-
-
-
-
\ 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
index c6661182..98b62e04 100644
--- a/tests/FunctionalTests/active-controls/protected/pages/RatingList.php
+++ b/tests/FunctionalTests/active-controls/protected/pages/RatingList.php
@@ -3,6 +3,15 @@
class RatingList extends TPage
{
function list1_oncallback($sender, $param)
+ {
+ $newRating = ($sender->Rating + $sender->SelectedIndex+1)/2;
+ $sender->Rating = $newRating;
+ $sender->Caption = "Rating : ".$newRating;
+ $sender->Enabled=false;
+ }
+
+
+ function list2_oncallback($sender, $param)
{
}
diff --git a/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.page b/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.page
new file mode 100644
index 00000000..5847371f
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.page
@@ -0,0 +1,61 @@
+
+
+
+Repeater With Active Controls Tests
+
+
+
+ DataItem %>
+ OnTextChanged="Page.label_changed"
+ AutoHideTextBox="false"
+ CssClass="textbox" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.php b/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.php
new file mode 100644
index 00000000..c5235dc6
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/RepeaterWithActiveControls.php
@@ -0,0 +1,61 @@
+IsCallback)
+ {
+ $this->repeater1->DataSource = $this->_data;
+ $this->repeater1->dataBind();
+ }
+ }
+
+ public function label_changed($sender, $param)
+ {
+ $index = $sender->getParent()->ItemIndex + 1;
+ $this->_status .= " Update textbox {$index}: ".$sender->Text;
+ }
+
+ public function onPreRender($param)
+ {
+ parent::onPreRender($param);
+ if(trim($this->_status))
+ $this->label1->Text = $this->_status;
+ }
+
+ public function enable_edit($sender, $param)
+ {
+ if($this->update_button->Enabled==false)
+ {
+ for($i = 0; $irepeater1->Items); $i++)
+ {
+ $textbox = $this->repeater1->Items[$i]->edit_box;
+ $textbox->DisplayTextBox = true;
+ }
+ $this->update_button->Enabled = true;
+ $sender->Enabled=false;
+ }
+ }
+
+ public function disable_edit($sender, $param)
+ {
+ if($this->update_button->Enabled==true)
+ {
+ for($i = 0; $irepeater1->Items); $i++)
+ {
+ $textbox = $this->repeater1->Items[$i]->edit_box;
+ $textbox->DisplayTextBox = false;
+ }
+ $this->edit_button->Enabled = true;
+ $sender->Enabled=false;
+ }
+ }
+}
+
+?>
\ No newline at end of file
--
cgit v1.2.3