Commits

Ralph Bean committed 5e38425

Expose callbacks in a lookup object.

  • Participants
  • Parent commits 207b491

Comments (0)

Files changed (1)

File tw2/jqplugins/jqplot/static/js/jqplot-utils.js

 }
 
 function doPollingJQPlotWidget(sel, data, options, url, url_kwargs, interval){
+    if (typeof(window._tw2_jqplots)=='undefined') window._tw2_jqplots = {};
+
     $.jqplot.config.enablePlugins = true;
 
     // Setup our initial plot
     var the_plot_thickens = $.jqplot(sel, data, options);
 
     var callback = make_jqplot_async_callback(the_plot_thickens);
+    window._tw2_jqplots[sel] = callback;
 
     // Finally make the JSON call
     $.getJSON(url, url_kwargs, callback);