"Use preview pane" settings refactoring (Layout)

This commit is contained in:
RainLoop Team 2014-02-04 00:06:35 +04:00
parent 6928fcc48e
commit 74ad0e2ca1
15 changed files with 284 additions and 246 deletions

View file

@ -42,15 +42,19 @@ MailBoxFolderListViewModel.prototype.onBuild = function (oDom)
oEvent.preventDefault();
var oFolder = ko.dataFor(this);
var
oData = RL.data(),
oFolder = ko.dataFor(this)
;
if (oFolder)
{
if (!RL.data().usePreviewPane())
if (Enums.Layout.NoPreview === oData.layout())
{
RL.data().message(null);
oData.message(null);
}
if (oFolder.fullNameRaw === RL.data().currentFolderFullNameRaw())
if (oFolder.fullNameRaw === oData.currentFolderFullNameRaw())
{
RL.cache().setFolderHash(oFolder.fullNameRaw, '');
}

View file

@ -28,6 +28,7 @@ function MailBoxMessageViewViewModel()
this.useThreads = oData.useThreads;
this.replySameFolder = oData.replySameFolder;
this.layout = oData.layout;
this.usePreviewPane = oData.usePreviewPane;
this.isMessageSelected = oData.isMessageSelected;
this.messageActiveDom = oData.messageActiveDom;
this.messageError = oData.messageError;