diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2014-02-10 09:41:31 +0100 |
---|---|---|
committer | Fabio Bas <ctrlaltca@gmail.com> | 2014-02-10 09:41:31 +0100 |
commit | f35d43399a9ce03f08ffa326812bc5ed6764ef9e (patch) | |
tree | a27b36d48835f584b10bb8fc5132309da1337c81 /tests/FunctionalTests | |
parent | 20dee7ffd329bb595c56b592c30b269b226fea5c (diff) |
Ported some tests to jQuery
Diffstat (limited to 'tests/FunctionalTests')
4 files changed, 24 insertions, 30 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page b/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page index a7875c0d..7551336d 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page +++ b/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page @@ -14,14 +14,12 @@ Click Me! </div> <com:TActiveLabel ID="label2" Text="Label 2" /> - <script type="text/javascript"> - Event.OnLoad(function() - { - Event.observe($("div1"), "click", function() - { - Prado.Callback("<%= $this->callback1->UniqueID %>") - }) - }) - </script> + <com:TClientScript> + jQuery( document ).ready(function() { + jQuery("#div1").click(function() { + Prado.Callback("<%= $this->callback1->UniqueID %>"); + }); + }); + </com:TClientScript> </com:TForm> diff --git a/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page b/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page index 885b368f..9ae1dca2 100755 --- a/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page @@ -8,15 +8,11 @@ <div id="div1" style="border:1px solid #666; background-color: #ffe; text-align: center; padding:3em">
Click Me!
</div>
-
- <script type="text/javascript">
- Event.OnLoad(function()
- {
- Event.observe($("div1"), "click", function()
- {
- Prado.Callback("<%= $this->callback1->UniqueID %>")
- })
- })
- </script>
-
+ <com:TClientScript>
+ jQuery( document ).ready(function() {
+ jQuery("#div1").click(function() {
+ Prado.Callback("<%= $this->callback1->UniqueID %>");
+ });
+ });
+ </com:TClientScript>
</com:TForm>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket785.page b/tests/FunctionalTests/tickets/protected/pages/Ticket785.page index 1b402a17..cd5a8783 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket785.page +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket785.page @@ -1,20 +1,20 @@ -<com:TContent ID="Content">
-<com:TDatePicker Id="datePicker" InputMode="DropDownList"> +<com:TContent ID="Content"> +<com:TDatePicker Id="datePicker" InputMode="DropDownList"> <prop:ClientSide.OnDateChanged> - $('selDate').innerHTML=parameter; - </prop:ClientSide.OnDateChanged> + $('#selDate').html(parameter); + </prop:ClientSide.OnDateChanged> </com:TDatePicker> <p> Client Side Selected date : <span id="selDate"></span> </p> -<com:TDatePicker Id="datePicker2" InputMode="TextBox" DateFormat="MM/dd/yyyy" Date="12/01/20007" > +<com:TDatePicker Id="datePicker2" InputMode="TextBox" DateFormat="MM/dd/yyyy" Date="12/01/20007" > <prop:ClientSide.OnDateChanged> - $('selDate2').innerHTML=parameter; - </prop:ClientSide.OnDateChanged> + $('#selDate2').html(parameter); + </prop:ClientSide.OnDateChanged> </com:TDatePicker> <p> Client Side Selected date : <span id="selDate2"></span> -</p>
+</p> </com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket897.php b/tests/FunctionalTests/tickets/protected/pages/Ticket897.php index 358572bc..ec39d1b7 100755 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket897.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket897.php @@ -1,8 +1,8 @@ <?php class Ticket897 extends TPage { - + public function onButtonClicked($sender, $param) { $this->Output->Text = date('Y-m-d', $this->Date->TimeStamp); } - + } |