From 51f35f2ff7ae9b9f67eef70ae3aefff6a9b95565 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Fri, 26 Aug 2016 19:47:53 -0700 Subject: [PATCH] subject/topic: Rename empty_subject_placeholder. --- static/js/compose.js | 8 ++++---- static/js/message_edit.js | 4 ++-- static/js/message_store.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/static/js/compose.js b/static/js/compose.js index 74e8a4913f..f860ee12f6 100644 --- a/static/js/compose.js +++ b/static/js/compose.js @@ -10,7 +10,7 @@ var is_composing_message = false; var user_acknowledged_all_everyone; var message_snapshot; -var empty_subject_placeholder = "(no topic)"; +var empty_topic_placeholder = "(no topic)"; var uploads_domain = document.location.protocol + '//' + document.location.host; var uploads_path = '/user_uploads'; @@ -305,15 +305,15 @@ exports.cancel = function () { $(document).trigger($.Event('compose_canceled.zulip')); }; -exports.empty_subject_placeholder = function () { - return empty_subject_placeholder; +exports.empty_topic_placeholder = function () { + return empty_topic_placeholder; }; function create_message_object() { // Subjects are optional, and we provide a placeholder if one isn't given. var subject = compose.subject(); if (subject === "") { - subject = compose.empty_subject_placeholder(); + subject = compose.empty_topic_placeholder(); } var content = make_uploads_relative(compose.message_content()); diff --git a/static/js/message_edit.js b/static/js/message_edit.js index ff28e6d941..170c166571 100644 --- a/static/js/message_edit.js +++ b/static/js/message_edit.js @@ -177,7 +177,7 @@ function edit_message (row, raw_content) { } currently_editing_messages[message.id] = edit_obj; - if ((message.type === 'stream' && message.subject === compose.empty_subject_placeholder()) || + if ((message.type === 'stream' && message.subject === compose.empty_topic_placeholder()) || !can_edit_content) { edit_row.find(".message_edit_topic").focus(); } else { @@ -240,7 +240,7 @@ exports.start_topic_edit = function (recipient_row) { var msg_id = rows.id_for_recipient_row(recipient_row); var message = current_msg_list.get(msg_id); var topic = message.subject; - if (topic === compose.empty_subject_placeholder()) { + if (topic === compose.empty_topic_placeholder()) { topic = ''; } form.find(".message_edit_topic").val(topic).select().focus(); diff --git a/static/js/message_store.js b/static/js/message_store.js index 1598fc11c5..5e93d89a7f 100644 --- a/static/js/message_store.js +++ b/static/js/message_store.js @@ -110,7 +110,7 @@ function set_topic_edit_properties(message) { // Messages with no topics should always have an edit icon visible // to encourage updating them. Admins can also edit any topic. - if (message.subject === compose.empty_subject_placeholder()) { + if (message.subject === compose.empty_topic_placeholder()) { message.always_visible_topic_edit = true; } else if (page_params.is_admin) { message.on_hover_topic_edit = true;