diff --git a/static/js/message_list.js b/static/js/message_list.js index 55f9dd5c97..5ec50fba0d 100644 --- a/static/js/message_list.js +++ b/static/js/message_list.js @@ -384,20 +384,22 @@ MessageList.prototype = { } function finish_summary() { - var i; - - if (prev) { - prev.include_footer = true; - } + var first = true; _.each(summary_group, function (summary_row) { summary_row.count = summary_row.messages.length; summary_row.message_ids = _.pluck(summary_row.messages, 'id').join(' '); + if (first) { + summary_row.include_bookend = true; + first = false; + } set_template_properties(summary_row); messages_to_render.push(summary_row); prev = summary_row; }); + prev.include_footer = true; + has_summary = false; summary_group = {}; prev = _.pick(prev, 'timestamp', 'historical'); @@ -415,6 +417,10 @@ MessageList.prototype = { } if (self._is_summarized_message(message)) { + if (prev) { + prev.include_footer = true; + } + var key = util.recipient_key(message); if (summary_group[key] === undefined) { // Start building a new summary row for messages from this recipient. @@ -428,7 +434,6 @@ MessageList.prototype = { is_summary: true, include_recipient: true, include_sender: false, - include_bookend: true, messages: [message] }); } else { diff --git a/static/styles/zulip.css b/static/styles/zulip.css index 473326e0db..b295b97d1e 100644 --- a/static/styles/zulip.css +++ b/static/styles/zulip.css @@ -614,6 +614,31 @@ td.pointer { box-shadow: inset 0px 2px 1px -2px #333, inset -2px 0px 1px -2px #333, inset 0px -2px 1px -2px #ccc; } +.summary_row .message_header{ + padding: 5px 0px 4px 5px; +} + +.summary_row .message_header { + border-radius: 0; +} + +.bookend_tr + .summary_row .message_header { + border-top-right-radius: 3px; +} + +.bookend_tr + .summary_row .summary_colorblock { + border-top-left-radius: 3px; +} + +.summary_row.last_message .message_header { + border-bottom-right-radius: 3px; + box-shadow: inset 0px 2px 1px -2px #333, inset -2px 0px 1px -2px #333, inset 0px -2px 1px -2px #333; +} + +.summary_row.last_message .summary_colorblock { + border-bottom-left-radius: 3px; +} + .message_header .icon-vector-narrow { font-size: 0.6em; position: relative; @@ -634,6 +659,10 @@ td.pointer { box-shadow: inset 0px 2px 1px -2px #333, inset 2px 0px 1px -2px #333 !important; } +.summary_row_private_message .summary_colorblock { + background: #000; +} + .floating_recipient .message_header { box-shadow: inset 0px 2px 1px -2px #333, inset -2px 0px 1px -2px #333 !important; } diff --git a/static/templates/message.handlebars b/static/templates/message.handlebars index be0ae67e42..83b3042430 100644 --- a/static/templates/message.handlebars +++ b/static/templates/message.handlebars @@ -31,19 +31,18 @@ {{#if is_summary}}
{{else}}