This commit is contained in:
calzoneman 2013-05-27 14:35:24 -04:00
parent 9761a99c01
commit 296bddefcd
4 changed files with 6 additions and 4 deletions

View file

@ -699,7 +699,7 @@ Callbacks = {
$("<button/>").addClass("close pull-right").text("×")
.appendTo(poll)
.click(function() { poll.remove(); });
if(RANK >= Rank.Moderator || LEADER) {
if(hasPermission("pollctl")) {
$("<button/>").addClass("btn btn-danger pull-right").text("End Poll")
.appendTo(poll)
.click(function() {
@ -723,6 +723,8 @@ Callbacks = {
.click(callback);
}
poll.find(".btn").attr("disabled", !hasPermission("pollvote"));
},
updatePoll: function(data) {

View file

@ -808,7 +808,7 @@ function handlePermissionChange() {
}
var poll = $("#pollcontainer .active");
if(poll.length > 0) {
poll.find(".btn").attr("disabled", hasPermission("pollvote"));
poll.find(".btn").attr("disabled", !hasPermission("pollvote"));
}
var users = $("#userlist").children();
for(var i = 0; i < users.length; i++) {