summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2014-10-05 12:42:52 +0100
committerJohn McLear <john@mclear.co.uk>2014-10-05 12:42:52 +0100
commitfb940897eec280f448a4622b429b7456c3e623f0 (patch)
treeb61b885e8ec5f923aa389a2800bf2e79c6ceac65
parentf3f653f07fc02554ed46a8152da80e009fb49417 (diff)
parent5008ad10c6fce228b16d6e788cf280503dfa51bf (diff)
downloadetherpad-lite-fb940897eec280f448a4622b429b7456c3e623f0.zip
Merge pull request #2257 from 0ip/fix/user-count
Fix broken user count
-rw-r--r--src/static/css/pad.css6
-rw-r--r--src/static/js/pad_userlist.js11
2 files changed, 6 insertions, 11 deletions
diff --git a/src/static/css/pad.css b/src/static/css/pad.css
index 135d06fe..309eb833 100644
--- a/src/static/css/pad.css
+++ b/src/static/css/pad.css
@@ -170,9 +170,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;
@@ -740,9 +741,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('<span id="online_count">1</span>');
+
$("#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 = $('<span id="online_count">')
- $btn.append($counter)
- }
- $counter.text(online);
+
+ $('#online_count').text(online);
return online;
},