/[Frey]/branches/zimbardo/lib/Frey/jQuery.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /branches/zimbardo/lib/Frey/jQuery.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1172 - (hide annotations)
Sun Jul 5 21:40:16 2009 UTC (14 years, 10 months ago) by dpavlin
File size: 682 byte(s)
branch for localisation

1 dpavlin 763 package Frey::jQuery;
2     use Moose::Role;
3    
4 dpavlin 908 has jquery_path => (
5     is => 'rw',
6     default => 'static/js/jquery/jquery-1.2.6.js',
7     );
8    
9     =head2 depends
10    
11     Load C<jquery> and our log extension from local filesystem
12     or from google hosted jquery
13    
14     =cut
15    
16 dpavlin 763 sub depends {
17     my ($self) = @_;
18     warn "# depends";
19 dpavlin 908 if ( -e $self->jquery_path ) {
20     $self->add_js( $self->jquery_path );
21     } else {
22     $self->add_js( 'http://www.google.com/jsapi' );
23     $self->add_js(q|
24     google.load("jquery", "1");
25     google.setOnLoadCallback(function(){
26     console.log('jquery loaded');
27     });
28     |);
29     }
30 dpavlin 843 $self->add_js ( 'static/Frey/jQuery/log.js' );
31     $self->add_css( 'static/Frey/jQuery/log.css' );
32 dpavlin 763 }
33    
34 dpavlin 1133 no Moose::Role;
35    
36 dpavlin 763 1;

  ViewVC Help
Powered by ViewVC 1.1.26