Skip to content

Commit

Permalink
Capture templated keyword as a string, not var
Browse files Browse the repository at this point in the history
  • Loading branch information
thobbs committed May 12, 2011
1 parent 582128f commit 87511ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions logsandra/templates/graph_view.html
Expand Up @@ -9,7 +9,7 @@
function updateChart(keyword, next, data, chart) {
jQuery.getJSON('{{ url(controller='graph', action='ajax') }}', {'keyword': keyword, 'next': next}, function(result) {
if(result.result[0].length > 0) {
data.addRows(result.result[0])
data.addRows(result.result[0]);
data.sort({column: 0});
chart.draw(data, {width: 800, height: 480, title: ''});
updateChart(keyword, result.result[1], data, chart)
Expand All @@ -27,7 +27,8 @@

var chart = new google.visualization.AreaChart(document.getElementById('chart_div'));

updateChart({{ c.keyword }}, '', data, chart);
var k = "{{ c.keyword }}";
updateChart(k, '', data, chart);

jQuery('#loading_div').html('<img src="{{ url('/loading.gif') }}" />');
}
Expand Down

0 comments on commit 87511ca

Please sign in to comment.