mirror of https://github.com/calzoneman/sync.git
Fix #276
This commit is contained in:
parent
6d958b4b31
commit
c2cd04f760
|
@ -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
|
Thu Sep 5 13:45 2013 CDT
|
||||||
* acp.js, actionlog.js, api.js, channel.js, chatcommand.js, config.js,
|
* acp.js, actionlog.js, api.js, channel.js, chatcommand.js, config.js,
|
||||||
customembed.js, database.js, filter.js, get-info.js, logger.js,
|
customembed.js, database.js, filter.js, get-info.js, logger.js,
|
||||||
|
|
|
@ -136,13 +136,20 @@ Callbacks = {
|
||||||
.click(function() { div.remove(); });
|
.click(function() { div.remove(); });
|
||||||
$("<h3/>").text("This channel isn't registered").appendTo(div);
|
$("<h3/>").text("This channel isn't registered").appendTo(div);
|
||||||
$("<button/>").addClass("btn btn-primary").text("Register it")
|
$("<button/>").addClass("btn btn-primary").text("Register it")
|
||||||
|
.attr("id", "chanregisterbtn")
|
||||||
.appendTo(div)
|
.appendTo(div)
|
||||||
.click(function() {
|
.click(function() {
|
||||||
|
$(this).attr("disabled", true)
|
||||||
|
.text("Registering...");
|
||||||
socket.emit("registerChannel");
|
socket.emit("registerChannel");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
registerChannel: function(data) {
|
registerChannel: function(data) {
|
||||||
|
if ($("#chanregisterbtn").length > 0) {
|
||||||
|
$("#chanregisterbtn").text("Register it")
|
||||||
|
.attr("disabled", false);
|
||||||
|
}
|
||||||
if(data.success) {
|
if(data.success) {
|
||||||
$("#chregnotice").remove();
|
$("#chregnotice").remove();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue