From 393fce3e8aaef1b00ab34bf35b7e8b329a5e3dc5 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Tue, 19 Aug 2014 08:55:44 -0400 Subject: Add a feed selector in repartition statistics. Before we could choose the feed in the statistics only from the feed options in the main view. Now with the new drop-down list, it is possible to choose it from the statistics page. The rendering needs to be polished to be nicer. --- p/scripts/main.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'p/scripts') diff --git a/p/scripts/main.js b/p/scripts/main.js index ae7b69364..4802e0941 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -1063,6 +1063,12 @@ function init_share_observers() { }); } +function init_stats_observers() { + $('#feed_select').on('change', function(e) { + redirect($(this).find(':selected').data('url')); + }); +} + function init_remove_observers() { $('.post').on('click', 'a.remove', function(e) { var remove_what = $(this).attr('data-remove'); @@ -1177,6 +1183,7 @@ function init_all() { init_remove_observers(); init_feed_observers(); init_password_observers(); + init_stats_observers(); } if (window.console) { -- cgit v1.2.3