From 0667870286b49d5d3177f8086c4055ef25c59d65 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Mon, 13 Feb 2017 15:50:12 -0500 Subject: [PATCH] set an active state for pageview options --- public/less/admin/general/dashboard.less | 4 ++++ public/src/admin/general/dashboard.js | 2 ++ src/views/admin/general/dashboard.tpl | 6 +++--- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/public/less/admin/general/dashboard.less b/public/less/admin/general/dashboard.less index 585d81f1d2..12e542e32a 100644 --- a/public/less/admin/general/dashboard.less +++ b/public/less/admin/general/dashboard.less @@ -153,4 +153,8 @@ color: #999; } } + + .updatePageviewsGraph.active { + font-weight: bold; + } } \ No newline at end of file diff --git a/public/src/admin/general/dashboard.js b/public/src/admin/general/dashboard.js index 07e566ca68..5a582abbda 100644 --- a/public/src/admin/general/dashboard.js +++ b/public/src/admin/general/dashboard.js @@ -296,6 +296,8 @@ define('admin/general/dashboard', ['semver', 'Chart', 'translator'], function (s until = lastMonth.getTime(); } updateTrafficGraph($(this).attr('data-units'), until); + $('[data-action="updateGraph"]').removeClass('active'); + $(this).addClass('active'); }); socket.emit('admin.rooms.getAll', Admin.updateRoomUsage); diff --git a/src/views/admin/general/dashboard.tpl b/src/views/admin/general/dashboard.tpl index ee617ed0e7..d904637fe4 100644 --- a/src/views/admin/general/dashboard.tpl +++ b/src/views/admin/general/dashboard.tpl @@ -13,15 +13,15 @@
-
[[admin/general/dashboard:page-views-last-month]]
+
[[admin/general/dashboard:page-views-last-month]]
-
[[admin/general/dashboard:page-views-this-month]]
+
[[admin/general/dashboard:page-views-this-month]]
-
[[admin/general/dashboard:page-views-last-day]]
+
[[admin/general/dashboard:page-views-last-day]]