mirror of
https://github.com/zulip/zulip.git
synced 2026-07-09 21:21:47 +08:00
Summarization style improvements
(imported from commit 4029d96d60cae0c6856067a696a842c39f4248e3)
This commit is contained in:
parent
e03f3dabc1
commit
9be559858e
@ -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 {
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -31,19 +31,18 @@
|
||||
|
||||
{{#if is_summary}}
|
||||
<tr zid="{{first_message_id}}" id="{{dom_id}}" data-messages="{{message_ids}}" class="summary_row selectable_row{{#include_footer}} last_message{{/include_footer}}{{^is_stream}} summary_row_private_message{{/is_stream}}">
|
||||
{{#if is_stream}}
|
||||
<td class="summary_colorblock" style="background-color: {{background_color}};">
|
||||
<span class="pointer_icon"><i class="icon-vector-caret-right"></i></span>
|
||||
</td>
|
||||
<td class="message_header message_header_stream right_part">
|
||||
<span class="message_label_clickable"><i class="icon-vector-expand-alt"></i> {{display_recipient}} <i class="icon-vector-narrow icon-vector-small"></i><span class="copy-paste-text">></span> {{subject}} ({{count}} read)</span>
|
||||
<span class="message_label_clickable"><i class="icon-vector-expand-alt"></i>
|
||||
{{#if is_stream}}
|
||||
{{display_recipient}} <i class="icon-vector-narrow icon-vector-small"></i><span class="copy-paste-text">></span> {{subject}} ({{count}} read)
|
||||
{{else}}
|
||||
You and {{display_reply_to}} ({{count}} read)
|
||||
{{/if}}
|
||||
</span>
|
||||
</td>
|
||||
{{else}}
|
||||
<td class="message_header_colorblock message_header_private_message" style="background-color: {{background_color}};"></td>
|
||||
<td class="message_header message_header_private_message right_part dark_background">
|
||||
<span class="message_label_clickable"><i class="icon-vector-expand-alt"></i> You and {{display_reply_to}} ({{count}} read)</span>
|
||||
</td>
|
||||
{{/if}}
|
||||
</tr>
|
||||
{{else}}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user