Display heading on boundary between historical and non-historical.

(imported from commit b1669725d5a10ae086d04d0aa03341bcb0b8b858)
This commit is contained in:
Tim Abbott
2013-04-03 17:30:06 -04:00
parent ae4d248da3
commit bad18f6971
4 changed files with 27 additions and 2 deletions

View File

@@ -271,7 +271,8 @@ MessageList.prototype = {
$.each(messages, function (index, message) {
message.include_recipient = false;
message.include_bookend = false;
if (util.same_recipient(prev, message) && self.collapse_messages) {
if (util.same_recipient(prev, message) && self.collapse_messages &&
prev.historical === message.historical) {
current_group.push(message.id);
} else {
if (current_group.length > 0)
@@ -281,6 +282,15 @@ MessageList.prototype = {
// Add a space to the table, but not for the first element.
message.include_recipient = true;
message.include_bookend = (prev !== undefined);
message.subscribed = false;
message.unsubscribed = false;
if (message.include_bookend && message.historical !== prev.historical) {
if (message.historical) {
message.unsubscribed = message.display_recipient;
} else {
message.subscribed = message.display_recipient;
}
}
}
message.include_sender = true;

View File

@@ -505,6 +505,8 @@ function add_message_metadata(message, dummy) {
var involved_people;
message.flags = message.flags || [];
message.historical = (message.flags !== undefined &&
message.flags.indexOf('historical') !== -1);
message.starred = message.flags.indexOf("starred") !== -1;
switch (message.type) {

View File

@@ -392,6 +392,10 @@ td.pointer {
font-size: 80%;
}
.tiny {
font-size: 20%;
}
.actions_hovered .message_time {
color: #0088CC;
text-decoration: underline;

View File

@@ -15,7 +15,16 @@
{{#each messages}}
{{#with this}}
{{#include_bookend}}
<tr class="bookend_tr"><td /><td /><td class="bookend" /></tr>
<tr class="bookend_tr"><td/>
<td /><td class="bookend">
{{#if subscribed}}
<center>--- Subscribed to stream {{subscribed}} ---</center>
{{/if}}
{{#if unsubscribed}}
<center>--- Unsubscribed from stream {{unsubscribed}} ---</center>
{{/if}}
<span class="tiny"><p></p></span></td>
</tr>
{{/include_bookend}}
{{#include_recipient}}