mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
New thread list logic (step 2)
This commit is contained in:
parent
b656b6365b
commit
03d26bc4c6
18 changed files with 139 additions and 517 deletions
|
|
@ -70,6 +70,7 @@
|
|||
|
||||
this.mainMessageListSearch = MessageStore.mainMessageListSearch;
|
||||
this.messageListEndFolder = MessageStore.messageListEndFolder;
|
||||
this.messageListEndThreadUid = MessageStore.messageListEndThreadUid;
|
||||
|
||||
this.messageListChecked = MessageStore.messageListChecked;
|
||||
this.messageListCheckedOrSelected = MessageStore.messageListCheckedOrSelected;
|
||||
|
|
@ -389,6 +390,15 @@
|
|||
this.inputMessageListSearchFocus(false);
|
||||
};
|
||||
|
||||
MessageListMailBoxUserView.prototype.cancelThreadUid = function ()
|
||||
{
|
||||
kn.setHash(Links.mailBox(
|
||||
FolderStore.currentFolderFullNameHash(),
|
||||
MessageStore.messageListPageBeforeThread(),
|
||||
MessageStore.messageListSearch()
|
||||
));
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sToFolderFullNameRaw
|
||||
* @param {boolean} bCopy
|
||||
|
|
@ -618,6 +628,21 @@
|
|||
}
|
||||
};
|
||||
|
||||
MessageListMailBoxUserView.prototype.gotoThread = function (oMessage)
|
||||
{
|
||||
if (oMessage)
|
||||
{
|
||||
MessageStore.messageListPageBeforeThread(MessageStore.messageListPage());
|
||||
|
||||
kn.setHash(Links.mailBox(
|
||||
FolderStore.currentFolderFullNameHash(),
|
||||
1,
|
||||
MessageStore.messageListSearch(),
|
||||
oMessage.uid
|
||||
));
|
||||
}
|
||||
};
|
||||
|
||||
MessageListMailBoxUserView.prototype.onBuild = function (oDom)
|
||||
{
|
||||
var self = this;
|
||||
|
|
@ -643,6 +668,9 @@
|
|||
.on('click', '.messageList .messageListItem .flagParent', function () {
|
||||
self.flagMessages(ko.dataFor(this));
|
||||
})
|
||||
.on('click', '.messageList .messageListItem .threads-len', function () {
|
||||
self.gotoThread(ko.dataFor(this));
|
||||
})
|
||||
;
|
||||
|
||||
this.initUploaderForAppend();
|
||||
|
|
@ -725,6 +753,22 @@
|
|||
return false;
|
||||
});
|
||||
|
||||
key('t', [Enums.KeyState.MessageList], function () {
|
||||
|
||||
var oMessage = self.selectorMessageSelected();
|
||||
if (!oMessage)
|
||||
{
|
||||
oMessage = self.selectorMessageFocused();
|
||||
}
|
||||
|
||||
if (oMessage && 0 < oMessage.threadsLen())
|
||||
{
|
||||
self.gotoThread(oMessage);
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// move
|
||||
key('m', Enums.KeyState.MessageList, function () {
|
||||
self.moveDropdownTrigger(true);
|
||||
|
|
@ -761,6 +805,11 @@
|
|||
self.cancelSearch();
|
||||
return false;
|
||||
}
|
||||
else if ('' !== self.messageListEndThreadUid())
|
||||
{
|
||||
self.cancelThreadUid();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
// change focused state
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue