mirror of https://github.com/zulip/zulip.git
Hide the 'Send' button when Enter sends.
Like Facebook does. Fixes Trac #1019. (imported from commit 62bd35026ed532d5cb35be9bef5eecd5f63b34de)
This commit is contained in:
parent
dcba1e3f46
commit
6cceda503f
|
@ -150,7 +150,13 @@ exports.initialize = function () {
|
|||
});
|
||||
|
||||
$("#enter_sends").click(function () {
|
||||
var send_button = $("#compose-send-button");
|
||||
enter_sends = $("#enter_sends").is(":checked");
|
||||
if (enter_sends) {
|
||||
send_button.fadeOut();
|
||||
} else {
|
||||
send_button.fadeIn();
|
||||
}
|
||||
return $.ajax({
|
||||
dataType: 'json',
|
||||
url: '/json/change_enter_sends',
|
||||
|
@ -159,6 +165,7 @@ exports.initialize = function () {
|
|||
});
|
||||
});
|
||||
$("#enter_sends").prop('checked', enter_sends);
|
||||
if (enter_sends) $("#compose-send-button").hide();
|
||||
|
||||
// limit number of items so the list doesn't fall off the screen
|
||||
$( "#stream" ).typeahead({
|
||||
|
|
Loading…
Reference in New Issue