Add helper narrow.from_popover

(imported from commit 6b20ce7e4eddff03351f5abe8f3f7c080876ea16)
This commit is contained in:
Keegan McAllister 2013-02-09 02:27:20 -05:00
parent 9356c0ca95
commit 3609f5fdee
2 changed files with 7 additions and 1 deletions

View File

@ -12,7 +12,7 @@
{{#if narrowed}}
<li>
<a onclick="ui.hide_actions_popover(); narrow.target({{message.id}}); narrow.activate([]);">
<a onclick="narrow.from_popover({{message.id}}); narrow.activate([]);">
<i class="icon-time"></i> Narrow to messages around this time
</a>
</li>

View File

@ -272,6 +272,12 @@ exports.by = function (operator, operand, opts) {
exports.activate([[operator, operand]], opts);
};
// Helper function for the actions popover
exports.from_popover = function (message_id) {
ui.hide_actions_popover();
exports.target(message_id);
};
// This is the message we're about to select, within the narrowed view.
// But it won't necessarily be selected once the user un-narrows.
//