diff options
author | wei <> | 2006-10-06 03:46:05 +0000 |
---|---|---|
committer | wei <> | 2006-10-06 03:46:05 +0000 |
commit | fe60cc221f922ea362826e2d00431c5df28fe85f (patch) | |
tree | 9c0449718a862a5b51d62c4ac9697db15c13863f /tests/FunctionalTests/active-controls/protected | |
parent | 9fee2935d91e92235b068632d3608c748ef41bfe (diff) |
fixed #410 #412
Diffstat (limited to 'tests/FunctionalTests/active-controls/protected')
10 files changed, 86 insertions, 68 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page index 9ff09bb6..431d42f2 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveCheckBoxTest.page @@ -2,25 +2,25 @@ <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()" /> + <prop: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" + <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" + <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; + <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... diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.page index c5c40c44..2bb4c9de 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRadioButtonTest.page @@ -6,7 +6,7 @@ <com:TActiveRadioButton ID="radio2"
GroupName="group1" Text="Radio Button 2"
OnCallback="radiobutton_requested">
- <prop:ActiveControl.ClientSide OnLoading="$('status').show()" OnComplete="$('status').hide()" />
+ <prop:ClientSide OnLoading="$('status').show()" OnComplete="$('status').hide()" />
</com:TActiveRadioButton>
<com:TActiveRadioButton ID="radio3"
Text="Radio Button 3"
diff --git a/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page b/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page index b7429c60..6d2168be 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.page @@ -1,5 +1,5 @@ <com:TForm ID="form1"> - + <style> .autocomplete { @@ -15,8 +15,8 @@ font-family: Tahoma, Arial, Helvetica, sans-serif; color: #333; } - - ul.different + + ul.different { background-color: pink; } @@ -31,31 +31,34 @@ background-color: #ffc; } </style> - + <h1 id="heading">TAutoComplete Test</h1> <div><strong>Manual Testing Required</strong></div> - + <com:TAutoComplete Style="width: 20em" ID="textbox1" OnSuggest="suggestCountries" - Separator=", " + Separator=", " ResultPanel.CssClass="autocomplete" /> <com:TAutoComplete Style="width: 30em; height: 20em" TextMode="MultiLine" + ID="textbox2" OnSuggest="suggestCountries" - Separator=", \n" + OnCallback="callback_requested" + AutoPostBack="true" + Separator=", \n" ResultPanel.CssClass="autocomplete"> <prop:Suggestions.HeaderTemplate> <ul class="different"> </prop:Suggestions.HeaderTemplate> </com:TAutoComplete> - + <com:TAutoComplete Style="width: 20em" id="textbox3" OnSuggest="suggestCountries" OnCallback="callback_requested" Separator=", " AutoPostBack="true" - ResultPanel.CssClass="autocomplete" /> + ResultPanel.CssClass="autocomplete" /> <p><br /></p> <com:TActiveLabel ID="label1" Text="Label 1" /> diff --git a/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.php b/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.php index 997e9bdd..dbce7531 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.php @@ -15,7 +15,7 @@ class AutoCompleteTest extends TPage public function callback_requested($sender, $param) { - $this->label1->Text = "Label 1: ".$this->textbox3->Text; + $this->label1->Text = "Label 1: ".$sender->Text; } protected function matchCountries($token) diff --git a/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.page b/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.page index 2af4b3c8..ae1fe3d2 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.page @@ -24,10 +24,9 @@ ErrorMessage="*"
ControlCssClass="required"
OnServerValidate="validate_text1">
- <prop:ClientSide
- OnError="$('status').innerHTML='Error '+(new Date())"
- OnSuccess="$('status').innerHTML='Success '+(new Date())" />
- <prop:ActiveControl.ClientSide
+ <prop:ClientSide
+ OnError="$('status').innerHTML='Error '+(new Date())"
+ OnSuccess="$('status').innerHTML='Success '+(new Date())"
OnLoading="Element.show('loader')"
OnComplete="Element.hide('loader')" />
</com:TActiveCustomValidator>
diff --git a/tests/FunctionalTests/active-controls/protected/pages/CallbackOptionsTest.page b/tests/FunctionalTests/active-controls/protected/pages/CallbackOptionsTest.page index 6e8b8a1e..3cecbade 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/CallbackOptionsTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/CallbackOptionsTest.page @@ -1,6 +1,6 @@ <com:TForm ID="form1"> <h1>TCallbackOptions Test</h1> - + <com:TCallbackOptions ID="options1"> <prop:ClientSide.OnLoading> $("status").show(); @@ -12,23 +12,23 @@ Element.update("label1", "Button 1 has returned"); </prop:ClientSide.OnSuccess> </com:TCallbackOptions> - + <com:TActiveButton id="button1" Text="Button 1" ActiveControl.CallbackOptions="options1" /> <com:TActiveButton id="button2" Text="Button 2" ActiveControl.CallbackOptions="options1"> - <prop:ActiveControl.ClientSide.OnSuccess> + <prop:ClientSide.OnSuccess> Element.update("label2", "Button 2 has returned"); - </prop:ActiveControl.ClientSide.OnSuccess> + </prop:ClientSide.OnSuccess> </com:TActiveButton> <com:TActiveButton id="button3" Text="Button 3"> - <prop:ActiveControl.ClientSide.OnSuccess> + <prop:ClientSide.OnSuccess> Element.update("label3", "Button 3 has returned"); - </prop:ActiveControl.ClientSide.OnSuccess> + </prop:ClientSide.OnSuccess> </com:TActiveButton> - + <div id="label1">Label 1</div> <div id="label2">Label 2</div> <div id="label3">Label 3</div> <div id="status" style="display:none; background-color: #c00; color:white; text-align:center; padding: 1em" > - Loading... + Loading... </div> </com:TForm>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/RatingList.page b/tests/FunctionalTests/active-controls/protected/pages/RatingList.page index 190e6020..a615363b 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/RatingList.page +++ b/tests/FunctionalTests/active-controls/protected/pages/RatingList.page @@ -1,57 +1,69 @@ <com:THead/>
<com:TForm>
<style>
- body
+ .more td
{
- background-color: pink
+ border: 1px solid #eee;
+ width: 40px;
+ height: 40px;
+ }
+ .more td.rating
+ {
+ background-position: 10px 10px;
+ }
+ .more td.rating_selected
+ {
+ background-position: 10px -90px;
}
</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
+ <com:TListItem Text="1 Block" />
+ <com:TListItem Text="2 Blocks" />
+ <com:TListItem Text="3 Blocks" />
+ <com:TListItem Text="4 Blocks" />
+ <com:TListItem Text="5 Blocks" />
+ <prop:ClientSide
OnLoading="Element.show('status')"
OnComplete="Element.hide('status')" />
</com:TActiveRatingList>
+<br />
-<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 ID="list2" Rating="3.5"
+ Attributes.title="3.5 Blocks" RatingStyle="blocks" ReadOnly="true">
+ <com:TListItem Text="1 Block" />
+ <com:TListItem Text="2 Blocks" />
+ <com:TListItem Text="3 Blocks" />
+ <com:TListItem Text="4 Blocks" />
+ <com:TListItem Text="5 Blocks" />
</com:TActiveRatingList>
<br />
-<com:TActiveRatingList RepeatColumns="5">
+<com:TActiveRatingList CssClass="more" RepeatColumns="2" RepeatDirection="Vertical">
<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
+ <com:TListItem Text="2 Stars" />
+ <com:TListItem Text="3 Stars" />
+ <com:TListItem Text="4 Stars" />
+ <com:TListItem Text="5 Stars" />
+ <com:TListItem Text="6 Stars" />
+ <com:TListItem Text="7 Stars" />
+ <com:TListItem Text="8 Stars" />
+ <com:TListItem Text="9 Stars" />
+ <com:TListItem Text="10 Stars" />
+ <prop:ClientSide
OnLoading="Element.show('status')"
OnComplete="Element.hide('status')" />
</com:TActiveRatingList>
+<br />
-
-<com:TActiveRatingList ID="list3" Rating="3.5" ReadOnly="true">
+<com:TActiveRatingList ID="list3" Rating="3.5" Attributes.title="3.5 Stars" 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:TListItem Text="2 Stars" />
+ <com:TListItem Text="3 Stars" />
+ <com:TListItem Text="4 Stars" />
+ <com:TListItem Text="5 Stars" />
</com:TActiveRatingList>
<br />
@@ -64,8 +76,9 @@ Loading...
</div>
-<com:TActiveButton ID="button1" Text="Enable List" OnClick="button1_clicked" />
-<com:TActiveButton ID="button2" Text="Set Index 3" OnClick="button2_clicked" />
+<com:TActiveButton ID="button1" Text="Enable" OnClick="button1_clicked" />
+<com:TActiveButton ID="button2" Text="Disable" OnClick="button2_clicked" />
+<com:TActiveButton ID="button5" Text="Index=3" OnClick="button5_clicked" />
<com:TJavascriptLogger />
diff --git a/tests/FunctionalTests/active-controls/protected/pages/RatingList.php b/tests/FunctionalTests/active-controls/protected/pages/RatingList.php index d31b6166..c6661182 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/RatingList.php +++ b/tests/FunctionalTests/active-controls/protected/pages/RatingList.php @@ -4,7 +4,6 @@ class RatingList extends TPage {
function list1_oncallback($sender, $param)
{
- $sender->Enabled=false;
}
function button1_clicked($sender, $param)
@@ -14,9 +13,13 @@ class RatingList extends TPage function button2_clicked($sender, $param)
{
- $this->list1->SelectedIndex=3;
$this->list1->Enabled=false;
}
+
+ function button5_clicked($sender, $param)
+ {
+ $this->list1->SelectedIndex=3;
+ }
}
?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.page b/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.page index 7010ca0f..cf43dea6 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/TInPlaceTextBoxTest.page @@ -43,9 +43,9 @@ EditTriggerControlID="link1"
CssClass="textbox"
Text="Label 1">
- <prop:ActiveControl.ClientSide
- OnLoading="Element.show('loader')"
- OnComplete="Element.hide('loader')" />
+ <prop:ClientSide
+ OnLoading="$('loader').show()"
+ OnComplete="$('loader').hide()" />
</com:TInPlaceTextBox>
<com:TRequiredFieldValidator
diff --git a/tests/FunctionalTests/active-controls/protected/pages/TimeTriggeredCallbackTest.page b/tests/FunctionalTests/active-controls/protected/pages/TimeTriggeredCallbackTest.page index 36b3bc05..f7515a36 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/TimeTriggeredCallbackTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/TimeTriggeredCallbackTest.page @@ -6,7 +6,7 @@ <com:TActiveLabel ID="label1" Text="ViewState Counter : " /> </div> <com:TTimeTriggeredCallback ID="timer1" Interval="0.1" OnCallback="tick"> - <prop:ActiveControl.ClientSide + <prop:ClientSide OnLoading="$('status').show()" OnComplete="$('status').hide()" /> </com:TTimeTriggeredCallback> |