tweak ui things a tiny bit
This commit is contained in:
parent
3e60368a16
commit
138581701c
1 changed files with 9 additions and 4 deletions
13
js/popup.js
13
js/popup.js
|
@ -62,16 +62,21 @@ registerOnLoadFunction(function() {
|
||||||
append($("<form class='container'>").append(input).append(button)).
|
append($("<form class='container'>").append(input).append(button)).
|
||||||
appendTo(ul);
|
appendTo(ul);
|
||||||
button.click(function() {
|
button.click(function() {
|
||||||
|
button.attr("disabled", "disabled");
|
||||||
|
button.text("Sending");
|
||||||
|
|
||||||
var sendDestinations = [conversation[0].sender];
|
var sendDestinations = [conversation[0].sender];
|
||||||
if (conversation[0].group) {
|
if (conversation[0].group)
|
||||||
sendDestinations = conversation[0].group.members;
|
sendDestinations = conversation[0].group.members;
|
||||||
}
|
|
||||||
|
|
||||||
var messageProto = new PushMessageContentProtobuf();
|
var messageProto = new PushMessageContentProtobuf();
|
||||||
messageProto.body = input.val();
|
messageProto.body = input.val();
|
||||||
|
|
||||||
sendMessageToNumbers(sendDestinations, messageProto, function(result) {
|
sendMessageToNumbers(sendDestinations, messageProto, function(result) {
|
||||||
console.log("Sent message: " + result);
|
console.log(result);
|
||||||
|
button.removeAttr("disabled");
|
||||||
|
button.text("Send");
|
||||||
|
input.val("");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue