From 537a99f97d79a570f26cba63f50b12a882f78042 Mon Sep 17 00:00:00 2001 From: Richard Wall Date: Sun, 11 Jul 2010 08:59:39 +0100 Subject: re-instate plot selection --- index.html | 72 +++++++++++++++++++++++++++++--------------------------------- jarmon.js | 8 ++++--- 2 files changed, 39 insertions(+), 41 deletions(-) diff --git a/index.html b/index.html index 0e285e2..3d4a302 100644 --- a/index.html +++ b/index.html @@ -96,12 +96,6 @@ templateFactory('.application-charts')) ); - // Update all charts when a selection is made on one of them - $('.charts').bind("plotselected", function(event, ranges) { - cc.setTimeRange(new Date(ranges.xaxis.from), - new Date(ranges.xaxis.to)); - }); - // Show a loading icon when a chart is being redrawn $('.chart-container').live('chart_loading', function(e) { $(this).find('.title').addClass('loading'); @@ -143,39 +137,41 @@ -
-
- - - - - - - - - - - +
+ +
+ + + + + + + + + + + +
+
+ + +
+
+
+
+
+
+
+

+
-
- - -
-
-
-
-
-
-
-

-
diff --git a/jarmon.js b/jarmon.js index 7b072ca..ec54c91 100644 --- a/jarmon.js +++ b/jarmon.js @@ -675,10 +675,12 @@ jarmon.ChartCoordinator = function(ui) { } }; - // When a selection is made on the range timeline, redraw all the charts. + // 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) { - self.setTimeRange(new Date(ranges.xaxis.from), - new Date(ranges.xaxis.to)); + self.ui.find('[name="from_standard"]').val('custom'); + self.setTimeRange(ranges.xaxis.from, ranges.xaxis.to); + self.update(); }); }; -- cgit v1.1-4-g5e80