зеркало из https://github.com/mozilla/pjs.git
More work on columns. Thread column can now be clicked on to change view. Also update to make
work with recent tree changes.
This commit is contained in:
Родитель
4ba0f18641
Коммит
5cf42dc960
|
@ -556,6 +556,47 @@ function OnLoadThreadPane(threadTree)
|
|||
messageDataSource = messageDataSource.QueryInterface(Components.interfaces.nsIRDFDataSource);
|
||||
threadTree.database.AddDataSource(messageDataSource);
|
||||
|
||||
|
||||
ShowThreads(false);
|
||||
}
|
||||
|
||||
function ChangeThreadView()
|
||||
{
|
||||
var threadPane = GetThreadPane();
|
||||
var threadColumn = threadPane.document.getElementById('ThreadColumnHeader');
|
||||
if(threadColumn)
|
||||
{
|
||||
var currentView = threadColumn.getAttribute('currentView');
|
||||
if(currentView== 'threaded')
|
||||
{
|
||||
ShowThreads(false);
|
||||
}
|
||||
else if(currentView == 'unthreaded')
|
||||
{
|
||||
ShowThreads(true);
|
||||
}
|
||||
RefreshThreadTreeView();
|
||||
}
|
||||
}
|
||||
|
||||
function ShowThreads(showThreads)
|
||||
{
|
||||
var view = messageViewDataSource.QueryInterface(Components.interfaces.nsIMessageView);
|
||||
if(view)
|
||||
{
|
||||
view.SetShowThreads(showThreads);
|
||||
var threadPane = GetThreadPane();
|
||||
var threadColumn = threadPane.document.getElementById('ThreadColumnHeader');
|
||||
if(threadColumn)
|
||||
{
|
||||
if(showThreads)
|
||||
{
|
||||
threadColumn.setAttribute('currentView', 'threaded');
|
||||
}
|
||||
else
|
||||
{
|
||||
threadColumn.setAttribute('currentView', 'unthreaded');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -43,32 +43,24 @@
|
|||
BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
|
||||
IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
|
||||
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
|
||||
<treerow >
|
||||
<treecell>
|
||||
<treeindentation />
|
||||
<titledbutton class="twisty" treeallowevents="true" onclick="return top.ToggleTwisty(event.target.parentNode.parentNode.parentNode)" />
|
||||
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#Name" align="left" class="folderIcon"/>
|
||||
</treecell>
|
||||
<treecell>
|
||||
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#TotalUnreadMessages" align="right" style="list-style-image: none;" />
|
||||
</treecell>
|
||||
<treecell>
|
||||
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#TotalMessages" align="right" style="list-style-image: none;" />
|
||||
</treecell>
|
||||
<treerow >
|
||||
<treecell indent="true" value="rdf:http://home.netscape.com/NC-rdf#Name"/>
|
||||
<treecell value="rdf:http://home.netscape.com/NC-rdf#TotalUnreadMessages"/>
|
||||
<treecell value="rdf:http://home.netscape.com/NC-rdf#TotalMessages"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
|
||||
<treecol style="width:65%" rdf:resource="http://home.netscape.com/NC-rdf#Name"/>
|
||||
<treecol style="width:15%" rdf:resource="http://home.netscape.com/NC-rdf#TotalUnreadMessages"/>
|
||||
<treecol style="width:15%" rdf:resource="http://home.netscape.com/NC-rdf#TotalMessages"/>
|
||||
<treecol style="width:60%" rdf:resource="http://home.netscape.com/NC-rdf#Name"/>
|
||||
<treecol style="width:20%" rdf:resource="http://home.netscape.com/NC-rdf#TotalUnreadMessages"/>
|
||||
<treecol style="width:20%" rdf:resource="http://home.netscape.com/NC-rdf#TotalMessages"/>
|
||||
<treehead>
|
||||
<treerow>
|
||||
<treecell>&nameColumn.label;</treecell>
|
||||
<treecell>&unreadColumn.label;</treecell>
|
||||
<treecell>&totalColumn.label;</treecell>
|
||||
<treecell value="&nameColumn.label;"/>
|
||||
<treecell value="&unreadColumn.label;"/>
|
||||
<treecell value="&totalColumn.label;"/>
|
||||
</treerow>
|
||||
</treehead>
|
||||
|
||||
|
|
|
@ -40,42 +40,20 @@ Rights Reserved.
|
|||
<treechildren>
|
||||
<treeitem uri="..."
|
||||
Status="rdf:http://home.netscape.com/NC-rdf#Status"
|
||||
Flagged="rdf:http://home.netscape.com/NC-rdf#Flagged">
|
||||
Flagged="rdf:http://home.netscape.com/NC-rdf#Flagged"
|
||||
currentView="currentView">
|
||||
<treerow >
|
||||
<treecell>
|
||||
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#Thread" align="right" style="list-style-image: none;" />
|
||||
</treecell>
|
||||
<treecell>
|
||||
<treeindentation />
|
||||
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#Subject" align="right" />
|
||||
</treecell>
|
||||
<treecell>
|
||||
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#Sender" align="right" style="list-style-image: none;" />
|
||||
</treecell>
|
||||
<treecell treeallowevents="true">
|
||||
<titledbutton align="right" class="unreadcol" onclick="return top.ToggleMessageRead(event.target.parentNode.parentNode.parentNode)" />
|
||||
</treecell>
|
||||
<treecell>
|
||||
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#Date" align="right" style="list-style-image: none;" />
|
||||
</treecell>
|
||||
<treecell>
|
||||
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#Priority" align="right" style="list-style-image: none;" />
|
||||
</treecell>
|
||||
<treecell treeallowevents="true">
|
||||
<titledbutton align="right" class="flagcol" onclick="return top.ToggleMessageFlagged(event.target.parentNode.parentNode.parentNode)" />
|
||||
</treecell>
|
||||
<treecell>
|
||||
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#Status" align="right" style="list-style-image: none;" />
|
||||
</treecell>
|
||||
<treecell>
|
||||
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#Size" align="right" style="list-style-image: none;" />
|
||||
</treecell>
|
||||
<treecell>
|
||||
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#TotalUnreadMessages" align="right" style="list-style-image: none;" />
|
||||
</treecell>
|
||||
<treecell>
|
||||
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#TotalMessages" align="right" style="list-style-image: none;" />
|
||||
</treecell>
|
||||
<treecell value="rdf:http://home.netscape.com/NC-rdf#Thread"/>
|
||||
<treecell indent="true" value="rdf:http://home.netscape.com/NC-rdf#Subject"/>
|
||||
<treecell value="rdf:http://home.netscape.com/NC-rdf#Sender"/>
|
||||
<treecell treeallowevents="true" class="unreadcol" onclick="return top.ToggleMessageRead(event.target.parentNode.parentNode.parentNode)"/>
|
||||
<treecell value="rdf:http://home.netscape.com/NC-rdf#Date"/>
|
||||
<treecell value="rdf:http://home.netscape.com/NC-rdf#Priority"/>
|
||||
<treecell treeallowevents="true" class="flagcol" onclick="return top.ToggleMessageFlagged(event.target.parentNode.parentNode.parentNode)" />
|
||||
<treecell value="rdf:http://home.netscape.com/NC-rdf#Status"/>
|
||||
<treecell value="rdf:http://home.netscape.com/NC-rdf#Size"/>
|
||||
<treecell value="rdf:http://home.netscape.com/NC-rdf#TotalUnreadMessages"/>
|
||||
<treecell value="rdf:http://home.netscape.com/NC-rdf#TotalMessages"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
|
@ -95,23 +73,17 @@ Rights Reserved.
|
|||
<treecol style="width:8%" id="TotalColumn" rdf:resource="http://home.netscape.com/NC-rdf#TotalMessages"/>
|
||||
<treehead>
|
||||
<treerow>
|
||||
<treecell>
|
||||
<html:img src="&threadcol.img;"/>
|
||||
</treecell>
|
||||
<treecell onclick="return top.SortThreadPane('SubjectColumn', 'http://home.netscape.com/NC-rdf#Subject');">&subjectColumn.label;</treecell>
|
||||
<treecell onclick="return top.ChangeThreadView();" class='threadColumnHeader' id="ThreadColumnHeader"/>
|
||||
<treecell value="&subjectColumn.label;" onclick="return top.SortThreadPane('SubjectColumn', 'http://home.netscape.com/NC-rdf#Subject');"/>
|
||||
<treecell onclick="return top.SortThreadPane('AuthorColumn', 'http://home.netscape.com/NC-rdf#Sender');">&senderColumn.label;</treecell>
|
||||
<treecell>
|
||||
<html:img src="&readcol.img;"/>
|
||||
</treecell>
|
||||
<treecell onclick="return top.SortThreadPane('DateColumn', 'http://home.netscape.com/NC-rdf#Date');">&dateColumn.label;</treecell>
|
||||
<treecell onclick="return top.SortThreadPane('PriorityColumn', 'http://home.netscape.com/NC-rdf#Priority');">&priorityColumn.label;</treecell>
|
||||
<treecell>
|
||||
<html:img src="&flagcol.img;"/>
|
||||
</treecell>
|
||||
<treecell onclick="return top.SortThreadPane('StatusColumn', 'http://home.netscape.com/NC-rdf#Status');">&statusColumn.label;</treecell>
|
||||
<treecell onclick="return top.SortThreadPane('SizeColumn', 'http://home.netscape.com/NC-rdf#Size');">&sizeColumn.label;</treecell>
|
||||
<treecell onclick="return top.SortThreadPane('UnreadColumn', 'http://home.netscape.com/NC-rdf#TotalUnreadMessages');">&unreadColumn.label;</treecell>
|
||||
<treecell onclick="return top.SortThreadPane('TotalColumn', 'http://home.netscape.com/NC-rdf#TotalMessages');">&totalColumn.label;</treecell>
|
||||
<treecell class="readColumnHeader"/>
|
||||
<treecell value="&dateColumn.label;" onclick="return top.SortThreadPane('DateColumn', 'http://home.netscape.com/NC-rdf#Date');"/>
|
||||
<treecell value="&priorityColumn.label;" onclick="return top.SortThreadPane('PriorityColumn', 'http://home.netscape.com/NC-rdf#Priority');"/>
|
||||
<treecell class="flagColumnHeader"/>
|
||||
<treecell value="&statusColumn.label;" onclick="return top.SortThreadPane('StatusColumn', 'http://home.netscape.com/NC-rdf#Status');"/>
|
||||
<treecell value="&sizeColumn.label;" onclick="return top.SortThreadPane('SizeColumn', 'http://home.netscape.com/NC-rdf#Size');"/>
|
||||
<treecell value="&unreadColumn.label;" onclick="return top.SortThreadPane('UnreadColumn', 'http://home.netscape.com/NC-rdf#TotalUnreadMessages');"/>
|
||||
<treecell value="&totalColumn.label;" onclick="return top.SortThreadPane('TotalColumn', 'http://home.netscape.com/NC-rdf#TotalMessages');"/>
|
||||
</treerow>
|
||||
</treehead>
|
||||
</tree>
|
||||
|
|
|
@ -27,6 +27,3 @@ Rights Reserved.
|
|||
<!ENTITY sizeColumn.label "Size">
|
||||
<!ENTITY unreadColumn.label "Unread">
|
||||
<!ENTITY totalColumn.label "Total">
|
||||
<!ENTITY readcol.img "chrome://messenger/skin/readcol.gif">
|
||||
<!ENTITY flagcol.img "chrome://messenger/skin/flagcol.gif">
|
||||
<!ENTITY threadcol.img "chrome://messenger/skin/unthreadcol.gif">
|
||||
|
|
|
@ -23,99 +23,89 @@ window {
|
|||
background-color:white;
|
||||
}
|
||||
|
||||
treerow > treecell > titledbutton{
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
color: inherit;
|
||||
border: none;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
|
||||
/* basic mail folders */
|
||||
treeitem > treerow > treecell > titledbutton.folderIcon {
|
||||
treeitem > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/Folder.gif");
|
||||
}
|
||||
|
||||
treeitem[open="true"] > treerow > treecell > titledbutton.folderIcon {
|
||||
treeitem[open="true"] > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/FolderO.gif");
|
||||
}
|
||||
|
||||
treeitem[IsServer="true"] > treerow > treecell > titledbutton.folderIcon {
|
||||
treeitem[IsServer="true"] > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/Server.gif");
|
||||
}
|
||||
|
||||
/* special folder */
|
||||
treeitem[SpecialFolder="Inbox"] > treerow > treecell > titledbutton.folderIcon {
|
||||
treeitem[SpecialFolder="Inbox"] > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/FolderInbox.gif");
|
||||
}
|
||||
|
||||
treeitem[SpecialFolder="Inbox"][open="true"] > treerow > treecell > titledbutton.folderIcon
|
||||
treeitem[SpecialFolder="Inbox"][open="true"] > treerow > treecell > .tree-icon
|
||||
{
|
||||
list-style-image: url("chrome://messenger/skin/FolderInboxO.gif");
|
||||
}
|
||||
|
||||
treeitem[SpecialFolder="Trash"] > treerow > treecell > titledbutton.folderIcon {
|
||||
treeitem[SpecialFolder="Trash"] > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/FolderTrash.gif");
|
||||
}
|
||||
|
||||
treeitem[SpecialFolder="Trash"][open="true"] > treerow > treecell > titledbutton.folderIcon {
|
||||
treeitem[SpecialFolder="Trash"][open="true"] > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/FolderTrashO.gif");
|
||||
}
|
||||
|
||||
treeitem[SpecialFolder="Sent"] > treerow > treecell > titledbutton.folderIcon {
|
||||
treeitem[SpecialFolder="Sent"] > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/FolderSent.gif");
|
||||
}
|
||||
|
||||
treeitem[SpecialFolder="Sent"][open="true"] > treerow > treecell > titledbutton.folderIcon {
|
||||
treeitem[SpecialFolder="Sent"][open="true"] > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/FolderSentO.gif");
|
||||
}
|
||||
|
||||
treeitem[SpecialFolder="Templates"] > treerow > treecell > titledbutton.folderIcon {
|
||||
treeitem[SpecialFolder="Templates"] > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/FolderTemplate.gif");
|
||||
}
|
||||
|
||||
treeitem[SpecialFolder="Templates"][open="true"] > treerow > treecell > titledbutton.folderIcon {
|
||||
treeitem[SpecialFolder="Templates"][open="true"] > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/FolderTemplateO.gif");
|
||||
}
|
||||
|
||||
treeitem[SpecialFolder="Drafts"] > treerow > treecell > titledbutton.folderIcon {
|
||||
treeitem[SpecialFolder="Drafts"] > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/FolderDraft.gif");
|
||||
}
|
||||
|
||||
treeitem[SpecialFolder="Drafts"][open="true"] > treerow > treecell > titledbutton.folderIcon {
|
||||
treeitem[SpecialFolder="Drafts"][open="true"] > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/FolderDraftO.gif");
|
||||
}
|
||||
|
||||
treeitem[SpecialFolder="Unsent Messages"] > treerow > treecell > titledbutton.folderIcon {
|
||||
treeitem[SpecialFolder="Unsent Messages"] > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/FolderOutbox.gif");
|
||||
}
|
||||
|
||||
treeitem[BiffState="NewMail"] > treerow > treecell > titledbutton.folderIcon {
|
||||
treeitem[BiffState="NewMail"] > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/FolderNew.gif");
|
||||
}
|
||||
|
||||
/* IMAP folders */
|
||||
treeitem[ServerType="imap"] > treerow > treecell > titledbutton.folderIcon {
|
||||
treeitem[ServerType="imap"] > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/FolderServer.gif");
|
||||
}
|
||||
|
||||
treeitem[ServerType="imap"][open="true"] > treerow > treecell > titledbutton.folderIcon {
|
||||
treeitem[ServerType="imap"][open="true"] > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/FolderServerO.gif");
|
||||
}
|
||||
|
||||
treeitem[IsServer="true"][ServerType="imap"] > treerow > treecell > titledbutton.folderIcon {
|
||||
treeitem[IsServer="true"][ServerType="imap"] > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/ServerRemote.gif");
|
||||
}
|
||||
|
||||
|
||||
/* News folders */
|
||||
treeitem[ServerType="nntp"] > treerow > treecell > titledbutton.folderIcon {
|
||||
treeitem[ServerType="nntp"] > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/FolderNewsgroup.gif");
|
||||
}
|
||||
|
||||
treeitem[IsServer="true"][ServerType="nntp"] > treerow > treecell > titledbutton.folderIcon {
|
||||
treeitem[IsServer="true"][ServerType="nntp"] > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/ServerNews.gif");
|
||||
}
|
||||
|
||||
|
|
|
@ -31,33 +31,42 @@ treeitem[Status="new"] > treerow{
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
treerow > treecell > titledbutton {
|
||||
//list-style-image: url("chrome://messenger/skin/mailMessage.gif");
|
||||
color: inherit;
|
||||
border: none;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
treeitem > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://messenger/skin/mailMessage.gif");
|
||||
}
|
||||
|
||||
titledbutton.unreadcol {
|
||||
treecell.unreadcol > .tree-button {
|
||||
list-style-image: url("chrome://messenger/skin/readmail.gif");
|
||||
}
|
||||
|
||||
treeitem[Status=" "] treerow > treecell > titledbutton.unreadcol {
|
||||
treeitem[Status=" "] treerow > treecell.unreadcol > .tree-button {
|
||||
list-style-image: url("chrome://messenger/skin/unreadmail.gif");
|
||||
}
|
||||
|
||||
treeitem[Status="new"] treerow > treecell > titledbutton.unreadcol {
|
||||
treeitem[Status="new"] treerow > treecell.unreadcol > tree-button {
|
||||
list-style-image: url("chrome://messenger/skin/unreadmail.gif");
|
||||
}
|
||||
|
||||
titledbutton.flagcol {
|
||||
treecell.flagcol > .tree-button {
|
||||
list-style-image: url("chrome://messenger/skin/readmail.gif");
|
||||
}
|
||||
|
||||
treeitem[Flagged="flagged"] treerow > treecell > titledbutton.flagcol {
|
||||
treeitem[Flagged="flagged"] treerow > treecell.flagcol > .tree-button{
|
||||
list-style-image: url("chrome://messenger/skin/flaggedmail.gif");
|
||||
}
|
||||
|
||||
treecell.threadColumnHeader[currentView="threaded"] {
|
||||
list-style-image: url("chrome://messenger/skin/threadcol.gif");
|
||||
}
|
||||
|
||||
treecell.threadColumnHeader[currentView="unthreaded"] {
|
||||
list-style-image: url("chrome://messenger/skin/unthreadcol.gif");
|
||||
}
|
||||
|
||||
treecell.readColumnHeader > .tree-button {
|
||||
list-style-image: url("chrome://messenger/skin/readcol.gif");
|
||||
}
|
||||
|
||||
treecell.flagColumnHeader > .tree-button {
|
||||
list-style-image: url("chrome://messenger/skin/flagcol.gif");
|
||||
}
|
||||
|
|
|
@ -27,6 +27,3 @@ Rights Reserved.
|
|||
<!ENTITY sizeColumn.label "Size">
|
||||
<!ENTITY unreadColumn.label "Unread">
|
||||
<!ENTITY totalColumn.label "Total">
|
||||
<!ENTITY readcol.img "chrome://messenger/skin/readcol.gif">
|
||||
<!ENTITY flagcol.img "chrome://messenger/skin/flagcol.gif">
|
||||
<!ENTITY threadcol.img "chrome://messenger/skin/unthreadcol.gif">
|
||||
|
|
Загрузка…
Ссылка в новой задаче