[Jifty-commit] jifty-plugin-chart branch, master, updated. 7e08a04442a523c483d688c5dc2ff254b70891f8
Jifty commits
jifty-commit at lists.jifty.org
Thu Jan 7 18:10:28 EST 2010
The branch, master has been updated
via 7e08a04442a523c483d688c5dc2ff254b70891f8 (commit)
from 069be51dae4a5d892ed111e27d9abaf579425e52 (commit)
Summary of changes:
lib/Jifty/Plugin/Chart/Renderer/GoogleViz.pm | 8 ++++----
lib/Jifty/Plugin/Chart/Renderer/PlotKit.pm | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
- Log -----------------------------------------------------------------
commit 7e08a04442a523c483d688c5dc2ff254b70891f8
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jan 7 18:10:05 2010 -0500
Update JSON handling to use new Jifty::JSON
diff --git a/lib/Jifty/Plugin/Chart/Renderer/GoogleViz.pm b/lib/Jifty/Plugin/Chart/Renderer/GoogleViz.pm
index 9d0e625..ec3f010 100644
--- a/lib/Jifty/Plugin/Chart/Renderer/GoogleViz.pm
+++ b/lib/Jifty/Plugin/Chart/Renderer/GoogleViz.pm
@@ -3,7 +3,7 @@ use strict;
use warnings;
use base 'Jifty::Plugin::Chart::Renderer';
-use Jifty::JSON 'objToJson';
+use Jifty::JSON 'encode_json';
=head1 NAME
@@ -31,8 +31,8 @@ sub render {
my $chart_id = 'chart_' . Jifty->web->serial;
my $chart_class = $self->chart_class;
- my $load_params = objToJson($self->load_params);
- my $draw_params = objToJson($self->draw_params($args{options}));
+ my $load_params = encode_json($self->load_params);
+ my $draw_params = encode_json($self->draw_params($args{options}));
my $callback_name = 'callback_' . Jifty->web->serial;
Jifty->web->out(<< "JS_HEADER");
@@ -207,7 +207,7 @@ sub encode_value {
die "Can't handle the date '$value'";
}
- return objToJson($value);
+ return encode_json($value);
}
1;
diff --git a/lib/Jifty/Plugin/Chart/Renderer/PlotKit.pm b/lib/Jifty/Plugin/Chart/Renderer/PlotKit.pm
index 191c2b4..915c111 100644
--- a/lib/Jifty/Plugin/Chart/Renderer/PlotKit.pm
+++ b/lib/Jifty/Plugin/Chart/Renderer/PlotKit.pm
@@ -90,9 +90,9 @@ $div
var plot = function() {
var plotter = PlotKit.EasyPlot(
"$args{type}",
- @{[Jifty::JSON::objToJson( $args{options} )]},
+ @{[Jifty->web->escape(Jifty::JSON::encode_json( $args{options} ))]},
\$("$chart_id"),
- @{[Jifty::JSON::objToJson( $args{data} )]}
+ @{[Jifty->web->escape(Jifty::JSON::encode_json( $args{data} ))]}
);
};
YAHOO.util.Event.onAvailable( "$chart_id", plot );
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list