diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index 1af382613f..cebbbbdb6e 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -515,6 +515,10 @@ define([ value = parseInt(Common.localStorage.getItem("de-settings-paste-button")); Common.Utils.InternalSettings.set("de-settings-paste-button", value); this.api.asc_setVisiblePasteButton(!!value); + + value = Common.localStorage.getBool("de-settings-smart-selection"); + Common.Utils.InternalSettings.set("de-settings-smart-selection", value); + this.api.asc_putSmartParagraphSelection(value); } this.api.put_ShowSnapLines(Common.Utils.InternalSettings.get("de-settings-showsnaplines")); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 3b8856fc77..4182d9f6f0 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1345,6 +1345,10 @@ define([ Common.Utils.InternalSettings.set("de-settings-paste-button", parseInt(value)); me.api.asc_setVisiblePasteButton(!!parseInt(value)); + value = Common.localStorage.getBool("de-settings-smart-selection"); + Common.Utils.InternalSettings.set("de-settings-smart-selection", value); + me.api.asc_putSmartParagraphSelection(value); + me.loadAutoCorrectSettings(); if (me.needToUpdateVersion) diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index fb9c10a1b0..9d45458ba1 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -319,6 +319,9 @@ define([ '', '
', '', + '', + '
', + '', '', '', '', @@ -524,6 +527,14 @@ define([ dataHintOffset: 'small' }); + this.chSmartSelection = new Common.UI.CheckBox({ + el: $markup.findById('#fms-chb-smart-selection'), + labelText: this.textSmartSelection, + dataHint: '2', + dataHintDirection: 'left', + dataHintOffset: 'small' + }); + this.chAutosave = new Common.UI.CheckBox({ el: $markup.findById('#fms-chb-autosave'), labelText: this.textAutoSave, @@ -926,6 +937,7 @@ define([ this.chPaste.setValue(Common.Utils.InternalSettings.get("de-settings-paste-button")); this.chQuickPrint.setValue(Common.Utils.InternalSettings.get("de-settings-quick-print-button")); + this.chSmartSelection.setValue(Common.Utils.InternalSettings.get("de-settings-smart-selection")); var data = []; for (var t in Common.UI.Themes.map()) { @@ -996,6 +1008,7 @@ define([ } Common.localStorage.setItem("de-settings-paste-button", this.chPaste.isChecked() ? 1 : 0); + Common.localStorage.setItem("de-settings-smart-selection", this.chSmartSelection.isChecked() ? 1 : 0); var isRtlChanged = this.chRTL.$el.is(':visible') && Common.localStorage.getBool("ui-rtl") !== this.chRTL.isChecked(); Common.localStorage.setBool("ui-rtl", this.chRTL.isChecked()); Common.localStorage.setBool("de-settings-quick-print-button", this.chQuickPrint.isChecked()); @@ -1113,7 +1126,8 @@ define([ txtQuickPrintTip: 'The document will be printed on the last selected or default printer', txtWorkspaceSettingChange: 'Workspace setting (RTL interface) change', txtRestartEditor: 'Please restart document editor so that your workspace settings can take effect', - txtLastUsed: 'Last used' + txtLastUsed: 'Last used', + textSmartSelection: 'Use smart paragraph selection' }, DE.Views.FileMenuPanels.Settings || {})); DE.Views.FileMenuPanels.CreateNew = Common.UI.BaseView.extend(_.extend({ diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 0d03cb9441..2384fc54ea 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -2140,6 +2140,7 @@ "DE.Views.FileMenuPanels.Settings.txtWarnMacrosDesc": "Disable all macros with a notification", "DE.Views.FileMenuPanels.Settings.txtWin": "as Windows", "DE.Views.FileMenuPanels.Settings.txtWorkspace": "Workspace", + "DE.Views.FileMenuPanels.Settings.textSmartSelection": "Use smart paragraph selection", "DE.Views.FileMenuPanels.ViewSaveAs.textDownloadAs": "Download as", "DE.Views.FileMenuPanels.ViewSaveCopy.textSaveCopyAs": "Save Copy as", "DE.Views.FormSettings.textAlways": "Always",