mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
"Use preview pane" settings refactoring (Layout)
This commit is contained in:
parent
6928fcc48e
commit
74ad0e2ca1
15 changed files with 284 additions and 246 deletions
|
|
@ -17,8 +17,8 @@ function SettingsGeneral()
|
|||
this.threading = oData.threading;
|
||||
this.useThreads = oData.useThreads;
|
||||
this.replySameFolder = oData.replySameFolder;
|
||||
this.usePreviewPane = oData.usePreviewPane;
|
||||
this.layout = oData.layout;
|
||||
this.usePreviewPane = oData.usePreviewPane;
|
||||
this.useCheckboxesInList = oData.useCheckboxesInList;
|
||||
this.allowLanguagesOnSettings = oData.allowLanguagesOnSettings;
|
||||
|
||||
|
|
@ -43,6 +43,11 @@ function SettingsGeneral()
|
|||
|
||||
Utils.addSettingsViewModel(SettingsGeneral, 'SettingsGeneral', 'SETTINGS_LABELS/LABEL_GENERAL_NAME', 'general', true);
|
||||
|
||||
SettingsGeneral.prototype.toggleLayout = function ()
|
||||
{
|
||||
this.layout(Enums.Layout.NoPreview === this.layout() ? Enums.Layout.SidePreview : Enums.Layout.NoPreview);
|
||||
};
|
||||
|
||||
SettingsGeneral.prototype.onBuild = function ()
|
||||
{
|
||||
var self = this;
|
||||
|
|
@ -127,15 +132,6 @@ SettingsGeneral.prototype.onBuild = function ()
|
|||
});
|
||||
});
|
||||
|
||||
oData.usePreviewPane.subscribe(function (bValue) {
|
||||
|
||||
oData.messageList([]);
|
||||
|
||||
RL.remote().saveSettings(Utils.emptyFunction, {
|
||||
'UsePreviewPane': bValue ? '1' : '0'
|
||||
});
|
||||
});
|
||||
|
||||
oData.layout.subscribe(function (nValue) {
|
||||
|
||||
oData.messageList([]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue