/[Frey]/branches/zimbardo/lib/Frey/Web.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

Diff of /branches/zimbardo/lib/Frey/Web.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 796 by dpavlin, Wed Dec 10 18:47:14 2008 UTC revision 813 by dpavlin, Thu Dec 11 21:06:41 2008 UTC
# Line 185  sub add_css { Line 185  sub add_css {
185  }  }
186    
187  sub add_js {  sub add_js {
188          my ($self,$css) = @_;          my ($self,$js) = @_;
189          my ( $package, $path, $line ) = caller;          my ( $package, $path, $line ) = caller;
190          $self->add_head( qq|  
191          <script type="text/javascript">          if ( $js =~ m{http.*\.js} ) {
192          /* via $package at $path line $line */                  $self->add_head( qq|
193          $css                          <script type="text/javascript" src="$js">
194          </script>                          /* via $package at $path line $line */
195          | );                          </script>
196                    |);
197            } else {
198                    $self->add_head( qq|
199                            <script type="text/javascript">
200                            /* via $package at $path line $line */
201                            $js
202                            </script>
203                    | );
204            };
205  }  }
206    
207  our $reload_counter = 0;  our $reload_counter = 0;

Legend:
Removed from v.796  
changed lines
  Added in v.813

  ViewVC Help
Powered by ViewVC 1.1.26