aboutsummaryrefslogtreecommitdiff
path: root/p/scripts
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <github@ainw.org> 2014-08-19 08:55:44 -0400
committerGravatar Alexis Degrugillier <github@ainw.org> 2014-08-19 08:55:44 -0400
commit393fce3e8aaef1b00ab34bf35b7e8b329a5e3dc5 (patch)
tree46569c0d93bc0c2cf53250278cb73facc7274fbe /p/scripts
parent5c2f3349fa4341533aad6294c896b32c4befd58f (diff)
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.
Diffstat (limited to 'p/scripts')
-rw-r--r--p/scripts/main.js7
1 files changed, 7 insertions, 0 deletions
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) {