Add support for topic narrows in our embedded narrow widget.

(imported from commit d3ef2db8e0903e445d9ecc2c28d9f249a0042bd9)
This commit is contained in:
Tim Abbott
2014-01-16 18:05:35 -05:00
parent 1835848782
commit bc22b1eb16
3 changed files with 16 additions and 3 deletions

View File

@@ -257,7 +257,11 @@ exports.cancel = function () {
// Never close the compose box in narrow embedded windows, but
// at least clear the subject and unfade.
compose_fade.clear_compose();
compose.subject("");
if (page_params.narrow_topic !== undefined) {
compose.subject(page_params.narrow_topic);
} else {
compose.subject("");
}
return;
}
hide_box();
@@ -906,7 +910,11 @@ $(function () {
});
if (page_params.narrow !== undefined) {
compose.start("stream", {});
if (page_params.narrow_topic !== undefined) {
compose.start("stream", {subject: page_params.narrow_topic});
} else {
compose.start("stream", {});
}
}
});