diff --git a/dev/Common/Enums.js b/dev/Common/Enums.js index 34c4db273..bf1521d29 100644 --- a/dev/Common/Enums.js +++ b/dev/Common/Enums.js @@ -217,8 +217,8 @@ Enums.EditorDefaultType = { 'Html': 'Html', 'Plain': 'Plain', - 'HtmlForce': 'HtmlForce', - 'PlainForce': 'PlainForce' + 'HtmlForced': 'HtmlForced', + 'PlainForced': 'PlainForced' }; /** diff --git a/dev/Settings/User/General.js b/dev/Settings/User/General.js index f0a970a9a..2f1f1dc8e 100644 --- a/dev/Settings/User/General.js +++ b/dev/Settings/User/General.js @@ -57,17 +57,19 @@ }, this); this.languageTrigger = ko.observable(Enums.SaveSettingsStep.Idle).extend({'throttle': 100}); + this.mppTrigger = ko.observable(Enums.SaveSettingsStep.Idle); + this.editorDefaultTypeTrigger = ko.observable(Enums.SaveSettingsStep.Idle); this.isAnimationSupported = Globals.bAnimationSupported; this.editorDefaultTypes = ko.computed(function () { Globals.langChangeTrigger(); return [ - {'id': Enums.EditorDefaultType.Html, 'name': Utils.i18n('SETTINGS_GENERAL/LABEL_EDITOR_HTML_AS_DEFAULT')}, - {'id': Enums.EditorDefaultType.Plain, 'name': Utils.i18n('SETTINGS_GENERAL/LABEL_EDITOR_PLAIN_AS_DEFAULT')}, - {'id': Enums.EditorDefaultType.HtmlForce, 'name': Utils.i18n('SETTINGS_GENERAL/LABEL_EDITOR_HTML_FORCE_AS_DEFAULT')}, - {'id': Enums.EditorDefaultType.PlainForce, 'name': Utils.i18n('SETTINGS_GENERAL/LABEL_EDITOR_PLAIN_FORCE_AS_DEFAULT')} + {'id': Enums.EditorDefaultType.Html, 'name': Utils.i18n('SETTINGS_GENERAL/LABEL_EDITOR_HTML')}, + {'id': Enums.EditorDefaultType.Plain, 'name': Utils.i18n('SETTINGS_GENERAL/LABEL_EDITOR_PLAIN')}, + {'id': Enums.EditorDefaultType.HtmlForced, 'name': Utils.i18n('SETTINGS_GENERAL/LABEL_EDITOR_HTML_FORCED')}, + {'id': Enums.EditorDefaultType.PlainForced, 'name': Utils.i18n('SETTINGS_GENERAL/LABEL_EDITOR_PLAIN_FORCED')} ]; }, this); } @@ -84,6 +86,7 @@ _.delay(function () { var + f0 = Utils.settingsSaveHelperSimpleFunction(self.editorDefaultTypeTrigger, self), f1 = Utils.settingsSaveHelperSimpleFunction(self.mppTrigger, self), fReloadLanguageHelper = function (iSaveSettingsStep) { return function() { @@ -109,7 +112,7 @@ }); Data.editorDefaultType.subscribe(function (sValue) { - Remote.saveSettings(null, { + Remote.saveSettings(f0, { 'EditorDefaultType': sValue }); }); diff --git a/dev/View/Popup/Compose.js b/dev/View/Popup/Compose.js index 7d47be8f7..ffa6d4855 100644 --- a/dev/View/Popup/Compose.js +++ b/dev/View/Popup/Compose.js @@ -921,8 +921,8 @@ this.editor(function (oEditor) { oEditor.setHtml(sText, false); - if (Enums.EditorDefaultType.PlainForce === Data.editorDefaultType() || - (!oMessage.isHtml() && Enums.EditorDefaultType.HtmlForce !== Data.editorDefaultType())) + if (Enums.EditorDefaultType.PlainForced === Data.editorDefaultType() || + (!oMessage.isHtml() && Enums.EditorDefaultType.HtmlForced !== Data.editorDefaultType())) { oEditor.modeToggle(false); } @@ -942,7 +942,7 @@ this.editor(function (oEditor) { oEditor.setHtml(sText, false); if (Enums.EditorDefaultType.Html !== Data.editorDefaultType() && - Enums.EditorDefaultType.HtmlForce !== Data.editorDefaultType()) + Enums.EditorDefaultType.HtmlForced !== Data.editorDefaultType()) { oEditor.modeToggle(false); } diff --git a/rainloop/v/0.0.0/app/templates/Views/User/SettingsGeneral.html b/rainloop/v/0.0.0/app/templates/Views/User/SettingsGeneral.html index c3b30c66c..668670b66 100644 --- a/rainloop/v/0.0.0/app/templates/Views/User/SettingsGeneral.html +++ b/rainloop/v/0.0.0/app/templates/Views/User/SettingsGeneral.html @@ -26,21 +26,12 @@