From 79ee683c1e331fd73c3f3e9b55c7bf228e7ba80f Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 6 Dec 2021 18:37:37 +0300 Subject: [PATCH 1/2] [DE] Disable downloading some formats --- apps/documenteditor/main/app/controller/Main.js | 7 ++++--- apps/documenteditor/main/app/controller/Toolbar.js | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 5321d8608..40b49420a 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -554,10 +554,11 @@ define([ Asc.c_oAscFileType.OTT, Asc.c_oAscFileType.FB2, Asc.c_oAscFileType.EPUB, - Asc.c_oAscFileType.DOCM, - Asc.c_oAscFileType.DOCXF, - Asc.c_oAscFileType.OFORM + Asc.c_oAscFileType.DOCM ]; + if (this.appOptions.canFeatureForms) { + _supported = _supported.concat([Asc.c_oAscFileType.DOCXF, Asc.c_oAscFileType.OFORM]); + } if ( !_format || _supported.indexOf(_format) < 0 ) _format = Asc.c_oAscFileType.DOCX; diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 3297d4b20..eb5115ddb 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -159,10 +159,11 @@ define([ Asc.c_oAscFileType.OTT, Asc.c_oAscFileType.FB2, Asc.c_oAscFileType.EPUB, - Asc.c_oAscFileType.DOCM, - Asc.c_oAscFileType.DOCXF, - Asc.c_oAscFileType.OFORM + Asc.c_oAscFileType.DOCM ]; + if (_main.appOptions.canFeatureForms) { + _supported = _supported.concat([Asc.c_oAscFileType.DOCXF, Asc.c_oAscFileType.OFORM]); + } if ( !_format || _supported.indexOf(_format) < 0 ) _format = Asc.c_oAscFileType.PDF; From 5ebfe910ceaf719b3596c1012ec2f45e7c3d6863 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 6 Dec 2021 19:02:47 +0300 Subject: [PATCH 2/2] [PE] Fix hyperlink tip in preview mode --- apps/presentationeditor/main/app/view/DocumentHolder.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/presentationeditor/main/app/view/DocumentHolder.js b/apps/presentationeditor/main/app/view/DocumentHolder.js index 65f523a00..5f5bbb299 100644 --- a/apps/presentationeditor/main/app/view/DocumentHolder.js +++ b/apps/presentationeditor/main/app/view/DocumentHolder.js @@ -523,8 +523,8 @@ define([ } showPoint = [moveData.get_X(), moveData.get_Y()]; - showPoint[1] += (me._XY[1]-15); - showPoint[0] += (me._XY[0]+5); + showPoint[1] += ((me.isPreviewVisible ? 0 : me._XY[1])-15); + showPoint[0] += ((me.isPreviewVisible ? 0 : me._XY[0])+5); if (!screenTip.isVisible || recalc) { screenTip.isVisible = true; @@ -536,6 +536,8 @@ define([ screenTip.tipWidth = screenTip.toolTip.getBSTip().$tip.width(); } showPoint[1] -= screenTip.tipHeight; + if (showPoint[1]<0) + showPoint[1] = 0; if (showPoint[0] + screenTip.tipWidth > me._BodyWidth ) showPoint[0] = me._BodyWidth - screenTip.tipWidth; screenTip.toolTip.getBSTip().$tip.css({top: showPoint[1] + 'px', left: showPoint[0] + 'px'});