[jifty-devel] updated Web.pm patch

bart bunting bart at bunting.net.au
Sat Jun 24 22:17:31 EDT 2006

Below is my updated doc patch to Web.pm. 

It now describes app_behaviour.js and has a pointer to a web page
describing the behaviour.js library.

Again if someone can have a squiz to see that what I'm saying is
correct that'd be appreciated.



Index: jifty/trunk/lib/Jifty/Web.pm
--- jifty/trunk/lib/Jifty/Web.pm	(revision 1360)
+++ jifty/trunk/lib/Jifty/Web.pm	(working copy)
@@ -989,6 +989,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-devel mailing list