refactor: new message content -> compose textarea.

This commit is contained in:
Tommy Ip
2017-11-26 19:37:44 +00:00
committed by Tim Abbott
parent e92a8ac8ee
commit 6e22847548
23 changed files with 128 additions and 128 deletions

View File

@@ -22,7 +22,7 @@ exports.focus_in_empty_compose = function () {
return (
exports.composing() &&
exports.message_content() === "" &&
$('#new_message_content').is(':focus'));
$('#compose-textarea').is(':focus'));
};
function get_or_set(fieldname, keep_leading_whitespace) {
@@ -42,9 +42,9 @@ function get_or_set(fieldname, keep_leading_whitespace) {
// TODO: Break out setters and getter into their own functions.
exports.stream_name = get_or_set('stream');
exports.subject = get_or_set('subject');
// We can't trim leading whitespace in `new_message_content` because
// We can't trim leading whitespace in `compose_textarea` because
// of the indented syntax for multi-line code blocks.
exports.message_content = get_or_set('new_message_content', true);
exports.message_content = get_or_set('compose-textarea', true);
exports.recipient = get_or_set('private_message_recipient');
exports.has_message_content = function () {