NOT PART OF THE BUILD. more hacking with bienvenu.

This commit is contained in:
sspitzer%netscape.com 2001-02-08 22:02:48 +00:00
Родитель f7ef71585e
Коммит e7ec23f934
2 изменённых файлов: 33 добавлений и 3 удалений

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

@ -1,6 +1,30 @@
var dbview;
var nsMsgViewSortType = Components.interfaces.nsMsgViewSortType;
var nsMsgViewSortOrder = Components.interfaces.nsMsgViewSortOrder;
function doit() function createView()
{ {
var dbview = Components.classes["@mozilla.org/messenger/msgdbview;1?type=threaded"].createInstance(Components.interfaces.nsIMsgDBView); dbview = Components.classes["@mozilla.org/messenger/msgdbview;1?type=threaded"].createInstance(Components.interfaces.nsIMsgDBView);
dump("dbview = " + dbview + "\n"); dump("dbview = " + dbview + "\n");
} }
function sortDateAscending()
{
dbview.sort(nsMsgViewSortType.byDate,nsMsgViewSortOrder.ascending);
}
function sortDateDescending()
{
dbview.sort(nsMsgViewSortType.byDate,nsMsgViewSortOrder.descending);
}
function sortThreadedAscending()
{
dbview.sort(nsMsgViewSortType.byThread,nsMsgViewSortOrder.ascending);
}
function sortThreadedDescending()
{
dbview.sort(nsMsgViewSortType.byThread,nsMsgViewSortOrder.descending);
}

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

@ -5,6 +5,12 @@
<script language="JavaScript" src="chrome://messenger/content/dbviewtest.js"/> <script language="JavaScript" src="chrome://messenger/content/dbviewtest.js"/>
<button value="Hit Me" onclick="doit()"/> <box orient="vertical">
<button class="dialog" value="create view" onclick="createView()"/>
<button class="dialog" value="sort date ascending" onclick="sortDateAscending()"/>
<button class="dialog" value="sort date decending" onclick="sortDateDescending()"/>
<button class="dialog" value="sort thread ascending" onclick="sortThreadedAscending()"/>
<button class="dialog" value="sort thread descending" onclick="sortThreadedDescending()"/>
</box>
</window> </window>