mirror of
https://github.com/zulip/zulip.git
synced 2026-07-09 21:21:47 +08:00
Clear the compose box after successfully sending a zephyr.
You don't care about that content anymore. We probably want to clear even more aggressively than this. (imported from commit 29f6910a12e1b722f5801db644b04f54cf5bfd63)
This commit is contained in:
parent
09b1285ac1
commit
56ea3d12d5
@ -73,7 +73,7 @@ var people_list = {{ people }};
|
||||
</div>
|
||||
<div id="bottom_whitespace"></div>
|
||||
</div>
|
||||
<div class="tabbable container zephyr_compose">
|
||||
<div class="tabbable container zephyr_compose" id="zephyr_compose">
|
||||
<ul class="nav nav-tabs" id="zephyr-type-tabs">
|
||||
<li class="active"><a href="#class-message" data-toggle="tab">Stream</a></li>
|
||||
<li><a href="#personal-message" data-toggle="tab">Huddle</a></li>
|
||||
|
||||
@ -118,6 +118,7 @@ $(function () {
|
||||
.text('Sent message')
|
||||
.stop(true).fadeTo(0,1).delay(1000).fadeOut(1000);
|
||||
buttons.removeAttr('disabled');
|
||||
clear_compose_box();
|
||||
},
|
||||
error: function (xhr) {
|
||||
var response = "Error sending message";
|
||||
@ -557,6 +558,10 @@ $(function () {
|
||||
get_updates_longpoll();
|
||||
});
|
||||
|
||||
function clear_compose_box() {
|
||||
$("#zephyr_compose").find('input[type=text], textarea').val('');
|
||||
}
|
||||
|
||||
var longpoll_failures = 0;
|
||||
function get_updates_longpoll() {
|
||||
console.log(new Date() + ': longpoll started');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user