diff options
4 files changed, 36 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes index 7230ab10..08d569a4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -614,6 +614,9 @@ tests/FunctionalTests/protected/pages/I18N/BasicI18N.page -text tests/FunctionalTests/protected/pages/I18N/BasicI18N.php -text tests/FunctionalTests/protected/pages/Layout.php -text tests/FunctionalTests/protected/pages/Layout.tpl -text +tests/FunctionalTests/protected/pages/UI/DatePicker.page -text +tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.page -text +tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.php -text tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.page -text tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.php -text tests/FunctionalTests/protected/pages/ViewSource.page -text diff --git a/tests/FunctionalTests/protected/pages/UI/DatePicker.page b/tests/FunctionalTests/protected/pages/UI/DatePicker.page new file mode 100644 index 00000000..7208a76b --- /dev/null +++ b/tests/FunctionalTests/protected/pages/UI/DatePicker.page @@ -0,0 +1,7 @@ +<com:TContent ID="Content">
+<com:TForm>
+ <com:TDatePicker Mode="Button" />
+ <p>aaaa<br />aaaa<br />aaaa<br />aaaa<br />aaaa<br /></p>
+ <com:TDatePicker />
+</com:TForm>
+</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.page b/tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.page new file mode 100644 index 00000000..7585bdbc --- /dev/null +++ b/tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.page @@ -0,0 +1,15 @@ +<com:TContent ID="Content">
+<com:TForm>
+ <com:TPanel DefaultButton="Button2" Width="400px">
+ This is panel content with a <com:TLabel Text="label" Font.Italic="true" />
+ and two buttons: <br/>
+ <com:TButton ID="Button1" Text="button1" Click="buttonClicked" />
+ <com:TButton ID="Button2" Text="button2" Click="buttonClicked" />
+ <com:TLabel ID="Result" ForeColor="red" />
+ <br/>
+ When you change focus to the panel and hit 'enter' key, <tt>button2</tt>
+ will be clicked because it is set as the default button of the panel.
+ </com:TPanel>
+ <com:TJavascriptLogger />
+</com:TForm>
+</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.php b/tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.php new file mode 100644 index 00000000..bc88dc00 --- /dev/null +++ b/tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.php @@ -0,0 +1,11 @@ +<?php
+
+class TestTPanelDefaultButton extends TPage
+{
+ public function buttonClicked($sender,$param)
+ {
+ $this->Result->Text="You have clicked on '$sender->Text'.";
+ }
+}
+
+?>
\ No newline at end of file |