mirror of https://github.com/calzoneman/sync.git
Change modflair label to "Name Color"
Also combined adminflair and modflair into one button (the button has 2 states if you're a moderator, or 3 states if you're a site administrator). Resolves #517
This commit is contained in:
parent
9debebd4b9
commit
4e011c0d26
|
@ -41,8 +41,7 @@ html(lang="en")
|
|||
#chatheader
|
||||
i#userlisttoggle.glyphicon.glyphicon-chevron-down.pull-left.pointer(title="Show/Hide Userlist")
|
||||
span#usercount.pointer Not Connected
|
||||
span#modflair.label.label-default.pull-right.pointer M
|
||||
span#adminflair.label.label-default.pull-right.pointer A
|
||||
span#modflair.label.label-default.pull-right.pointer Name Color
|
||||
#userlist
|
||||
#messagebuffer.linewrap
|
||||
input#chatline.form-control(type="text", maxlength="240", style="display: none")
|
||||
|
|
28
www/js/ui.js
28
www/js/ui.js
|
@ -28,25 +28,21 @@ $("#modflair").click(function () {
|
|||
var m = $("#modflair");
|
||||
if (m.hasClass("label-success")) {
|
||||
USEROPTS.modhat = false;
|
||||
m.removeClass("label-success")
|
||||
.addClass("label-default");
|
||||
m.removeClass("label-success");
|
||||
if (SUPERADMIN) {
|
||||
USEROPTS.adminhat = true;
|
||||
m.addClass("label-danger");
|
||||
} else {
|
||||
m.addClass("label-default");
|
||||
}
|
||||
} else if (m.hasClass("label-danger")) {
|
||||
USEROPTS.adminhat = false;
|
||||
m.removeClass("label-danger")
|
||||
.addClass("label-default");
|
||||
} else {
|
||||
USEROPTS.modhat = true;
|
||||
m.removeClass("label-default")
|
||||
.addClass("label-success");
|
||||
}
|
||||
});
|
||||
|
||||
$("#adminflair").click(function () {
|
||||
var m = $("#adminflair");
|
||||
if (m.hasClass("label-danger")) {
|
||||
USEROPTS.adminhat = false;
|
||||
m.removeClass("label-danger")
|
||||
.addClass("label-default");
|
||||
} else {
|
||||
USEROPTS.adminhat = true;
|
||||
m.removeClass("label-default")
|
||||
.addClass("label-danger");
|
||||
.addClass("label-success");
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -930,7 +930,6 @@ function handlePermissionChange() {
|
|||
setVisible("#showchansettings", CLIENT.rank >= 2);
|
||||
setVisible("#playlistmanagerwrap", CLIENT.rank >= 1);
|
||||
setVisible("#modflair", CLIENT.rank >= 2);
|
||||
setVisible("#adminflair", CLIENT.rank >= 255);
|
||||
setVisible("#guestlogin", CLIENT.rank < 0);
|
||||
setVisible("#chatline", CLIENT.rank >= 0);
|
||||
setVisible("#queue", hasPermission("seeplaylist"));
|
||||
|
|
Loading…
Reference in New Issue