[Jifty-commit] r6006 - in jifty/trunk: lib/Jifty/Plugin/Chart/Renderer
Jifty commits
jifty-commit at lists.jifty.org
Mon Nov 17 18:05:58 EST 2008
Author: sartak
Date: Mon Nov 17 18:05:40 2008
New Revision: 6006
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Plugin/Chart/Renderer/GoogleViz.pm
Log:
r75682 at onn: sartak | 2008-11-17 18:04:53 -0500
Superclass init and render
Modified: jifty/trunk/lib/Jifty/Plugin/Chart/Renderer/GoogleViz.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Chart/Renderer/GoogleViz.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Chart/Renderer/GoogleViz.pm Mon Nov 17 18:05:40 2008
@@ -3,6 +3,31 @@
use warnings;
use base 'Jifty::Plugin::Chart::Renderer';
+=head2 init
+
+We need to load Google's JS.
+
+=cut
+
+sub init {
+ my $self = shift;
+
+ Jifty->web->add_external_javascript("http://www.google.com/jsapi");
+}
+
+=head2 render
+
+=cut
+
+sub render {
+ my $self = shift;
+ if (ref($self) eq __PACKAGE) {
+ Carp::croak("You must use a subclass of GoogleViz, such as GoogleViz::AnnotatedTimeLine");
+ }
+ else {
+ Carp::croak(ref($self) . " does not implement render.");
+ }
+}
1;
More information about the Jifty-commit
mailing list