From fd9d48f6df54654c3f254f568db46e8bee9411b1 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Mon, 25 Nov 2013 10:57:00 -0500 Subject: [PATCH] [staging] Double-clicking on stream row toggles its zoom level. If you double-click on a stream that you've narrowed to, it will either zoom in or zoom out the left sidebar view. Zooming in shows just that stream; zooming out shows all streams. This is feature flagged to staging only. (imported from commit 6fdb3cacd68635f313f2a8a81edf2d6101cce2cb) --- static/js/stream_list.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/static/js/stream_list.js b/static/js/stream_list.js index 3c564e7fc4..af5f1b77bd 100644 --- a/static/js/stream_list.js +++ b/static/js/stream_list.js @@ -443,6 +443,21 @@ $(function () { previous_sort_order = undefined; }); + $('#stream_filters').on('dblclick', 'li .subscription_block', function (e) { + if (!feature_flags.topic_zooming) { + return; + } + + var stream = $(e.target).parents('li').attr('data-name'); + + if (stream === active_stream_name()) { + toggle_zoom(); + } + + e.preventDefault(); + e.stopPropagation(); + }); + $('#stream_filters').on('click', 'li .subscription_block', function (e) { if (e.metaKey || e.ctrlKey) { return;