Some huddle cleanups.

(imported from commit 244bfde4da2a4faeb150182f232937f0cb3a9a85)
This commit is contained in:
Tim Abbott 2012-09-04 19:27:58 -04:00
parent 4d284d8a92
commit 2ff6a39976
3 changed files with 16 additions and 1 deletions

View File

@ -226,7 +226,18 @@ function do_narrow(target_zephyr, description, filter_function) {
$("#narrow_indicator").html(description); $("#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) { function narrow_personals(target_zephyr) {
// This probably should be specific to a particular person, not all of them
var message = "Showing personals"; var message = "Showing personals";
do_narrow(target_zephyr, message, do_narrow(target_zephyr, message,
function(element) { function(element) {

View File

@ -52,6 +52,10 @@ form.zephyr textarea {
background-color: #3a87ad; background-color: #3a87ad;
} }
.zephyr_huddle_recipient {
background-color: #3a87ad;
}
.zephyr_sender { .zephyr_sender {
background-color: #3a87ad; background-color: #3a87ad;
} }

View File

@ -4,7 +4,7 @@
{{#is_huddle}} {{#is_huddle}}
{{#display_recipient}} {{#display_recipient}}
<span class="label zephyr_label_clickable zephyr_huddle_recipient" <span class="label zephyr_label_clickable zephyr_huddle_recipient"
onclick="narrow_personals({{id}})">{{name}}</span> onclick="narrow_huddle({{id}})">{{name}}</span>
{{/display_recipient}} {{/display_recipient}}
&larr; &larr;
{{/is_huddle}} {{/is_huddle}}