From 138581701c920d5816e9ebc2e5ac22ad485748d0 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 4 May 2014 02:50:34 -0400 Subject: [PATCH] tweak ui things a tiny bit --- js/popup.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/js/popup.js b/js/popup.js index 0d25aa9a4..07eab9cc2 100644 --- a/js/popup.js +++ b/js/popup.js @@ -62,16 +62,21 @@ registerOnLoadFunction(function() { append($("
").append(input).append(button)). appendTo(ul); button.click(function() { + button.attr("disabled", "disabled"); + button.text("Sending"); + var sendDestinations = [conversation[0].sender]; - if (conversation[0].group) { - sendDestinations = conversation[0].group.members; - } + if (conversation[0].group) + sendDestinations = conversation[0].group.members; var messageProto = new PushMessageContentProtobuf(); messageProto.body = input.val(); sendMessageToNumbers(sendDestinations, messageProto, function(result) { - console.log("Sent message: " + result); + console.log(result); + button.removeAttr("disabled"); + button.text("Send"); + input.val(""); }); }); }