subject/topic: Rename empty_subject_placeholder.

This commit is contained in:
Steve Howell 2016-08-26 19:47:53 -07:00 committed by Tim Abbott
parent a929c6a8ba
commit 51f35f2ff7
3 changed files with 7 additions and 7 deletions

View File

@ -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());

View File

@ -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();

View File

@ -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;