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/active-controls | |
parent | 20dee7ffd329bb595c56b592c30b269b226fea5c (diff) |
Ported some tests to jQuery
Diffstat (limited to 'tests/FunctionalTests/active-controls')
-rwxr-xr-x | tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.page | 16 | ||||
-rwxr-xr-x | tests/FunctionalTests/active-controls/protected/pages/PostLoadingTest.page | 18 |
2 files changed, 14 insertions, 20 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 |