зеркало из https://github.com/mozilla/pjs.git
NOT PART OF THE BUILD. more hacking with bienvenu.
This commit is contained in:
Родитель
f7ef71585e
Коммит
e7ec23f934
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,12 @@
|
|||
|
||||
<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>
|
||||
|
|
Загрузка…
Ссылка в новой задаче