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
|
#chatheader
|
||||||
i#userlisttoggle.glyphicon.glyphicon-chevron-down.pull-left.pointer(title="Show/Hide Userlist")
|
i#userlisttoggle.glyphicon.glyphicon-chevron-down.pull-left.pointer(title="Show/Hide Userlist")
|
||||||
span#usercount.pointer Not Connected
|
span#usercount.pointer Not Connected
|
||||||
span#modflair.label.label-default.pull-right.pointer M
|
span#modflair.label.label-default.pull-right.pointer Name Color
|
||||||
span#adminflair.label.label-default.pull-right.pointer A
|
|
||||||
#userlist
|
#userlist
|
||||||
#messagebuffer.linewrap
|
#messagebuffer.linewrap
|
||||||
input#chatline.form-control(type="text", maxlength="240", style="display: none")
|
input#chatline.form-control(type="text", maxlength="240", style="display: none")
|
||||||
|
|
24
www/js/ui.js
24
www/js/ui.js
|
@ -28,7 +28,16 @@ $("#modflair").click(function () {
|
||||||
var m = $("#modflair");
|
var m = $("#modflair");
|
||||||
if (m.hasClass("label-success")) {
|
if (m.hasClass("label-success")) {
|
||||||
USEROPTS.modhat = false;
|
USEROPTS.modhat = false;
|
||||||
m.removeClass("label-success")
|
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");
|
.addClass("label-default");
|
||||||
} else {
|
} else {
|
||||||
USEROPTS.modhat = true;
|
USEROPTS.modhat = true;
|
||||||
|
@ -37,19 +46,6 @@ $("#modflair").click(function () {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#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");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#usercount").mouseenter(function (ev) {
|
$("#usercount").mouseenter(function (ev) {
|
||||||
var breakdown = calcUserBreakdown();
|
var breakdown = calcUserBreakdown();
|
||||||
// re-using profile-box class for convenience
|
// re-using profile-box class for convenience
|
||||||
|
|
|
@ -930,7 +930,6 @@ function handlePermissionChange() {
|
||||||
setVisible("#showchansettings", CLIENT.rank >= 2);
|
setVisible("#showchansettings", CLIENT.rank >= 2);
|
||||||
setVisible("#playlistmanagerwrap", CLIENT.rank >= 1);
|
setVisible("#playlistmanagerwrap", CLIENT.rank >= 1);
|
||||||
setVisible("#modflair", CLIENT.rank >= 2);
|
setVisible("#modflair", CLIENT.rank >= 2);
|
||||||
setVisible("#adminflair", CLIENT.rank >= 255);
|
|
||||||
setVisible("#guestlogin", CLIENT.rank < 0);
|
setVisible("#guestlogin", CLIENT.rank < 0);
|
||||||
setVisible("#chatline", CLIENT.rank >= 0);
|
setVisible("#chatline", CLIENT.rank >= 0);
|
||||||
setVisible("#queue", hasPermission("seeplaylist"));
|
setVisible("#queue", hasPermission("seeplaylist"));
|
||||||
|
|
Loading…
Reference in New Issue