This commit is contained in:
calzoneman 2013-09-05 22:54:30 -05:00
parent 6d958b4b31
commit c2cd04f760
2 changed files with 13 additions and 0 deletions

View file

@ -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();
}