From 2578a05de1b25eddc8e133e5f9b3ed2428d5f38c Mon Sep 17 00:00:00 2001 From: Richard Wall Date: Sun, 11 Jul 2010 09:08:00 +0100 Subject: auto update on tzoffset change --- jarmon.js | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/jarmon.js b/jarmon.js index ec54c91..efeca25 100644 --- a/jarmon.js +++ b/jarmon.js @@ -623,6 +623,24 @@ jarmon.timeRangeShortcuts = [ jarmon.ChartCoordinator = function(ui) { var self = this; this.ui = ui; + this.charts = []; + + // Style and configuration of the range timeline + this.rangePreviewOptions = { + grid: { + borderWidth: 1 + }, + selection: { + mode: 'x' + }, + xaxis: { + mode: 'time', + tickFormatter: jarmon.localTimeFormatter + }, + yaxis: { + ticks: [] + } + }; var options = this.ui.find('select[name="from_standard"]'); for(var i=0; i').attr('value', i*60*60*1000).text(label)); } - this.charts = []; + options.bind('change', function(e) { + self.update(); + }); // Update the time ranges and redraw charts when the form is submitted this.ui.find('[name="action"]').bind('click', function(e) { @@ -658,23 +678,6 @@ jarmon.ChartCoordinator = function(ui) { return false; }); - // Style and configuration of the range timeline - this.rangePreviewOptions = { - grid: { - borderWidth: 1 - }, - selection: { - mode: 'x' - }, - xaxis: { - mode: 'time', - tickFormatter: jarmon.localTimeFormatter - }, - yaxis: { - ticks: [] - } - }; - // When a selection is made on the range timeline, or any of my charts // redraw all the charts. this.ui.bind("plotselected", function(event, ranges) { -- cgit v1.1-4-g5e80