[Jifty-commit] r4885 -
jifty/branches/jquery/t/TestApp-JiftyJS/lib/TestApp/JiftyJS
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Fri Jan 18 11:55:00 EST 2008
Author: gugod
Date: Fri Jan 18 11:55:00 2008
New Revision: 4885
Modified:
jifty/branches/jquery/t/TestApp-JiftyJS/lib/TestApp/JiftyJS/View.pm
Log:
Add tests for effects.
Modified: jifty/branches/jquery/t/TestApp-JiftyJS/lib/TestApp/JiftyJS/View.pm
==============================================================================
--- jifty/branches/jquery/t/TestApp-JiftyJS/lib/TestApp/JiftyJS/View.pm (original)
+++ jifty/branches/jquery/t/TestApp-JiftyJS/lib/TestApp/JiftyJS/View.pm Fri Jan 18 11:55:00 2008
@@ -166,5 +166,53 @@
};
};
+template '/effects' => page {
+ h1 { "Jifty.update() tests with effects" };
+
+ for (qw(Appear SlideDown)) {
+ hyperlink(
+ label => "Append ($_)",
+ onclick => {
+ append => 'hello_world',
+ region => 'content',
+ args => {
+ name => "Append with effect $_"
+ },
+ effect => $_,
+ effect_args => "slow"
+ }
+ );
+ outs_raw(" ");
+
+ hyperlink(
+ label => "Prepend ($_)",
+ onclick => {
+ prepend => 'hello_world',
+ region => 'content',
+ args => {
+ name => "Prepend with effect $_"
+ },
+ effect => $_,
+ effect_args => "slow"
+ }
+ );
+
+ outs_raw(" | ");
+ }
+
+
+ hyperlink(
+ label => "Clear Region",
+ onclick => {
+ region => "content",
+ replace_with => "/__jifty/empty"
+ }
+ );
+
+ hr {};
+
+ render_region( name => 'content' );
+};
+
1;
More information about the Jifty-commit
mailing list