From 0e19b58bc4d4ab5676b6c697a0f61cee3680e4c7 Mon Sep 17 00:00:00 2001 From: Kálmán Viktor <kviktor@cloud.bme.hu> Date: Thu, 28 Nov 2013 16:18:07 +0100 Subject: [PATCH] dashboard: scroll to top if there is a message --- circle/dashboard/static/dashboard/dashboard.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/circle/dashboard/static/dashboard/dashboard.js b/circle/dashboard/static/dashboard/dashboard.js index 9b963b1..a2e0520 100644 --- a/circle/dashboard/static/dashboard/dashboard.js +++ b/circle/dashboard/static/dashboard/dashboard.js @@ -44,6 +44,10 @@ $(function () { if (window.location.hash) $("a[href=" + window.location.hash +"]").tab('show'); + /* scroll to top if there is a message */ + if($(".messagelist").children(".alert").length > 0) + $('body').animate({scrollTop: 0}); + addSliderMiscs(); /* for VM removes buttons */ -- libgit2 0.26.0