From e7ec23f934ffdc18cd92454cba852944287084cd Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Thu, 8 Feb 2001 22:02:48 +0000 Subject: [PATCH] NOT PART OF THE BUILD. more hacking with bienvenu. --- mailnews/base/resources/content/dbviewtest.js | 28 +++++++++++++++++-- .../base/resources/content/dbviewtest.xul | 8 +++++- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/mailnews/base/resources/content/dbviewtest.js b/mailnews/base/resources/content/dbviewtest.js index 94516aeeecf..f4797bab78a 100644 --- a/mailnews/base/resources/content/dbviewtest.js +++ b/mailnews/base/resources/content/dbviewtest.js @@ -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"); } + + +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); +} diff --git a/mailnews/base/resources/content/dbviewtest.xul b/mailnews/base/resources/content/dbviewtest.xul index a4328450ab8..f108ea05158 100644 --- a/mailnews/base/resources/content/dbviewtest.xul +++ b/mailnews/base/resources/content/dbviewtest.xul @@ -5,6 +5,12 @@