Merge pull request #1575 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova 2022-02-16 23:06:38 +03:00 committed by GitHub
commit 47f847d3c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 44 deletions

View file

@ -373,17 +373,21 @@ define([
} else if (format == Asc.c_oAscFileType.PDF || format == Asc.c_oAscFileType.PDFA) } else if (format == Asc.c_oAscFileType.PDF || format == Asc.c_oAscFileType.PDFA)
this._saveAsFormat(menu, format, ext); this._saveAsFormat(menu, format, ext);
else { else {
Common.UI.warning({ if (format == Asc.c_oAscFileType.TXT || format == Asc.c_oAscFileType.RTF) // don't show message about pdf/xps/oxps
width: 600, me._saveAsFormat(menu, format, ext, new AscCommon.asc_CTextParams(Asc.c_oAscTextAssociation.PlainLine));
title: this.notcriticalErrorTitle, else {
msg: Common.Utils.String.format(this.warnDownloadAsPdf, fileType.toUpperCase()), Common.UI.warning({
buttons: ['ok', 'cancel'], width: 600,
callback: _.bind(function(btn){ title: this.notcriticalErrorTitle,
if (btn == 'ok') { msg: Common.Utils.String.format(this.warnDownloadAsPdf, fileType.toUpperCase()),
me._saveAsFormat(menu, format, ext, new AscCommon.asc_CTextParams(Asc.c_oAscTextAssociation.PlainLine)); buttons: ['ok', 'cancel'],
} callback: _.bind(function(btn){
}, this) if (btn == 'ok') {
}); me._saveAsFormat(menu, format, ext, new AscCommon.asc_CTextParams(Asc.c_oAscTextAssociation.PlainLine));
}
}, this)
});
}
} }
} else } else
this._saveAsFormat(menu, format, ext); this._saveAsFormat(menu, format, ext);

View file

@ -1341,18 +1341,17 @@ define([
if (!value) { if (!value) {
value = this._getApiTextSize(); value = this._getApiTextSize();
setTimeout(function(){
Common.UI.warning({ Common.UI.warning({
msg: this.textFontSizeErr, msg: me.textFontSizeErr,
callback: function() { callback: function() {
_.defer(function(btn) { _.defer(function(btn) {
$('input', combo.cmpEl).focus(); $('input', combo.cmpEl).focus();
}) })
} }
}); });
}, 1);
combo.setRawValue(value); combo.setRawValue(value);
e.preventDefault(); e.preventDefault();
return false; return false;
} }

View file

@ -1324,18 +1324,17 @@ define([
if (!value) { if (!value) {
value = this._getApiTextSize(); value = this._getApiTextSize();
setTimeout(function(){
Common.UI.warning({ Common.UI.warning({
msg: this.textFontSizeErr, msg: me.textFontSizeErr,
callback: function() { callback: function() {
_.defer(function(btn) { _.defer(function(btn) {
$('input', combo.cmpEl).focus(); $('input', combo.cmpEl).focus();
}) })
} }
}); });
}, 1);
combo.setRawValue(value); combo.setRawValue(value);
e.preventDefault(); e.preventDefault();
return false; return false;
} }

View file

@ -1625,18 +1625,17 @@ define([
if (!value) { if (!value) {
value = this._getApiTextSize(); value = this._getApiTextSize();
setTimeout(function(){
Common.UI.warning({ Common.UI.warning({
msg: this.textFontSizeErr, msg: me.textFontSizeErr,
callback: function() { callback: function() {
_.defer(function(btn) { _.defer(function(btn) {
$('input', combo.cmpEl).focus(); $('input', combo.cmpEl).focus();
}) })
} }
}); });
}, 1);
combo.setRawValue(value); combo.setRawValue(value);
e.preventDefault(); e.preventDefault();
return false; return false;
} }