Merge pull request #583 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova 2020-11-22 00:19:54 +03:00 committed by GitHub
commit 8e3021ed32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 13 deletions

View file

@ -134,8 +134,8 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
template: _.template(['<div class="listview inner" style=""></div>'].join('')),
itemTemplate: _.template([
'<div id="<%= id %>" class="list-item" style="pointer-events:none;width: 100%;display:flex;">',
'<div style="min-width:110px;padding-right: 5px;<% if (defaultDisabled) { %> font-style:italic; opacity: 0.5;<% } %>"><%= replaced %></div>',
'<div style="flex-grow:1;font-family: Cambria Math;font-size:13px;<% if (defaultDisabled) { %> font-style:italic; opacity: 0.5;<% } %>"><%= by %></div>',
'<div style="width:110px;padding-right: 5px;overflow: hidden;text-overflow: ellipsis;<% if (defaultDisabled) { %> font-style:italic; opacity: 0.5;<% } %>"><%= replaced %></div>',
'<div style="width:230px;overflow: hidden;text-overflow: ellipsis;flex-grow:1;font-family: Cambria Math;font-size:13px;<% if (defaultDisabled) { %> font-style:italic; opacity: 0.5;<% } %>"><%= by %></div>',
'</div>'
].join('')),
scrollAlwaysVisible: true
@ -146,6 +146,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
el : $window.find('#auto-correct-replace'),
allowBlank : true,
validateOnChange : true,
maxLength : 31,
validation : function () { return true; }
}).on ('changing', function (input, value) {
var _selectedItem;
@ -186,6 +187,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
el : $window.find('#auto-correct-by'),
allowBlank : true,
validateOnChange : true,
maxLength : 255,
validation : function () { return true; }
}).on ('changing', function (input, value) {
me.updateControls();
@ -216,7 +218,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
simpleAddMode: false,
template: _.template(['<div class="listview inner" style=""></div>'].join('')),
itemTemplate: _.template([
'<div id="<%= id %>" class="list-item" style="<% if (defaultDisabled) { %> font-style:italic; opacity: 0.5;<% } %>"><%= value %></div>'
'<div id="<%= id %>" class="list-item" style="width: 340px;text-overflow: ellipsis;overflow: hidden;<% if (defaultDisabled) { %> font-style:italic; opacity: 0.5;<% } %>"><%= value %></div>'
].join('')),
scrollAlwaysVisible: true
});
@ -226,6 +228,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
el : $window.find('#auto-correct-rec-find'),
allowBlank : true,
validateOnChange : true,
maxLength : 255,
validation : function () { return true; }
}).on ('changing', function (input, value) {
var _selectedItem;

View file

@ -203,7 +203,7 @@ define([
var me = this;
var onApiEndCalculate = function() {
me.refreshReferences(me.cmbType.getSelectedRecord());
me.refreshReferences(me.cmbType.getSelectedRecord(), true);
};
this.api.asc_registerCallback('asc_onEndCalculate', onApiEndCalculate);
this.on('close', function(obj){
@ -361,13 +361,16 @@ define([
this.refreshReferences(record);
},
refreshReferences: function(record) {
refreshReferences: function(record, reselect) {
if (!record) return;
var store = this.refList.store,
type = (record.type==1 || record.value > 4) ? 5 : record.value,
arr = [],
props;
props,
oldlength = store.length,
oldidx = _.indexOf(store.models, this.refList.getSelectedRec());
switch (type) {
case 0: // paragraph
props = this.api.asc_GetAllNumberedParagraphs();
@ -404,7 +407,7 @@ define([
store.reset(arr);
if (store.length>0) {
var rec = store.at(0);
var rec = (reselect && store.length == oldlength && oldidx>=0 && oldidx<store.length) ? store.at(oldidx) : store.at(0);
this.refList.selectRecord(rec);
this.refList.scrollToRecord(rec);
}

View file

@ -161,7 +161,7 @@
"Common.Views.AutoCorrectDialog.textApplyText": "Apply As You Type",
"Common.Views.AutoCorrectDialog.textAutoFormat": "AutoFormat As You Type",
"Common.Views.AutoCorrectDialog.textBulleted": "Automatic bulleted lists",
"Common.Views.AutoCorrectDialog.textBy": "By:",
"Common.Views.AutoCorrectDialog.textBy": "By",
"Common.Views.AutoCorrectDialog.textDelete": "Delete",
"Common.Views.AutoCorrectDialog.textHyphens": "Hyphens (--) with dash (—)",
"Common.Views.AutoCorrectDialog.textMathCorrect": "Math AutoCorrect",
@ -169,7 +169,7 @@
"Common.Views.AutoCorrectDialog.textQuotes": "\"Straight quotes\" with \"smart quotes\"",
"Common.Views.AutoCorrectDialog.textRecognized": "Recognized Functions",
"Common.Views.AutoCorrectDialog.textRecognizedDesc": "The following expressions are recognized math expressions. They will not be automatically italicized.",
"Common.Views.AutoCorrectDialog.textReplace": "Replace:",
"Common.Views.AutoCorrectDialog.textReplace": "Replace",
"Common.Views.AutoCorrectDialog.textReplaceText": "Replace As You Type",
"Common.Views.AutoCorrectDialog.textReplaceType": "Replace text as you type",
"Common.Views.AutoCorrectDialog.textReset": "Reset",

View file

@ -59,12 +59,12 @@
"Common.Views.About.txtTel": "tel.: ",
"Common.Views.About.txtVersion": "Version ",
"Common.Views.AutoCorrectDialog.textAdd": "Add",
"Common.Views.AutoCorrectDialog.textBy": "By:",
"Common.Views.AutoCorrectDialog.textBy": "By",
"Common.Views.AutoCorrectDialog.textDelete": "Delete",
"Common.Views.AutoCorrectDialog.textMathCorrect": "Math AutoCorrect",
"Common.Views.AutoCorrectDialog.textRecognized": "Recognized Functions",
"Common.Views.AutoCorrectDialog.textRecognizedDesc": "The following expressions are recognized math expressions. They will not be automatically italicized.",
"Common.Views.AutoCorrectDialog.textReplace": "Replace:",
"Common.Views.AutoCorrectDialog.textReplace": "Replace",
"Common.Views.AutoCorrectDialog.textReplaceType": "Replace text as you type",
"Common.Views.AutoCorrectDialog.textReset": "Reset",
"Common.Views.AutoCorrectDialog.textResetAll": "Reset to default",

View file

@ -62,13 +62,13 @@
"Common.Views.AutoCorrectDialog.textAdd": "Add",
"Common.Views.AutoCorrectDialog.textApplyAsWork": "Apply as you work",
"Common.Views.AutoCorrectDialog.textAutoFormat": "AutoFormat As You Type",
"Common.Views.AutoCorrectDialog.textBy": "By:",
"Common.Views.AutoCorrectDialog.textBy": "By",
"Common.Views.AutoCorrectDialog.textDelete": "Delete",
"Common.Views.AutoCorrectDialog.textMathCorrect": "Math AutoCorrect",
"Common.Views.AutoCorrectDialog.textNewRowCol": "Include new rows and columns in table",
"Common.Views.AutoCorrectDialog.textRecognized": "Recognized Functions",
"Common.Views.AutoCorrectDialog.textRecognizedDesc": "The following expressions are recognized math expressions. They will not be automatically italicized.",
"Common.Views.AutoCorrectDialog.textReplace": "Replace:",
"Common.Views.AutoCorrectDialog.textReplace": "Replace",
"Common.Views.AutoCorrectDialog.textReplaceType": "Replace text as you type",
"Common.Views.AutoCorrectDialog.textReset": "Reset",
"Common.Views.AutoCorrectDialog.textResetAll": "Reset to default",