Merge pull request #1153 from ONLYOFFICE/fix/bugfix

Fix Bug 44992
This commit is contained in:
Julia Radzhabova 2021-09-03 14:46:25 +03:00 committed by GitHub
commit 510cfba343
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 44 additions and 12 deletions

View file

@ -443,8 +443,18 @@ define([
}); });
var onHyperlinkClick = function(url) { var onHyperlinkClick = function(url) {
if (url /*&& me.api.asc_getUrlType(url)>0*/) { if (url) {
if (me.api.asc_getUrlType(url)>0)
window.open(url); window.open(url);
else
Common.UI.warning({
msg: me.txtWarnUrl,
buttons: ['yes', 'no'],
primary: 'yes',
callback: function(btn) {
(btn == 'yes') && window.open(url);
}
});
} }
}; };
@ -4660,7 +4670,8 @@ define([
textRemPicture: 'Remove Image', textRemPicture: 'Remove Image',
textRemField: 'Remove Text Field', textRemField: 'Remove Text Field',
txtRemoveWarning: 'Do you want to remove this signature?<br>It can\'t be undone.', txtRemoveWarning: 'Do you want to remove this signature?<br>It can\'t be undone.',
notcriticalErrorTitle: 'Warning' notcriticalErrorTitle: 'Warning',
txtWarnUrl: 'Clicking this link can be harmful to your device and data.<br>Are you sure you want to continue?'
}, DE.Views.DocumentHolder || {})); }, DE.Views.DocumentHolder || {}));
}); });

View file

@ -1591,6 +1591,7 @@
"DE.Views.DocumentHolder.txtUngroup": "Ungroup", "DE.Views.DocumentHolder.txtUngroup": "Ungroup",
"DE.Views.DocumentHolder.updateStyleText": "Update %1 style", "DE.Views.DocumentHolder.updateStyleText": "Update %1 style",
"DE.Views.DocumentHolder.vertAlignText": "Vertical Alignment", "DE.Views.DocumentHolder.vertAlignText": "Vertical Alignment",
"DE.Views.DocumentHolder.txtWarnUrl": "Clicking this link can be harmful to your device and data.<br>Are you sure you want to continue?",
"DE.Views.DropcapSettingsAdvanced.strBorders": "Borders & Fill", "DE.Views.DropcapSettingsAdvanced.strBorders": "Borders & Fill",
"DE.Views.DropcapSettingsAdvanced.strDropcap": "Drop Cap", "DE.Views.DropcapSettingsAdvanced.strDropcap": "Drop Cap",
"DE.Views.DropcapSettingsAdvanced.strMargins": "Margins", "DE.Views.DropcapSettingsAdvanced.strMargins": "Margins",

View file

@ -443,8 +443,18 @@ define([
}); });
var onHyperlinkClick = function(url) { var onHyperlinkClick = function(url) {
if (url /*&& me.api.asc_getUrlType(url)>0*/) { if (url) {
if (me.api.asc_getUrlType(url)>0)
window.open(url); window.open(url);
else
Common.UI.warning({
msg: me.txtWarnUrl,
buttons: ['yes', 'no'],
primary: 'yes',
callback: function(btn) {
(btn == 'yes') && window.open(url);
}
});
} }
}; };
@ -3954,7 +3964,8 @@ define([
addToLayoutText: 'Add to Layout', addToLayoutText: 'Add to Layout',
txtResetLayout: 'Reset Slide', txtResetLayout: 'Reset Slide',
mniCustomTable: 'Insert Custom Table', mniCustomTable: 'Insert Custom Table',
textFromStorage: 'From Storage' textFromStorage: 'From Storage',
txtWarnUrl: 'Clicking this link can be harmful to your device and data.<br>Are you sure you want to continue?'
}, PE.Views.DocumentHolder || {})); }, PE.Views.DocumentHolder || {}));
}); });

View file

@ -1281,6 +1281,7 @@
"PE.Views.DocumentHolder.txtUnderbar": "Bar under text", "PE.Views.DocumentHolder.txtUnderbar": "Bar under text",
"PE.Views.DocumentHolder.txtUngroup": "Ungroup", "PE.Views.DocumentHolder.txtUngroup": "Ungroup",
"PE.Views.DocumentHolder.vertAlignText": "Vertical Alignment", "PE.Views.DocumentHolder.vertAlignText": "Vertical Alignment",
"PE.Views.DocumentHolder.txtWarnUrl": "Clicking this link can be harmful to your device and data.<br>Are you sure you want to continue?",
"PE.Views.DocumentPreview.goToSlideText": "Go to Slide", "PE.Views.DocumentPreview.goToSlideText": "Go to Slide",
"PE.Views.DocumentPreview.slideIndexText": "Slide {0} of {1}", "PE.Views.DocumentPreview.slideIndexText": "Slide {0} of {1}",
"PE.Views.DocumentPreview.txtClose": "Close slideshow", "PE.Views.DocumentPreview.txtClose": "Close slideshow",

View file

@ -1523,11 +1523,17 @@ define([
}); });
return; return;
} }
// if (this.api.asc_getUrlType(url)>0) { if (this.api.asc_getUrlType(url)>0)
var newDocumentPage = window.open(url, '_blank'); window.open(url, '_blank');
if (newDocumentPage) else
newDocumentPage.focus(); Common.UI.warning({
// } msg: this.txtWarnUrl,
buttons: ['yes', 'no'],
primary: 'yes',
callback: function(btn) {
(btn == 'yes') && window.open(url, '_blank');
}
});
}, },
onApiAutofilter: function(config) { onApiAutofilter: function(config) {
@ -3957,7 +3963,8 @@ define([
textStopExpand: 'Stop automatically expanding tables', textStopExpand: 'Stop automatically expanding tables',
textAutoCorrectSettings: 'AutoCorrect options', textAutoCorrectSettings: 'AutoCorrect options',
txtLockSort: 'Data is found next to your selection, but you do not have sufficient permissions to change those cells.<br>Do you wish to continue with the current selection?', txtLockSort: 'Data is found next to your selection, but you do not have sufficient permissions to change those cells.<br>Do you wish to continue with the current selection?',
txtRemoveWarning: 'Do you want to remove this signature?<br>It can\'t be undone.' txtRemoveWarning: 'Do you want to remove this signature?<br>It can\'t be undone.',
txtWarnUrl: 'Clicking this link can be harmful to your device and data.<br>Are you sure you want to continue?'
}, SSE.Controllers.DocumentHolder || {})); }, SSE.Controllers.DocumentHolder || {}));
}); });

View file

@ -587,6 +587,7 @@
"SSE.Controllers.DocumentHolder.txtUndoExpansion": "Undo table autoexpansion", "SSE.Controllers.DocumentHolder.txtUndoExpansion": "Undo table autoexpansion",
"SSE.Controllers.DocumentHolder.txtUseTextImport": "Use text import wizard", "SSE.Controllers.DocumentHolder.txtUseTextImport": "Use text import wizard",
"SSE.Controllers.DocumentHolder.txtWidth": "Width", "SSE.Controllers.DocumentHolder.txtWidth": "Width",
"SSE.Controllers.DocumentHolder.txtWarnUrl": "Clicking this link can be harmful to your device and data.<br>Are you sure you want to continue?",
"SSE.Controllers.FormulaDialog.sCategoryAll": "All", "SSE.Controllers.FormulaDialog.sCategoryAll": "All",
"SSE.Controllers.FormulaDialog.sCategoryCube": "Cube", "SSE.Controllers.FormulaDialog.sCategoryCube": "Cube",
"SSE.Controllers.FormulaDialog.sCategoryDatabase": "Database", "SSE.Controllers.FormulaDialog.sCategoryDatabase": "Database",