set an active state for pageview options

v1.18.x
psychobunny 8 years ago
parent 3d1425605a
commit 0667870286

@ -153,4 +153,8 @@
color: #999;
}
}
.updatePageviewsGraph.active {
font-weight: bold;
}
}

@ -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);

@ -13,15 +13,15 @@
<hr/>
<div class="text-center pull-left pageview-stats">
<div><strong id="pageViewsLastMonth"></strong></div>
<div><a href="#" data-action="updateGraph" data-units="days" data-until="last-month">[[admin/general/dashboard:page-views-last-month]]</a></div>
<div><a href="#" class="updatePageviewsGraph" data-action="updateGraph" data-units="days" data-until="last-month">[[admin/general/dashboard:page-views-last-month]]</a></div>
</div>
<div class="text-center pull-left pageview-stats">
<div><strong id="pageViewsThisMonth"></strong></div>
<div><a href="#" data-action="updateGraph" data-units="days">[[admin/general/dashboard:page-views-this-month]]</a></div>
<div><a href="#" class="updatePageviewsGraph" data-action="updateGraph" data-units="days">[[admin/general/dashboard:page-views-this-month]]</a></div>
</div>
<div class="text-center pull-left pageview-stats">
<div><strong id="pageViewsPastDay"></strong></div>
<div><a href="#" data-action="updateGraph" data-units="hours">[[admin/general/dashboard:page-views-last-day]]</a></div>
<div><a href="#" class="updatePageviewsGraph active" data-action="updateGraph" data-units="hours">[[admin/general/dashboard:page-views-last-day]]</a></div>
</div>
</div>
</div>

Loading…
Cancel
Save