diff --git a/frontend_tests/casper_tests/11-mention.js b/frontend_tests/casper_tests/11-mention.js index 0cad14208a..e2a28ed649 100644 --- a/frontend_tests/casper_tests/11-mention.js +++ b/frontend_tests/casper_tests/11-mention.js @@ -41,7 +41,7 @@ casper.then(function () { casper.waitWhileVisible('.compose-all-everyone-confirm', function () { casper.test.info('Check that error messages are gone.'); casper.test.assertNotVisible('.compose-all-everyone-msg'); - casper.test.assertNotVisible('#send-status'); + casper.test.assertNotVisible('#compose-send-status'); }); }); diff --git a/frontend_tests/node_tests/compose.js b/frontend_tests/node_tests/compose.js index e366a33a1a..38b65d05dd 100644 --- a/frontend_tests/node_tests/compose.js +++ b/frontend_tests/node_tests/compose.js @@ -228,7 +228,7 @@ people.add(bob); compose_state.stream_name('social'); assert(compose.validate()); assert(!$("#compose-all-everyone").visible()); - assert(!$("#send-status").visible()); + assert(!$("#compose-send-status").visible()); stream_data.get_subscriber_count = function (stream_name) { assert.equal(stream_name, 'social'); @@ -251,7 +251,7 @@ people.add(bob); compose_state.message_content('Hey @all'); assert(!compose.validate()); assert.equal($("#compose-send-button").prop('disabled'), false); - assert(!$("#send-status").visible()); + assert(!$("#compose-send-status").visible()); assert.equal(compose_content, 'compose_all_everyone_stub'); assert($("#compose-all-everyone").visible()); }()); @@ -261,7 +261,7 @@ people.add(bob); blueslip.log = noop; $("#new_message_content").val('foobarfoobar'); $("#new_message_content").blur(); - $("#send-status").show(); + $("#compose-send-status").show(); $("#compose-send-button").attr('disabled', 'disabled'); $("#sending-indicator").show(); @@ -276,7 +276,7 @@ people.add(bob); assert.equal($("#new_message_content").val(), ''); assert($("#new_message_content").is_focused()); - assert(!$("#send-status").visible()); + assert(!$("#compose-send-status").visible()); assert.equal($("#compose-send-button").prop('disabled'), false); assert(!$("#sending-indicator").visible()); @@ -348,7 +348,7 @@ people.add(bob); $("#new_message_content").val('[foobar]' + '(https://foo.com/user_uploads/123456)'); $("#new_message_content").blur(); - $("#send-status").show(); + $("#compose-send-status").show(); $("#compose-send-button").attr('disabled', 'disabled'); $("#sending-indicator").show(); @@ -363,7 +363,7 @@ people.add(bob); assert.deepEqual(stub_state, state); assert.equal($("#new_message_content").val(), ''); assert($("#new_message_content").is_focused()); - assert(!$("#send-status").visible()); + assert(!$("#compose-send-status").visible()); assert.equal($("#compose-send-button").prop('disabled'), false); assert(!$("#sending-indicator").visible()); }()); @@ -443,7 +443,7 @@ people.add(bob); stub_state = initialize_state_stub_dict(); $("#new_message_content").val('foobarfoobar'); $("#new_message_content").blur(); - $("#send-status").show(); + $("#compose-send-status").show(); $("#compose-send-button").attr('disabled', 'disabled'); $("#sending-indicator").show(); $("#new_message_content").select(noop); @@ -477,7 +477,7 @@ people.add(bob); 'Error sending message: Server says 408'); assert.equal($("#new_message_content").val(), 'foobarfoobar'); assert($("#new_message_content").is_focused()); - assert($("#send-status").visible()); + assert($("#compose-send-status").visible()); assert.equal($("#compose-send-button").prop('disabled'), false); assert(!$("#sending-indicator").visible()); }()); @@ -957,7 +957,7 @@ function test_with_mock_socket(test_params) { '.compose-all-everyone'); $("#compose-all-everyone").show(); - $("#send-status").show(); + $("#compose-send-status").show(); var compose_finish_checked = false; compose.finish = function () { @@ -969,7 +969,7 @@ function test_with_mock_socket(test_params) { assert(container_removed); assert(compose_finish_checked); assert(!$("#compose-all-everyone").visible()); - assert(!$("#send-status").visible()); + assert(!$("#compose-send-status").visible()); }()); (function test_compose_invite_users_clicked() { diff --git a/frontend_tests/node_tests/upload.js b/frontend_tests/node_tests/upload.js index 5e271347f5..61f1e094c0 100644 --- a/frontend_tests/node_tests/upload.js +++ b/frontend_tests/node_tests/upload.js @@ -18,7 +18,7 @@ zrequire('upload'); (function test_upload_started() { $("#compose-send-button").prop('disabled', false); - $("#send-status").removeClass("alert-info").hide(); + $("#compose-send-status").removeClass("alert-info").hide(); $(".send-status-close").one = function (ev_name, handler) { assert.equal(ev_name, 'click'); assert(handler); @@ -35,8 +35,8 @@ zrequire('upload'); upload.uploadStarted(); assert.equal($("#compose-send-button").attr("disabled"), ''); - assert($("#send-status").hasClass("alert-info")); - assert($("#send-status").visible()); + assert($("#compose-send-status").hasClass("alert-info")); + assert($("#compose-send-status").visible()); assert.equal($("

").text(), 'translated: Uploading…'); assert.equal($("#error-msg").html(), 'fake-html'); }()); @@ -53,15 +53,15 @@ zrequire('upload'); (function test_upload_error() { function setup_test() { - $("#send-status").removeClass("alert-error"); - $("#send-status").addClass("alert-info"); + $("#compose-send-status").removeClass("alert-error"); + $("#compose-send-status").addClass("alert-info"); $("#compose-send-button").attr("disabled", 'disabled'); $("#error-msg").text(''); } function assert_side_effects(msg, check_html=false) { - assert($("#send-status").hasClass("alert-error")); - assert(!$("#send-status").hasClass("alert-info")); + assert($("#compose-send-status").hasClass("alert-error")); + assert(!$("#compose-send-status").hasClass("alert-info")); assert.equal($("#compose-send-button").prop("disabled"), false); if (check_html) { assert.equal($("#error-msg").html(), msg); @@ -119,8 +119,8 @@ zrequire('upload'); }, }; $("#compose-send-button").attr('disabled', 'disabled'); - $("#send-status").addClass("alert-info"); - $("#send-status").show(); + $("#compose-send-status").addClass("alert-info"); + $("#compose-send-status").show(); $('#file_input').clone = function (param) { assert(param); return $('#file_input'); @@ -133,8 +133,8 @@ zrequire('upload'); assert(compose_actions_start_checked); assert(compose_ui_autosize_textarea_checked); assert.equal($("#compose-send-button").prop('disabled'), false); - assert(!$('#send-status').hasClass('alert-info')); - assert(!$('#send-status').visible()); + assert(!$('#compose-send-status').hasClass('alert-info')); + assert(!$('#compose-send-status').visible()); } } diff --git a/static/js/click_handlers.js b/static/js/click_handlers.js index 16c5f8efc8..642e83a5c1 100644 --- a/static/js/click_handlers.js +++ b/static/js/click_handlers.js @@ -421,8 +421,8 @@ $(function () { // NB: This just binds to current elements, and won't bind to elements // created after ready() is called. - $('#send-status .send-status-close').click( - function () { $('#send-status').stop(true).fadeOut(500); } + $('#compose-send-status .send-status-close').click( + function () { $('#compose-send-status').stop(true).fadeOut(500); } ); diff --git a/static/js/compose.js b/static/js/compose.js index 36504e8588..d1c5a39801 100644 --- a/static/js/compose.js +++ b/static/js/compose.js @@ -42,7 +42,7 @@ function show_all_everyone_warnings() { exports.clear_all_everyone_warnings = function () { $("#compose-all-everyone").hide(); $("#compose-all-everyone").empty(); - $("#send-status").hide(); + $("#compose-send-status").hide(); }; exports.clear_invites = function () { @@ -133,7 +133,7 @@ function create_message_object() { exports.create_message_object = create_message_object; function compose_error(error_text, bad_input) { - $('#send-status').removeClass(common.status_classes) + $('#compose-send-status').removeClass(common.status_classes) .addClass('alert-error') .stop(true).fadeTo(0, 1); $('#error-msg').html(error_text); @@ -188,7 +188,7 @@ function clear_compose_box() { $("#new_message_content").val('').focus(); drafts.delete_draft_after_send(); compose_ui.autosize_textarea(); - $("#send-status").hide(0); + $("#compose-send-status").hide(0); $("#compose-send-button").prop('disabled', false); $("#sending-indicator").hide(); resize.resize_bottom_whitespace(); diff --git a/static/js/compose_actions.js b/static/js/compose_actions.js index 1a1670f680..d1a9614e6b 100644 --- a/static/js/compose_actions.js +++ b/static/js/compose_actions.js @@ -76,7 +76,7 @@ function show_box(msg_type, opts) { $("#stream_toggle").removeClass("active"); $("#private_message_toggle").addClass("active"); } - $("#send-status").removeClass(common.status_classes).hide(); + $("#compose-send-status").removeClass(common.status_classes).hide(); $('#compose').css({visibility: "visible"}); $(".new_message_textarea").css("min-height", "3em"); @@ -98,7 +98,7 @@ function clear_box() { exports.clear_textarea(); $("#new_message_content").removeData("draft-id"); compose_ui.autosize_textarea(); - $("#send-status").hide(0); + $("#compose-send-status").hide(0); } exports.autosize_message_content = function () { diff --git a/static/js/upload.js b/static/js/upload.js index 72a5eba320..cb0fd3a1dc 100644 --- a/static/js/upload.js +++ b/static/js/upload.js @@ -23,7 +23,7 @@ function clear_out_file_list(jq_file_list) { exports.uploadStarted = function () { $("#compose-send-button").attr("disabled", ""); - $("#send-status").addClass("alert-info").show(); + $("#compose-send-status").addClass("alert-info").show(); $(".send-status-close").one('click', compose.abort_xhr); $("#error-msg").html($("

").text(i18n.t("Uploading…")) .after('

' + @@ -37,7 +37,7 @@ exports.progressUpdated = function (i, file, progress) { exports.uploadError = function (err, file) { var msg; - $("#send-status").addClass("alert-error") + $("#compose-send-status").addClass("alert-error") .removeClass("alert-info"); $("#compose-send-button").prop("disabled", false); switch (err) { @@ -94,7 +94,7 @@ exports.uploadFinished = function (i, file, response) { } compose_ui.autosize_textarea(); $("#compose-send-button").prop("disabled", false); - $("#send-status").removeClass("alert-info") + $("#compose-send-status").removeClass("alert-info") .hide(); // In order to upload the same file twice in a row, we need to clear out diff --git a/static/styles/compose.css b/static/styles/compose.css index b8d015cf76..cafe60c918 100644 --- a/static/styles/compose.css +++ b/static/styles/compose.css @@ -227,7 +227,7 @@ table.compose_table { } /* Like .nav-tabs > li > a */ -#send-status { +#compose-send-status { width: calc(100% - 28px); padding: 8px 14px 8px 14px; margin-bottom: 8px; diff --git a/templates/zerver/compose.html b/templates/zerver/compose.html index c49ffd1546..95b08ccb50 100644 --- a/templates/zerver/compose.html +++ b/templates/zerver/compose.html @@ -30,7 +30,7 @@
-
+
×