[Jifty-commit] r1468 - in jifty/trunk: lib/Jifty

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Mon Jul 3 23:05:14 EDT 2006

Author: jesse
Date: Mon Jul  3 23:05:14 2006
New Revision: 1468

   jifty/trunk/   (props changed)

 r13410 at pinglin:  jesse | 2006-07-03 23:04:28 -0400
 * Bart Bunting provided docs for how to include your own javascript libs

Modified: jifty/trunk/lib/Jifty/Web.pm
--- jifty/trunk/lib/Jifty/Web.pm	(original)
+++ jifty/trunk/lib/Jifty/Web.pm	Mon Jul  3 23:05:14 2006
@@ -923,6 +923,31 @@
 Returns a C<< <script> >> tag for the compressed Javascript.
+Your application specific javascript goes in
+F<share/web/static/js/app.js>.  This will be automagically included if
+it exists.
+If you want to add javascript behaviour to your page using CSS
+selectors then put your behaviour rules in
+F<share/web/static/js/app_behaviour.js> which will also be
+automagically included if it exists.  The C<behaviour.js> library is
+included by Jifty.  For more information on C<behaviour.js> see
+However if you want to include other javascript libraries you need to
+add them to the javascript_libs array of your application.  Do this in
+the C<start> sub of your main application class.  For example if your application is Foo then in L<lib/Foo.pm>
+ sub start {
+   Jifty->web->javascript_libs([
+ 			       @{ Jifty->web->javascript_libs },
+ 			       "yourJavascriptLib.js",
+ 			      ]);
+ }
+Jifty will look for javascript libraries under share/web/static/js/ by
 sub include_javascript {

More information about the Jifty-commit mailing list