Fix Bug 44992

This commit is contained in:
Julia Radzhabova 2021-09-03 14:39:20 +03:00
parent 695fcb78f0
commit bc20db597b
6 changed files with 44 additions and 12 deletions

View file

@ -443,8 +443,18 @@ define([
});
var onHyperlinkClick = function(url) {
if (url /*&& me.api.asc_getUrlType(url)>0*/) {
window.open(url);
if (url) {
if (me.api.asc_getUrlType(url)>0)
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',
textRemField: 'Remove Text Field',
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 || {}));
});

View file

@ -1591,6 +1591,7 @@
"DE.Views.DocumentHolder.txtUngroup": "Ungroup",
"DE.Views.DocumentHolder.updateStyleText": "Update %1 style",
"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.strDropcap": "Drop Cap",
"DE.Views.DropcapSettingsAdvanced.strMargins": "Margins",

View file

@ -443,8 +443,18 @@ define([
});
var onHyperlinkClick = function(url) {
if (url /*&& me.api.asc_getUrlType(url)>0*/) {
window.open(url);
if (url) {
if (me.api.asc_getUrlType(url)>0)
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',
txtResetLayout: 'Reset Slide',
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 || {}));
});

View file

@ -1281,6 +1281,7 @@
"PE.Views.DocumentHolder.txtUnderbar": "Bar under text",
"PE.Views.DocumentHolder.txtUngroup": "Ungroup",
"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.slideIndexText": "Slide {0} of {1}",
"PE.Views.DocumentPreview.txtClose": "Close slideshow",

View file

@ -1523,11 +1523,17 @@ define([
});
return;
}
// if (this.api.asc_getUrlType(url)>0) {
var newDocumentPage = window.open(url, '_blank');
if (newDocumentPage)
newDocumentPage.focus();
// }
if (this.api.asc_getUrlType(url)>0)
window.open(url, '_blank');
else
Common.UI.warning({
msg: this.txtWarnUrl,
buttons: ['yes', 'no'],
primary: 'yes',
callback: function(btn) {
(btn == 'yes') && window.open(url, '_blank');
}
});
},
onApiAutofilter: function(config) {
@ -3957,7 +3963,8 @@ define([
textStopExpand: 'Stop automatically expanding tables',
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?',
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 || {}));
});

View file

@ -587,6 +587,7 @@
"SSE.Controllers.DocumentHolder.txtUndoExpansion": "Undo table autoexpansion",
"SSE.Controllers.DocumentHolder.txtUseTextImport": "Use text import wizard",
"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.sCategoryCube": "Cube",
"SSE.Controllers.FormulaDialog.sCategoryDatabase": "Database",