mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
Merge pull request #2138 from ether/fix-user-icon-color-and-count
Fix showusers button: Show authorcolor and user_count again
This commit is contained in:
commit
e85d09400e
1 changed files with 14 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||||
* This helps other people to understand this code better and helps them to improve it.
|
* This helps other people to understand this code better and helps them to improve it.
|
||||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||||
*/
|
*/
|
||||||
|
@ -513,7 +513,7 @@ var paduserlist = (function()
|
||||||
{
|
{
|
||||||
info.colorId = clientVars.colorPalette[info.colorId];
|
info.colorId = clientVars.colorPalette[info.colorId];
|
||||||
}
|
}
|
||||||
|
|
||||||
myUserInfo = $.extend(
|
myUserInfo = $.extend(
|
||||||
{}, info);
|
{}, info);
|
||||||
|
|
||||||
|
@ -602,7 +602,13 @@ var paduserlist = (function()
|
||||||
online++;
|
online++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$("#online_count").text(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);
|
||||||
|
|
||||||
return online;
|
return online;
|
||||||
},
|
},
|
||||||
|
@ -724,15 +730,15 @@ var paduserlist = (function()
|
||||||
{
|
{
|
||||||
$("#myswatchbox").addClass('myswatchboxhoverable').removeClass('myswatchboxunhoverable');
|
$("#myswatchbox").addClass('myswatchboxhoverable').removeClass('myswatchboxunhoverable');
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#myswatch").css({'background-color': myUserInfo.colorId});
|
$("#myswatch").css({'background-color': myUserInfo.colorId});
|
||||||
|
|
||||||
if ($.browser.msie && parseInt($.browser.version) <= 8) {
|
if ($.browser.msie && parseInt($.browser.version) <= 8) {
|
||||||
$("#usericon a").css({'box-shadow': 'inset 0 0 30px ' + myUserInfo.colorId,'background-color': myUserInfo.colorId});
|
$("li[data-key=showusers] > a").css({'box-shadow': 'inset 0 0 30px ' + myUserInfo.colorId,'background-color': myUserInfo.colorId});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$("#usericon a").css({'box-shadow': 'inset 0 0 30px ' + myUserInfo.colorId});
|
$("li[data-key=showusers] > a").css({'box-shadow': 'inset 0 0 30px ' + myUserInfo.colorId});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -748,7 +754,7 @@ function getColorPickerSwatchIndex(jnode)
|
||||||
function closeColorPicker(accept)
|
function closeColorPicker(accept)
|
||||||
{
|
{
|
||||||
if (accept)
|
if (accept)
|
||||||
{
|
{
|
||||||
var newColor = $("#mycolorpickerpreview").css("background-color");
|
var newColor = $("#mycolorpickerpreview").css("background-color");
|
||||||
var parts = newColor.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
|
var parts = newColor.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
|
||||||
// parts now should be ["rgb(0, 70, 255", "0", "70", "255"]
|
// parts now should be ["rgb(0, 70, 255", "0", "70", "255"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue