From 3609f5fdeee9ca045e50e7a2462c7d3db554f892 Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Sat, 9 Feb 2013 02:27:20 -0500 Subject: [PATCH] Add helper narrow.from_popover (imported from commit 6b20ce7e4eddff03351f5abe8f3f7c080876ea16) --- zephyr/jstemplates/actions_popover_content.html | 2 +- zephyr/static/js/narrow.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/zephyr/jstemplates/actions_popover_content.html b/zephyr/jstemplates/actions_popover_content.html index c4e90eb9fb..6a768af01c 100644 --- a/zephyr/jstemplates/actions_popover_content.html +++ b/zephyr/jstemplates/actions_popover_content.html @@ -12,7 +12,7 @@ {{#if narrowed}}
  • - + Narrow to messages around this time
  • diff --git a/zephyr/static/js/narrow.js b/zephyr/static/js/narrow.js index 229c07af47..1b35152003 100644 --- a/zephyr/static/js/narrow.js +++ b/zephyr/static/js/narrow.js @@ -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. //