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

@ -1,3 +1,9 @@
Thu Sep 5 22:52 2013 CDT
* www/assets/js/callbacks.js: Disable the channel registration button
and change its text while a registration attempt is being processed
(prevents DB errors from impatient people spamming the button)
(addresses Issue #276 <Remove register channel button after click> )
Thu Sep 5 13:45 2013 CDT
* acp.js, actionlog.js, api.js, channel.js, chatcommand.js, config.js,
customembed.js, database.js, filter.js, get-info.js, logger.js,

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