From fbfddb7bd2967f7420aa978b07c98c57035979a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Fri, 17 Apr 2015 13:55:15 +0200 Subject: [PATCH] Forgot to refresh scrolling element.. --- static/js/admin.js | 3 +++ static/js/list.js | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/static/js/admin.js b/static/js/admin.js index bd044bec..5e345121 100755 --- a/static/js/admin.js +++ b/static/js/admin.js @@ -46,6 +46,9 @@ socket.on("pw", function(msg) $("input[name="+names[i]+"]").attr("disabled", false); } $(".card-action").removeClass("hide"); + + refresh_scroll(); + localStorage.setItem("passord_i_klartekst_lol", msg); Materialize.toast("Correct Password. You are now admin", 4000); }); diff --git a/static/js/list.js b/static/js/list.js index c3a69030..593b2ac2 100755 --- a/static/js/list.js +++ b/static/js/list.js @@ -95,8 +95,7 @@ function populate_list(msg, conf_only) myScroll.maxScrollY = myScroll.maxScrollY - 5; }else { - myScroll.refresh(); - myScroll.maxScrollY = myScroll.maxScrollY - 5; //Hackish solution for not being able to scroll fully to the bottom, don't understand why this is fucked + refresh_scroll(); } } } @@ -123,6 +122,12 @@ function skip(){ socket.emit('skip', [chan, guid]); } +function refresh_scroll() +{ + myScroll.refresh(); + myScroll.maxScrollY = myScroll.maxScrollY - 5; +} + function show(){ if(!window.mobilecheck()) {