mirror of
https://github.com/RainLoop/rainloop-webmail.git
synced 2026-02-05 11:34:54 +01:00
Many interface improvements, optimizations
This commit is contained in:
@@ -26,6 +26,7 @@ function MailBoxMessageViewViewModel()
|
||||
this.currentMessage = oData.currentMessage;
|
||||
this.messageListChecked = oData.messageListChecked;
|
||||
this.hasCheckedMessages = oData.hasCheckedMessages;
|
||||
this.messageListCheckedOrSelectedUidsWithSubMails = oData.messageListCheckedOrSelectedUidsWithSubMails;
|
||||
this.messageLoading = oData.messageLoading;
|
||||
this.messageLoadingThrottle = oData.messageLoadingThrottle;
|
||||
this.messagesBodiesDom = oData.messagesBodiesDom;
|
||||
@@ -87,7 +88,7 @@ function MailBoxMessageViewViewModel()
|
||||
{
|
||||
RL.deleteMessagesFromFolder(Enums.FolderType.Trash,
|
||||
RL.data().currentFolderFullNameRaw(),
|
||||
RL.data().messageListCheckedOrSelectedUidsWithSubMails(), false);
|
||||
[this.message().uid], false);
|
||||
}
|
||||
}, this.messageVisibility);
|
||||
|
||||
@@ -109,6 +110,15 @@ function MailBoxMessageViewViewModel()
|
||||
}
|
||||
}, this.messageVisibility);
|
||||
|
||||
this.notSpamCommand = Utils.createCommand(this, function () {
|
||||
if (this.message())
|
||||
{
|
||||
RL.deleteMessagesFromFolder(Enums.FolderType.NotSpam,
|
||||
this.message().folderFullNameRaw,
|
||||
[this.message().uid], true);
|
||||
}
|
||||
}, this.messageVisibility);
|
||||
|
||||
// viewer
|
||||
this.viewSubject = ko.observable('');
|
||||
this.viewFromShort = ko.observable('');
|
||||
@@ -623,6 +633,16 @@ MailBoxMessageViewViewModel.prototype.showImages = function (oMessage)
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
MailBoxMessageViewViewModel.prototype.printableCheckedMessageCount = function ()
|
||||
{
|
||||
var iCnt = this.messageListCheckedOrSelectedUidsWithSubMails().length;
|
||||
return 0 < iCnt ? (100 > iCnt ? iCnt : '99+') : '';
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {MessageModel} oMessage
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user