Gmail style selection (UNSTABLE)

This commit is contained in:
RainLoop Team
2014-04-09 20:01:41 +04:00
parent deffb81888
commit da88e0d2b5
19 changed files with 561 additions and 572 deletions

View File

@@ -23,6 +23,7 @@ function MailBoxMessageViewViewModel()
this.keyScope = oData.keyScope;
this.message = oData.message;
this.currentMessage = oData.currentMessage;
this.messageLoading = oData.messageLoading;
this.messageLoadingThrottle = oData.messageLoadingThrottle;
this.messagesBodiesDom = oData.messagesBodiesDom;
@@ -42,6 +43,13 @@ function MailBoxMessageViewViewModel()
this.messageVisibility = ko.computed(function () {
return !this.messageLoadingThrottle() && !!this.message();
}, this);
this.message.subscribe(function (oMessage) {
if (!oMessage && this.currentMessage())
{
this.currentMessage(null);
}
}, this);
this.canBeRepliedOrForwarded = this.messageVisibility;