From 6cceda503f5b7c0fdabed71801f4fef8435e63fe Mon Sep 17 00:00:00 2001 From: Waseem Daher Date: Thu, 28 Feb 2013 00:00:27 -0500 Subject: [PATCH] Hide the 'Send' button when Enter sends. Like Facebook does. Fixes Trac #1019. (imported from commit 62bd35026ed532d5cb35be9bef5eecd5f63b34de) --- zephyr/static/js/composebox_typeahead.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zephyr/static/js/composebox_typeahead.js b/zephyr/static/js/composebox_typeahead.js index 591a08ede3..a9206d8548 100644 --- a/zephyr/static/js/composebox_typeahead.js +++ b/zephyr/static/js/composebox_typeahead.js @@ -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({