From e9f9aa1c16df6cccf0affec3a489d3385962a20d Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 12 Oct 2020 14:58:13 +0300 Subject: [PATCH] [DE] Show help tooltip for new forms --- .../documenteditor/main/app/view/DocumentHolder.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/documenteditor/main/app/view/DocumentHolder.js b/apps/documenteditor/main/app/view/DocumentHolder.js index c32c50b79..ce3cf6ba1 100644 --- a/apps/documenteditor/main/app/view/DocumentHolder.js +++ b/apps/documenteditor/main/app/view/DocumentHolder.js @@ -491,20 +491,24 @@ define([ var showPoint, ToolTip, type = moveData.get_Type(); - if (type==1 || type==3) { // 1 - hyperlink, 3 - footnote + if (type==Asc.c_oAscMouseMoveDataTypes.Hyperlink || type==Asc.c_oAscMouseMoveDataTypes.Footnote || type==Asc.c_oAscMouseMoveDataTypes.Form) { // 1 - hyperlink, 3 - footnote if (isTooltipHiding) { mouseMoveData = moveData; return; } - if (type==1) { + if (type==Asc.c_oAscMouseMoveDataTypes.Hyperlink) { var hyperProps = moveData.get_Hyperlink(); if (!hyperProps) return; ToolTip = (_.isEmpty(hyperProps.get_ToolTip())) ? hyperProps.get_Value() : hyperProps.get_ToolTip(); - } else { + } else if (type == Asc.c_oAscMouseMoveDataTypes.Footnote) { ToolTip = moveData.get_FootnoteText(); if (ToolTip.length>1000) ToolTip = ToolTip.substr(0, 1000) + '...'; + } else if (type==Asc.c_oAscMouseMoveDataTypes.Form) { + ToolTip = moveData.get_FormHelpText(); + if (ToolTip.length>1000) + ToolTip = ToolTip.substr(0, 1000) + '...'; } var recalc = false; @@ -513,7 +517,7 @@ define([ ToolTip = Common.Utils.String.htmlEncode(ToolTip); if (screenTip.tipType !== type || screenTip.tipLength !== ToolTip.length || screenTip.strTip.indexOf(ToolTip)<0 ) { - screenTip.toolTip.setTitle((type==1) ? (ToolTip + '
' + me.txtPressLink + '') : ToolTip); + screenTip.toolTip.setTitle((type==Asc.c_oAscMouseMoveDataTypes.Hyperlink) ? (ToolTip + '
' + me.txtPressLink + '') : ToolTip); screenTip.tipLength = ToolTip.length; screenTip.strTip = ToolTip; screenTip.tipType = type; @@ -547,7 +551,7 @@ define([ screenTip.toolTip.getBSTip().$tip.css({top: showPoint[1] + 'px', left: showPoint[0] + 'px'}); } /** coauthoring begin **/ - else if (moveData.get_Type()==2 && me.mode.isEdit) { // 2 - locked object + else if (moveData.get_Type()==Asc.c_oAscMouseMoveDataTypes.LockedObject && me.mode.isEdit) { // 2 - locked object var src; if (me.usertipcount >= me.usertips.length) { src = $(document.createElement("div"));