diff --git a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js index b0300bd43..a575d2967 100644 --- a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js @@ -256,7 +256,8 @@ define([ /** coauthoring begin **/ var value = Common.localStorage.getItem("sse-settings-livecomment"); - (!(value!==null && parseInt(value) == 0)) ? this.api.asc_showComments() : this.api.asc_hideComments(); + var resolved = Common.localStorage.getItem("sse-settings-resolvedcomment"); + (!(value!==null && parseInt(value) == 0)) ? this.api.asc_showComments(!(resolved!==null && parseInt(resolved) == 0)) : this.api.asc_hideComments(); // this.getApplication().getController('DocumentHolder').setLiveCommenting(!(value!==null && parseInt(value) == 0)); if (this.mode.isEdit && !this.mode.isOffline && this.mode.canCoAuthoring) { @@ -549,9 +550,12 @@ define([ commentsShowHide: function(state) { if (this.api) { - var value = Common.localStorage.getItem("sse-settings-livecomment"); - if (value !== null && parseInt(value) == 0) { - (state) ? this.api.asc_showComments() : this.api.asc_hideComments(); + var value = Common.localStorage.getItem("sse-settings-livecomment"), + resolved = Common.localStorage.getItem("sse-settings-resolvedcomment"); + value = (value!==null && parseInt(value) == 0); + resolved = (resolved!==null && parseInt(resolved) == 0); + if (value || resolved) { + (state) ? this.api.asc_showComments(true) : ((!value) ? this.api.asc_showComments(!resolved) : this.api.asc_hideComments()); } if (state) { diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 24979d4d3..8e6bfc195 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -546,7 +546,8 @@ define([ /** coauthoring begin **/ value = Common.localStorage.getItem("sse-settings-livecomment"); this.isLiveCommenting = !(value!==null && parseInt(value) == 0); - this.isLiveCommenting?this.api.asc_showComments():this.api.asc_hideComments(); + var resolved = Common.localStorage.getItem("sse-settings-resolvedcomment"); + this.isLiveCommenting ? this.api.asc_showComments(!(resolved!==null && parseInt(resolved) == 0)) : this.api.asc_hideComments(); if (this.appOptions.isEdit && !this.appOptions.isOffline && this.appOptions.canCoAuthoring) { value = Common.localStorage.getItem("sse-settings-coauthmode"); diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 93e406fa2..a5dda5fdf 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -443,6 +443,10 @@ define([ '', '
', '','', + '', + '', + '
', + '','', '', '', '', @@ -502,6 +506,13 @@ define([ this.chLiveComment = new Common.UI.CheckBox({ el: $('#fms-chb-live-comment'), labelText: this.strLiveComment + }).on('change', _.bind(function(field, newValue, oldValue, eOpts){ + this.chResolvedComment.setDisabled(field.getValue()!=='checked'); + }, this)); + + this.chResolvedComment = new Common.UI.CheckBox({ + el: $('#fms-chb-resolved-comment'), + labelText: this.strResolvedComment }); this.cmbCoAuthMode = new Common.UI.ComboBox({ @@ -681,6 +692,9 @@ define([ value = Common.localStorage.getItem("sse-settings-livecomment"); this.chLiveComment.setValue(!(value!==null && parseInt(value) == 0)); + value = Common.localStorage.getItem("sse-settings-resolvedcomment"); + this.chResolvedComment.setValue(!(value!==null && parseInt(value) == 0)); + value = Common.localStorage.getItem("sse-settings-coauthmode"); if (value===null && Common.localStorage.getItem("sse-settings-autosave")===null && this.mode.customization && this.mode.customization.autosave===false) @@ -735,6 +749,7 @@ define([ Common.localStorage.setItem("sse-settings-zoom", this.cmbZoom.getValue()); /** coauthoring begin **/ Common.localStorage.setItem("sse-settings-livecomment", this.chLiveComment.isChecked() ? 1 : 0); + Common.localStorage.setItem("sse-settings-resolvedcomment", this.chResolvedComment.isChecked() ? 1 : 0); if (this.mode.isEdit && !this.mode.isOffline && this.mode.canCoAuthoring) Common.localStorage.setItem("sse-settings-coauthmode", this.cmbCoAuthMode.getValue()); /** coauthoring end **/ @@ -812,7 +827,8 @@ define([ strAutoRecover: 'Turn on autorecover', txtInch: 'Inch', textForceSave: 'Save to Server', - strForcesave: 'Always save to server (otherwise save to server on document close)' + strForcesave: 'Always save to server (otherwise save to server on document close)', + strResolvedComment: 'Turn on display of the resolved comments' }, SSE.Views.FileMenuPanels.MainSettingsGeneral || {})); SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js index df8b16ecf..baaea94bd 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -453,7 +453,7 @@ define([ /** coauthoring begin **/ value = Common.localStorage.getItem("sse-settings-livecomment"); this.isLiveCommenting = !(value!==null && parseInt(value) == 0); - this.isLiveCommenting?this.api.asc_showComments():this.api.asc_hideComments(); + this.isLiveCommenting?this.api.asc_showComments(true):this.api.asc_hideComments(); if (this.appOptions.isEdit && this.appOptions.canLicense && !this.appOptions.isOffline && this.appOptions.canCoAuthoring) { value = Common.localStorage.getItem("sse-settings-coauthmode");