From 2ff6a399762c9e7789bb01cc7b98092cbded9044 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 4 Sep 2012 19:27:58 -0400 Subject: [PATCH] Some huddle cleanups. (imported from commit 244bfde4da2a4faeb150182f232937f0cb3a9a85) --- zephyr/static/js/zephyr.js | 11 +++++++++++ zephyr/static/styles/zephyr.css | 4 ++++ zephyr/static/templates/zephyr.html | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/zephyr/static/js/zephyr.js b/zephyr/static/js/zephyr.js index 2ee1ad568c..ea54ae2268 100644 --- a/zephyr/static/js/zephyr.js +++ b/zephyr/static/js/zephyr.js @@ -226,7 +226,18 @@ function do_narrow(target_zephyr, description, filter_function) { $("#narrow_indicator").html(description); } +function narrow_huddle(target_zephyr) { + // This probably should be specific to a particular group chat, not all of them + var message = "Showing group chats"; + do_narrow(target_zephyr, message, + function(element) { + return (element.find("span.zephyr_huddle_recipient").length > 0); + } + ); +} + function narrow_personals(target_zephyr) { + // This probably should be specific to a particular person, not all of them var message = "Showing personals"; do_narrow(target_zephyr, message, function(element) { diff --git a/zephyr/static/styles/zephyr.css b/zephyr/static/styles/zephyr.css index 05f06b0350..06c66f711d 100644 --- a/zephyr/static/styles/zephyr.css +++ b/zephyr/static/styles/zephyr.css @@ -52,6 +52,10 @@ form.zephyr textarea { background-color: #3a87ad; } +.zephyr_huddle_recipient { + background-color: #3a87ad; +} + .zephyr_sender { background-color: #3a87ad; } diff --git a/zephyr/static/templates/zephyr.html b/zephyr/static/templates/zephyr.html index 3a566f0d8a..d87e5eaaed 100644 --- a/zephyr/static/templates/zephyr.html +++ b/zephyr/static/templates/zephyr.html @@ -4,7 +4,7 @@ {{#is_huddle}} {{#display_recipient}} {{name}} + onclick="narrow_huddle({{id}})">{{name}} {{/display_recipient}} ← {{/is_huddle}}