Fix #276
This commit is contained in:
parent
6d958b4b31
commit
c2cd04f760
2 changed files with 13 additions and 0 deletions
|
|
@ -136,13 +136,20 @@ Callbacks = {
|
|||
.click(function() { div.remove(); });
|
||||
$("<h3/>").text("This channel isn't registered").appendTo(div);
|
||||
$("<button/>").addClass("btn btn-primary").text("Register it")
|
||||
.attr("id", "chanregisterbtn")
|
||||
.appendTo(div)
|
||||
.click(function() {
|
||||
$(this).attr("disabled", true)
|
||||
.text("Registering...");
|
||||
socket.emit("registerChannel");
|
||||
});
|
||||
},
|
||||
|
||||
registerChannel: function(data) {
|
||||
if ($("#chanregisterbtn").length > 0) {
|
||||
$("#chanregisterbtn").text("Register it")
|
||||
.attr("disabled", false);
|
||||
}
|
||||
if(data.success) {
|
||||
$("#chregnotice").remove();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue