implement Date Received; msg header tweak; rfc822 Z tz fix; refresh collections tree again to show state icon.

This commit is contained in:
alta88@gmail.com 2009-10-25 10:20:17 -06:00
Родитель d20518438c
Коммит f630ec56d8
7 изменённых файлов: 29 добавлений и 7 удалений

Просмотреть файл

@ -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");
}
};