From 5008ad10c6fce228b16d6e788cf280503dfa51bf Mon Sep 17 00:00:00 2001 From: 0ip Date: Sun, 5 Oct 2014 13:14:07 +0200 Subject: [PATCH] Fix user count Still dirty, but really works. --- src/static/css/pad.css | 6 ++---- src/static/js/pad_userlist.js | 11 ++++------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/static/css/pad.css b/src/static/css/pad.css index 979eb1ef..d616b90c 100644 --- a/src/static/css/pad.css +++ b/src/static/css/pad.css @@ -166,9 +166,10 @@ li[data-key=showusers] > a { } li[data-key=showusers] > a #online_count { color: #777; - font-size: 10px; + font-size: 11px; position: relative; top: 2px; + padding-left: 2px; } #editorcontainer { position: absolute; @@ -736,9 +737,6 @@ table#otheruserstable { opacity: 0.01; display: none; } -#online_count { - color: #888; -} .rtl { direction: RTL } diff --git a/src/static/js/pad_userlist.js b/src/static/js/pad_userlist.js index ebb057c8..93c8ff70 100644 --- a/src/static/js/pad_userlist.js +++ b/src/static/js/pad_userlist.js @@ -468,6 +468,8 @@ var paduserlist = (function() self.setMyUserInfo(myInitialUserInfo); + $('#editbar [data-key=showusers] > a').append('1'); + $("#otheruserstable tr").remove(); if (pad.getUserIsGuest()) @@ -602,13 +604,8 @@ var paduserlist = (function() online++; } } - var $btn = $("#editbar [data-key=showusers] > a") - , $counter = $('#online_count', $btn) - if(!$counter.length) { - $counter = $('') - $btn.append($counter) - } - $counter.text(online); + + $('#online_count').text(online); return online; },