Merge pull request #530 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova 2020-10-22 11:15:53 +03:00 committed by GitHub
commit a808e2d33c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 33 additions and 66 deletions

View file

@ -84,8 +84,6 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
'<div class="separator horizontal"></div>',
'<div class="footer center">',
'<button class="btn normal dlg-btn" result="cancel" style="width: 86px;">' + this.closeButtonText + '</button>',
'<button class="btn normal dlg-btn primary can-apply hidden" result="ok" style="width: 86px;">' + this.okButtonText + '</button>',
'<button class="btn normal dlg-btn can-apply hidden" result="cancel" style="width: 86px;">' + this.cancelButtonText + '</button>',
'</div>'
].join('')
}, options || {});
@ -106,43 +104,6 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
value = Common.Utils.InternalSettings.get(path + "-rem");
this.arrRemRec = value ? JSON.parse(value) : [];
if (this.appPrefix=='de-') {
var me = this;
this.options.handler = function(result, value) {
if ( result == 'ok' ) {
var value = me.chBulleted.getValue()==='checked';
Common.localStorage.setBool("de-settings-autoformat-bulleted", value);
Common.Utils.InternalSettings.set("de-settings-autoformat-bulleted", value);
me.api.asc_SetAutomaticBulletedLists(value);
value = me.chNumbered.getValue()==='checked';
Common.localStorage.setBool("de-settings-autoformat-numbered", value);
Common.Utils.InternalSettings.set("de-settings-autoformat-numbered", value);
me.api.asc_SetAutomaticNumberedLists(value);
value = me.chQuotes.getValue()==='checked';
Common.localStorage.setBool("de-settings-autoformat-smart-quotes", value);
Common.Utils.InternalSettings.set("de-settings-autoformat-smart-quotes", value);
me.api.asc_SetAutoCorrectSmartQuotes(value);
value = me.chHyphens.getValue()==='checked';
Common.localStorage.setBool("de-settings-autoformat-hyphens", value);
Common.Utils.InternalSettings.set("de-settings-autoformat-hyphens", value);
me.api.asc_SetAutoCorrectHyphensWithDash(value);
}
};
} else if (this.appPrefix=='sse-') {
var me = this;
this.options.handler = function(result, value) {
if ( result == 'ok' ) {
var value = me.chNewRows.getValue()==='checked';
Common.localStorage.setBool("sse-settings-autoformat-new-rows", value);
Common.Utils.InternalSettings.set("sse-settings-autoformat-new-rows", value);
me.api.asc_setIncludeNewRowColTable(value);
}
};
}
Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options);
},
@ -321,36 +282,57 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
el: $('#id-autocorrect-dialog-chk-quotes'),
labelText: this.textQuotes,
value: Common.Utils.InternalSettings.get(this.appPrefix + "settings-autoformat-smart-quotes")
}).on('change', function(field, newValue, oldValue, eOpts){
var checked = (field.getValue()==='checked');
Common.localStorage.setBool(me.appPrefix + "settings-autoformat-smart-quotes", checked);
Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-smart-quotes", checked);
me.api.asc_SetAutoCorrectSmartQuotes(checked);
});
this.chHyphens = new Common.UI.CheckBox({
el: $('#id-autocorrect-dialog-chk-hyphens'),
labelText: this.textHyphens,
value: Common.Utils.InternalSettings.get(this.appPrefix + "settings-autoformat-hyphens")
}).on('change', function(field, newValue, oldValue, eOpts){
var checked = (field.getValue()==='checked');
Common.localStorage.setBool(me.appPrefix + "settings-autoformat-hyphens", checked);
Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-hyphens", checked);
me.api.asc_SetAutoCorrectHyphensWithDash(checked);
});
this.chBulleted = new Common.UI.CheckBox({
el: $('#id-autocorrect-dialog-chk-bulleted'),
labelText: this.textBulleted,
value: Common.Utils.InternalSettings.get(this.appPrefix + "settings-autoformat-bulleted")
}).on('change', function(field, newValue, oldValue, eOpts){
var checked = (field.getValue()==='checked');
Common.localStorage.setBool(me.appPrefix + "settings-autoformat-bulleted", checked);
Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-bulleted", checked);
me.api.asc_SetAutomaticBulletedLists(checked);
});
this.chNumbered = new Common.UI.CheckBox({
el: $('#id-autocorrect-dialog-chk-numbered'),
labelText: this.textNumbered,
value: Common.Utils.InternalSettings.get(this.appPrefix + "settings-autoformat-numbered")
}).on('change', function(field, newValue, oldValue, eOpts){
var checked = (field.getValue()==='checked');
Common.localStorage.setBool(me.appPrefix + "settings-autoformat-numbered", checked);
Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-numbered", checked);
me.api.asc_SetAutomaticNumberedLists(checked);
});
} else if (this.appPrefix=='sse-') {
this.chNewRows = new Common.UI.CheckBox({
el: $('#id-autocorrect-dialog-chk-new-rows'),
labelText: this.textNewRowCol,
value: Common.Utils.InternalSettings.get(this.appPrefix + "settings-autoformat-new-rows")
}).on('change', function(field, newValue, oldValue, eOpts){
var checked = (field.getValue()==='checked');
Common.localStorage.setBool(me.appPrefix + "settings-autoformat-new-rows", checked);
Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-new-rows", checked);
me.api.asc_setIncludeNewRowColTable(checked);
});
}
this.applyButtons = $window.find('.dlg-btn.can-apply');
this.closeButtons = $window.find('.dlg-btn:not(.can-apply)');
this.btnsCategory[0].on('click', _.bind(this.onMathCategoryClick, this, false));
this.btnsCategory[1].on('click', _.bind(this.onRecCategoryClick, this, false));
this.btnsCategory[2] && this.btnsCategory[2].on('click', _.bind(this.updateFooterButtons, this, true));
this.afterRender();
},
@ -402,7 +384,6 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
var value = this.getActiveCategory();
if (value==0) this.onMathCategoryClick(true);
else if (value==1) this.onRecCategoryClick(true);
this.updateFooterButtons(value>1);
},
close: function() {
@ -412,8 +393,6 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
},
onMathCategoryClick: function(delay) {
this.updateFooterButtons(false);
var me = this;
_.delay(function(){
$('input', me.inputReplace.cmpEl).select().focus();
@ -673,8 +652,6 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
},
onRecCategoryClick: function(delay) {
this.updateFooterButtons(false);
var me = this;
_.delay(function(){
$('input', me.inputRecFind.cmpEl).select().focus();
@ -766,12 +743,6 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
this.btnAddRec.setDisabled(!!rec || !value);
},
updateFooterButtons: function(apply) {
this.applyButtons.toggleClass('hidden', !apply);
this.closeButtons.toggleClass('hidden', apply);
},
textTitle: 'AutoCorrect',
textMathCorrect: 'Math AutoCorrect',
textReplace: 'Replace',

View file

@ -214,7 +214,7 @@ define([
}
if (/^[a-fA-F0-9]{6}|transparent$/.test(color) || _.indexOf(Common.Utils.ThemeColor.getStandartColors(), color) > -1 || _.indexOf(this.dynamicColors, color) > -1) {
el.find('.color-palette a[data-color=' + color + ']').first().addClass('active');
el.find('.standart-colors a[data-color=' + color + '], .dynamic-colors a[data-color=' + color + ']').first().addClass('active');
}
}

View file

@ -3103,7 +3103,7 @@ define([
cls = 'menu__icon text-orient-rdown';
break;
case Asc.c_oAscCellTextDirection.BTLR:
cls = 'menu__icon btn-align-rup';
cls = 'menu__icon text-orient-rup';
break;
}
menuTableDirection.setIconCls(cls);
@ -3788,7 +3788,7 @@ define([
cls = 'menu__icon text-orient-rdown';
break;
case Asc.c_oAscVertDrawingText.vert270:
cls = 'menu__icon btn-align-rup';
cls = 'menu__icon text-orient-rup';
break;
}
menuParagraphDirection.setIconCls(cls);

View file

@ -114,7 +114,7 @@ define([
renderStyles: function() {
var $styleContainer = $('#edit-table-styles .item-inner');
if ($styleContainer.length > 0) {
if ($styleContainer.length > 0 && $styleContainer.is(':visible')) {
var columns = parseInt(($styleContainer.width() - 15) / 70), // magic
row = -1,
styles = [];

View file

@ -3137,7 +3137,7 @@ define([
cls = 'menu__icon text-orient-rdown';
break;
case Asc.c_oAscVertDrawingText.vert270:
cls = 'menu__icon btn-align-rup';
cls = 'menu__icon text-orient-rup';
break;
}
menuParagraphDirection.setIconCls(cls);

View file

@ -115,7 +115,7 @@ define([
renderStyles: function() {
var $styleContainer = $('#edit-table-styles .item-inner');
if ($styleContainer.length > 0) {
if ($styleContainer.length > 0 && $styleContainer.is(':visible')) {
var columns = parseInt($styleContainer.width() / 70), // magic
row = -1,
styles = [];

View file

@ -7670,7 +7670,6 @@ html.pixel-ratio-3 .numbers li {
}
.slide-theme .row div {
margin: 0;
padding: 3px;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
width: 85px;
height: 38px;

View file

@ -7589,7 +7589,6 @@ html.pixel-ratio-3 .numbers li {
}
.slide-theme .row div {
margin: 0;
padding: 3px;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
width: 85px;
height: 38px;

View file

@ -217,7 +217,6 @@ input, textarea {
div {
margin: 0;
padding: 3px;
box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
width: 85px;
height: 38px;

View file

@ -229,7 +229,6 @@ input, textarea {
div {
margin: 0;
padding: 3px;
box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
width: 85px;
height: 38px;

View file

@ -1804,7 +1804,7 @@ define([
cls = 'menu__icon text-orient-rdown';
break;
case Asc.c_oAscVertDrawingText.vert270:
cls = 'menu__icon btn-align-rup';
cls = 'menu__icon text-orient-rup';
break;
}
documentHolder.menuParagraphDirection.setIconCls(cls);

View file

@ -1230,7 +1230,7 @@
"SSE.Views.AutoFilterDialog.txtLess": "Меньше...",
"SSE.Views.AutoFilterDialog.txtLessEquals": "Меньше или равно...",
"SSE.Views.AutoFilterDialog.txtNotBegins": "Не начинается с...",
"SSE.Views.AutoFilterDialog.txtNotBetween": "не между...",
"SSE.Views.AutoFilterDialog.txtNotBetween": "Не между...",
"SSE.Views.AutoFilterDialog.txtNotContains": "Не содержит...",
"SSE.Views.AutoFilterDialog.txtNotEnds": "Не оканчивается на...",
"SSE.Views.AutoFilterDialog.txtNotEquals": "Не равно...",