Prefill the existing topic when editing a message topic.

This is a behavior that basically only administrators can trigger
today, with the exception of the fact that anyone can edit a no-topic
message.

(imported from commit d50eded79ddf3438d87e3dc6a8641fbfb034d50c)
This commit is contained in:
Waseem Daher 2013-11-20 18:28:14 -05:00
parent 8bfbaab1d5
commit ce29c4dd34
1 changed files with 6 additions and 1 deletions

View File

@ -133,7 +133,12 @@ exports.start_topic_edit = function (recipient_row) {
var form = $(templates.render('topic_edit_form'));
current_msg_list.show_edit_topic(recipient_row, form);
form.keydown(handle_edit_keydown);
form.find(".message_edit_topic").focus();
var message = current_msg_list.get(rows.id(recipient_row));
var topic = message.subject;
if (topic === compose.empty_subject_placeholder()) {
topic = '';
}
form.find(".message_edit_topic").val(topic).select().focus();
};
exports.is_editing = function (id) {