зеркало из https://github.com/mozilla/snowl.git
implement Date Received; msg header tweak; rfc822 Z tz fix; refresh collections tree again to show state icon.
This commit is contained in:
Родитель
d20518438c
Коммит
f630ec56d8
|
@ -110,7 +110,8 @@ let SnowlMessageView = {
|
|||
"snowlSourceCol": "source.name",
|
||||
"snowlAuthorCol": "author.person.name",
|
||||
"snowlSubjectCol": "subject",
|
||||
"snowlTimestampCol": "timestamp"
|
||||
"snowlTimestampCol": "timestamp",
|
||||
"snowlDateReceivedCol": "received"
|
||||
},
|
||||
|
||||
Filters: {},
|
||||
|
@ -144,6 +145,9 @@ let SnowlMessageView = {
|
|||
case "snowlTimestampCol":
|
||||
return SnowlDateUtils._formatDate(this._collection.messages[aRow].timestamp);
|
||||
|
||||
case "snowlDateReceivedCol":
|
||||
return SnowlDateUtils._formatDate(this._collection.messages[aRow].received);
|
||||
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
@ -593,7 +597,6 @@ let SnowlMessageView = {
|
|||
return;
|
||||
|
||||
let column = aEvent.target;
|
||||
let property = this._columnProperties[column.id];
|
||||
let sortResource = this._tree.getAttribute("sortResource");
|
||||
let sortDirection = this._tree.getAttribute("sortDirection");
|
||||
|
||||
|
|
|
@ -135,6 +135,11 @@
|
|||
persist="width ordinal hidden sortDirection"
|
||||
class="sortDirectionIndicator"
|
||||
onclick="SnowlMessageView.onClickColumnHeader(event)"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="snowlDateReceivedCol" label="&datereceivedCol.label;" flex="1"
|
||||
persist="width ordinal hidden sortDirection"
|
||||
class="sortDirectionIndicator"
|
||||
onclick="SnowlMessageView.onClickColumnHeader(event)"/>
|
||||
</treecols>
|
||||
|
||||
<treechildren flex="1"
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
}
|
||||
|
||||
#headerDeck, #headerFullTable {
|
||||
font: 9pt sans-serif;
|
||||
font-family: sans-serif;
|
||||
border-spacing: 0px 0px;
|
||||
width: 100%;
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ td {
|
|||
|
||||
#headerDeck:not([header="brief"]) > #briefHeaderRow > .headerDataSubject,
|
||||
#headerDeck:not([header="brief"]) > #briefHeaderRow > .headerLabelSubject {
|
||||
padding-top: 8px;
|
||||
padding-top: .5em;
|
||||
}
|
||||
|
||||
#headerDeck[deleted] > #briefHeaderRow > .headerDataSubject > #subject{
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<!ENTITY authorCol.label "Author">
|
||||
<!ENTITY subjectCol.label "Subject">
|
||||
<!ENTITY timestampCol.label "Date">
|
||||
<!ENTITY datereceivedCol.label "Date Received">
|
||||
|
||||
<!ENTITY openListMessage.label "Open Message">
|
||||
<!ENTITY openListMessage.accesskey "O">
|
||||
|
|
|
@ -410,8 +410,8 @@ SnowlFeed.prototype = {
|
|||
message.source = this;
|
||||
message.externalID = aExternalID;
|
||||
message.subject = aEntry.title.text;
|
||||
message.timestamp = aEntry.updated ? new Date(aEntry.updated)
|
||||
: aEntry.published ? new Date(aEntry.published)
|
||||
message.timestamp = aEntry.updated ? new Date(SnowlDateUtils.RFC822Date(aEntry.updated))
|
||||
: aEntry.published ? new Date(SnowlDateUtils.RFC822Date(aEntry.published))
|
||||
: aEntry.fields.get("dc:date") ? ISO8601DateUtils.parse(aEntry.fields.get("dc:date"))
|
||||
: null;
|
||||
message.received = aReceived;
|
||||
|
|
|
@ -301,7 +301,9 @@ let SnowlService = {
|
|||
// TODO: Don't set busy on 'all' until we know when the last one is done
|
||||
// so it can be unset.
|
||||
// this._collectionStatsByCollectionID["all"].busy = true;
|
||||
// Observers.notify("snowl:messages:completed", "refresh");
|
||||
|
||||
// Invalidate tree to show new state.
|
||||
Observers.notify("snowl:messages:completed", "refresh");
|
||||
}
|
||||
|
||||
// We specify the same refresh time when refreshing sources so that all
|
||||
|
|
|
@ -259,6 +259,17 @@ let SnowlDateUtils = {
|
|||
date.getHours(),
|
||||
date.getMinutes(),
|
||||
date.getSeconds());
|
||||
},
|
||||
|
||||
/**
|
||||
* RFC822 allows for military timezones, which have since been deprecated due
|
||||
* to an error in the spec; Z is unambigous so we will convert Z only to UT
|
||||
* here, not the other offset chars.
|
||||
* @param date {Date} the date to format
|
||||
* @returns converted RFC822 date that Date understands.
|
||||
*/
|
||||
RFC822Date: function(date) {
|
||||
return date.replace(/\b[zZ]{1}\b/, "UT");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче