mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
Display composebox again upon server errors
Also removed .show()s for the alert on does-not-exist and not-subscribed, where a blank error would display. This should fix the underlying issue with #166: that hiding the composebox before send_message() was called would hide server errors. (imported from commit a8a50cdf82ddf1d15f1e405432ff3bbfdb7a491a)
This commit is contained in:
@@ -140,6 +140,7 @@ function send_message() {
|
|||||||
// a nice response.
|
// a nice response.
|
||||||
response += ": " + $.parseJSON(xhr.responseText).msg;
|
response += ": " + $.parseJSON(xhr.responseText).msg;
|
||||||
}
|
}
|
||||||
|
show(is_composing_message, $("#new_message_content"));
|
||||||
send_status.removeClass(status_classes)
|
send_status.removeClass(status_classes)
|
||||||
.addClass('alert-error')
|
.addClass('alert-error')
|
||||||
.text(response)
|
.text(response)
|
||||||
@@ -243,7 +244,7 @@ function check_stream_for_send(stream_name) {
|
|||||||
if (!data.exists) {
|
if (!data.exists) {
|
||||||
// The stream doesn't exist
|
// The stream doesn't exist
|
||||||
result = "does-not-exist";
|
result = "does-not-exist";
|
||||||
$('#send-status').removeClass(status_classes).show();
|
$('#send-status').removeClass(status_classes);
|
||||||
$('#stream-dne-name').text(stream_name);
|
$('#stream-dne-name').text(stream_name);
|
||||||
$('#stream-dne').show();
|
$('#stream-dne').show();
|
||||||
$("#compose-send-button").removeAttr('disabled');
|
$("#compose-send-button").removeAttr('disabled');
|
||||||
@@ -288,7 +289,7 @@ function validate_stream_message() {
|
|||||||
// browser window doesn't know it.
|
// browser window doesn't know it.
|
||||||
return true;
|
return true;
|
||||||
case "not-subscribed":
|
case "not-subscribed":
|
||||||
$('#send-status').removeClass(status_classes).show();
|
$('#send-status').removeClass(status_classes);
|
||||||
$('#stream-nosub-name').text(stream_name);
|
$('#stream-nosub-name').text(stream_name);
|
||||||
$('#stream-nosub').show();
|
$('#stream-nosub').show();
|
||||||
$("#compose-send-button").removeAttr('disabled');
|
$("#compose-send-button").removeAttr('disabled');
|
||||||
|
|||||||
Reference in New Issue
Block a user