mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-01 00:05:51 +00:00
OpenPGP (#53) Beta
Archive (Closes #110) Delete, Spam and Archive button in mail view when preview pane is off (Closes #72) Small fixes (Closes #101)
This commit is contained in:
@@ -109,15 +109,26 @@ function MailBoxMessageListViewModel()
|
||||
}, this);
|
||||
|
||||
this.isSpamFolder = ko.computed(function () {
|
||||
return RL.data().spamFolder() === this.messageListEndFolder();
|
||||
return oData.spamFolder() === this.messageListEndFolder() &&
|
||||
'' !== oData.spamFolder();
|
||||
}, this);
|
||||
|
||||
this.isSpamDisabled = ko.computed(function () {
|
||||
return Consts.Values.UnuseOptionValue === RL.data().spamFolder();
|
||||
return Consts.Values.UnuseOptionValue === oData.spamFolder();
|
||||
}, this);
|
||||
|
||||
this.isTrashFolder = ko.computed(function () {
|
||||
return RL.data().trashFolder() === this.messageListEndFolder();
|
||||
return oData.trashFolder() === this.messageListEndFolder() &&
|
||||
'' !== oData.trashFolder();
|
||||
}, this);
|
||||
|
||||
this.isArchiveFolder = ko.computed(function () {
|
||||
return oData.archiveFolder() === this.messageListEndFolder() &&
|
||||
'' !== oData.archiveFolder();
|
||||
}, this);
|
||||
|
||||
this.isArchiveDisabled = ko.computed(function () {
|
||||
return Consts.Values.UnuseOptionValue === RL.data().archiveFolder();
|
||||
}, this);
|
||||
|
||||
this.canBeMoved = this.hasCheckedOrSelectedLines;
|
||||
@@ -141,6 +152,12 @@ function MailBoxMessageListViewModel()
|
||||
RL.data().currentFolderFullNameRaw(),
|
||||
RL.data().messageListCheckedOrSelectedUidsWithSubMails(), true);
|
||||
}, this.canBeMoved);
|
||||
|
||||
this.archiveCommand = Utils.createCommand(this, function () {
|
||||
RL.deleteMessagesFromFolder(Enums.FolderType.Archive,
|
||||
RL.data().currentFolderFullNameRaw(),
|
||||
RL.data().messageListCheckedOrSelectedUidsWithSubMails(), true);
|
||||
}, this.canBeMoved);
|
||||
|
||||
this.spamCommand = Utils.createCommand(this, function () {
|
||||
RL.deleteMessagesFromFolder(Enums.FolderType.Spam,
|
||||
@@ -219,6 +236,15 @@ MailBoxMessageListViewModel.prototype.searchEnterAction = function ()
|
||||
this.inputMessageListSearchFocus(false);
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
MailBoxMessageListViewModel.prototype.printableMessageCountForDeletion = function ()
|
||||
{
|
||||
var iCnt = this.messageListCheckedOrSelectedUidsWithSubMails().length;
|
||||
return 1 < iCnt ? ' (' + (100 > iCnt ? iCnt : '99+') + ')' : '';
|
||||
};
|
||||
|
||||
MailBoxMessageListViewModel.prototype.cancelSearch = function ()
|
||||
{
|
||||
this.mainMessageListSearch('');
|
||||
|
||||
Reference in New Issue
Block a user