[SSE] Remove autocorrect option

This commit is contained in:
Julia Radzhabova 2021-05-21 20:48:40 +03:00
parent 63c7c9aa31
commit 9ad620c727
3 changed files with 18 additions and 22 deletions

View file

@ -64,12 +64,12 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
{panelId: 'id-autocorrect-dialog-settings-math', panelCaption: this.textMathCorrect},
{panelId: 'id-autocorrect-dialog-settings-recognized', panelCaption: this.textRecognized}
];
if (this.appPrefix=='de-' || this.appPrefix=='pe-')
if (this.appPrefix=='de-' || this.appPrefix=='pe-') {
items.push({panelId: 'id-autocorrect-dialog-settings-de-autoformat', panelCaption: this.textAutoFormat});
else if (this.appPrefix=='sse-')
items.push({panelId: 'id-autocorrect-dialog-settings-sse-autoformat', panelCaption: this.textAutoFormat});
items.push({panelId: 'id-autocorrect-dialog-settings-autocorrect', panelCaption: this.textAutoCorrect});
items.push({panelId: 'id-autocorrect-dialog-settings-autocorrect', panelCaption: this.textAutoCorrect});
} else if (this.appPrefix=='sse-')
items.push({panelId: 'id-autocorrect-dialog-settings-sse-autoformat', panelCaption: this.textAutoFormat});
_.extend(this.options, {
title: this.textTitle,
@ -324,6 +324,19 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-numbered", checked);
me.api.asc_SetAutomaticNumberedLists(checked);
});
// AutoCorrect
this.chFLSentence = new Common.UI.CheckBox({
el: $('#id-autocorrect-dialog-chk-fl-sentence'),
labelText: this.textFLSentence,
value: Common.Utils.InternalSettings.get(this.appPrefix + "settings-autoformat-fl-sentence")
}).on('change', function(field, newValue, oldValue, eOpts){
var checked = (field.getValue()==='checked');
Common.localStorage.setBool(me.appPrefix + "settings-autoformat-fl-sentence", checked);
Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-fl-sentence", checked);
me.api.asc_SetAutoCorrectFirstLetterOfSentences && me.api.asc_SetAutoCorrectFirstLetterOfSentences(checked);
});
this.btnsCategory[3].on('click', _.bind(this.onAutocorrectCategoryClick, this, false));
} else if (this.appPrefix=='sse-') {
this.chNewRows = new Common.UI.CheckBox({
el: $('#id-autocorrect-dialog-chk-new-rows'),
@ -348,22 +361,9 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
});
}
// AutoCorrect
this.chFLSentence = new Common.UI.CheckBox({
el: $('#id-autocorrect-dialog-chk-fl-sentence'),
labelText: this.textFLSentence,
value: Common.Utils.InternalSettings.get(this.appPrefix + "settings-autoformat-fl-sentence")
}).on('change', function(field, newValue, oldValue, eOpts){
var checked = (field.getValue()==='checked');
Common.localStorage.setBool(me.appPrefix + "settings-autoformat-fl-sentence", checked);
Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-fl-sentence", checked);
me.api.asc_SetAutoCorrectFirstLetterOfSentences && me.api.asc_SetAutoCorrectFirstLetterOfSentences(checked);
});
this.btnsCategory[0].on('click', _.bind(this.onMathCategoryClick, this, false));
this.btnsCategory[1].on('click', _.bind(this.onRecCategoryClick, this, false));
this.btnsCategory[2].on('click', _.bind(this.onAutoformatCategoryClick, this, false));
this.btnsCategory[3].on('click', _.bind(this.onAutocorrectCategoryClick, this, false));
this.afterRender();
},
@ -384,6 +384,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
this.chFLSentence // 3 tab
];
arr = arr.concat(this.chNewRows ? [this.chHyperlink, this.chNewRows] : [this.chQuotes, this.chHyphens, this.chBulleted, this.chNumbered]);
arr = arr.concat(this.chFLSentence ? [this.chFLSentence] : []);
return arr;
},

View file

@ -2508,10 +2508,6 @@ define([
value = Common.localStorage.getBool("sse-settings-autoformat-hyperlink", true);
Common.Utils.InternalSettings.set("sse-settings-autoformat-hyperlink", value);
me.api.asc_setAutoCorrectHyperlinks(value);
value = Common.localStorage.getBool("sse-settings-autoformat-fl-sentence", true);
Common.Utils.InternalSettings.set("sse-settings-autoformat-fl-sentence", value);
me.api.asc_SetAutoCorrectFirstLetterOfSentences && me.api.asc_SetAutoCorrectFirstLetterOfSentences(value);
},
showRenameUserDialog: function() {

View file

@ -155,7 +155,6 @@
"Common.Views.AutoCorrectDialog.textAutoFormat": "AutoFormat As You Type",
"Common.Views.AutoCorrectDialog.textBy": "By",
"Common.Views.AutoCorrectDialog.textDelete": "Delete",
"Common.Views.AutoCorrectDialog.textFLSentence": "Capitalize first letter of sentences",
"Common.Views.AutoCorrectDialog.textHyperlink": "Internet and network paths with hyperlinks",
"Common.Views.AutoCorrectDialog.textMathCorrect": "Math AutoCorrect",
"Common.Views.AutoCorrectDialog.textNewRowCol": "Include new rows and columns in table",