mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-24 21:58:06 +00:00
Added work for twisty and for unread column.
This commit is contained in:
parent
3e72153d7a
commit
66084354e7
@ -71,7 +71,7 @@ function GetThreadTree()
|
||||
function GetThreadTreeFolder()
|
||||
{
|
||||
var tree = GetThreadTree();
|
||||
return tree.childNodes[8];
|
||||
return tree.childNodes[9];
|
||||
}
|
||||
|
||||
function FindMessenger()
|
||||
@ -186,7 +186,8 @@ function ChangeFolderByDOMNode(folderNode)
|
||||
{
|
||||
var uri = folderNode.getAttribute('id');
|
||||
dump(uri + "\n");
|
||||
ChangeFolderByURI(uri);
|
||||
if(uri)
|
||||
ChangeFolderByURI(uri);
|
||||
}
|
||||
|
||||
function ChangeFolderByURI(uri)
|
||||
@ -284,8 +285,26 @@ function RefreshThreadTreeView()
|
||||
|
||||
function ToggleTwisty(treeItem)
|
||||
{
|
||||
dump(treeItem);
|
||||
return true;
|
||||
|
||||
var openState = treeItem.getAttribute('open');
|
||||
if(openState == 'true')
|
||||
{
|
||||
treeItem.removeAttribute('open');
|
||||
}
|
||||
else
|
||||
{
|
||||
treeItem.setAttribute('open', 'true');
|
||||
}
|
||||
}
|
||||
|
||||
function ToggleMessageRead(treeItem)
|
||||
{
|
||||
|
||||
var tree = GetThreadTree();
|
||||
var status = treeItem.getAttribute('Status');
|
||||
var unread = (status == "") || (status == "new");
|
||||
messenger.MarkMessageRead(tree.database, treeItem, unread);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -40,9 +40,12 @@
|
||||
<rule rootcontainment="treechildren" subcontainment="treechildren">
|
||||
<treeitem uri="...">
|
||||
<treerow >
|
||||
<treecell treeallowevents="true">
|
||||
<titledbutton align="right" class="twisty" onclick="return top.ToggleTwisty(event.target.parentNode.parentNode.parentNode)" />
|
||||
</treecell>
|
||||
<treecell>
|
||||
<treeindentation />
|
||||
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#Name" align="right" />
|
||||
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#Name" align="right" class="folderIcon"/>
|
||||
</treecell>
|
||||
<treecell>
|
||||
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#TotalUnreadMessages" align="right" style="list-style-image: none;" />
|
||||
@ -55,11 +58,13 @@
|
||||
</rule>
|
||||
</template>
|
||||
|
||||
<treecol style="width:70%" rdf:resource="http://home.netscape.com/NC-rdf#Name"/>
|
||||
<treecol style="width:20px"/>
|
||||
<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"/>
|
||||
<treehead>
|
||||
<treerow>
|
||||
<treecell></treecell>
|
||||
<treecell>&nameColumn.label;</treecell>
|
||||
<treecell>&unreadColumn.label;</treecell>
|
||||
<treecell>&totalColumn.label;</treecell>
|
||||
@ -70,6 +75,7 @@
|
||||
|
||||
<treeitem ref="msgaccounts:/" open="true">
|
||||
<treerow>
|
||||
<treecell/>
|
||||
<treecell>
|
||||
<treeindentation/>
|
||||
<html:img hspace="2" style="vertical-align: bottom" src="&accounts.img;"/>&accounts.label;
|
||||
|
@ -30,6 +30,7 @@ Rights Reserved.
|
||||
<!ENTITY statusColumn.label "Status">
|
||||
<!ENTITY unreadColumn.label "Unread">
|
||||
<!ENTITY totalColumn.label "Total">
|
||||
<!ENTITY readcol.img "chrome://messenger/skin/readcol.gif">
|
||||
]>
|
||||
|
||||
<window
|
||||
@ -51,6 +52,9 @@ Rights Reserved.
|
||||
<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>
|
||||
@ -68,9 +72,10 @@ Rights Reserved.
|
||||
</rule>
|
||||
</template>
|
||||
|
||||
<treecol style="width:39%" id="SubjectColumn" rdf:resource="http://home.netscape.com/NC-rdf#Subject"/>
|
||||
<treecol style="width:22%" id="AuthorColumn" rdf:resource="http://home.netscape.com/NC-rdf#Sender"/>
|
||||
<treecol style="width:15%" id="DateColumn" rdf:resource="http://home.netscape.com/NC-rdf#Date"/>
|
||||
<treecol style="width:37%" id="SubjectColumn" rdf:resource="http://home.netscape.com/NC-rdf#Subject"/>
|
||||
<treecol style="width:20%" id="AuthorColumn" rdf:resource="http://home.netscape.com/NC-rdf#Sender"/>
|
||||
<treecol style="width:20px" id="UnreadButtonColumn"/>
|
||||
<treecol style="width:14%" id="DateColumn" rdf:resource="http://home.netscape.com/NC-rdf#Date"/>
|
||||
<treecol style="width:8%" id="StatusColumn" rdf:resource="http://home.netscape.com/NC-rdf#Status"/>
|
||||
<treecol style="width:8%" id="UnreadColumn" rdf:resource="http://home.netscape.com/NC-rdf#TotalUnreadMessages"/>
|
||||
<treecol style="width:8%" id="TotalColumn" rdf:resource="http://home.netscape.com/NC-rdf#TotalMessages"/>
|
||||
@ -78,6 +83,9 @@ Rights Reserved.
|
||||
<treerow>
|
||||
<treecell onclick="return top.SortThreadPane('SubjectColumn', 'http://home.netscape.com/NC-rdf#Subject');">&subjectColumn.label;</treecell>
|
||||
<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('StatusColumn', 'http://home.netscape.com/NC-rdf#Status');">&statusColumn.label;</treecell>
|
||||
<treecell onclick="return top.SortThreadPane('UnreadColumn', 'http://home.netscape.com/NC-rdf#TotalUnreadMessages');">&unreadColumn.label;</treecell>
|
||||
|
Loading…
x
Reference in New Issue
Block a user