mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-04-07 14:06:16 +08:00
Fix bug 68833
This commit is contained in:
@ -106,12 +106,6 @@ define([
|
|||||||
me.isTooltipHiding = false;
|
me.isTooltipHiding = false;
|
||||||
|
|
||||||
me.screenTip = {
|
me.screenTip = {
|
||||||
toolTip: new Common.UI.Tooltip({
|
|
||||||
owner: this,
|
|
||||||
html: true,
|
|
||||||
title: '<br><b>Press Ctrl and click link</b>'
|
|
||||||
// style: 'word-wrap: break-word;'
|
|
||||||
}),
|
|
||||||
strTip: '',
|
strTip: '',
|
||||||
isHidden: true,
|
isHidden: true,
|
||||||
isVisible: false
|
isVisible: false
|
||||||
@ -128,7 +122,8 @@ define([
|
|||||||
me.wrapEvents = {
|
me.wrapEvents = {
|
||||||
userTipMousover: _.bind(me.userTipMousover, me),
|
userTipMousover: _.bind(me.userTipMousover, me),
|
||||||
userTipMousout: _.bind(me.userTipMousout, me),
|
userTipMousout: _.bind(me.userTipMousout, me),
|
||||||
onKeyUp: _.bind(me.onKeyUp, me)
|
onKeyUp: _.bind(me.onKeyUp, me),
|
||||||
|
onMouseLeave: _.bind(me.onMouseLeave, me)
|
||||||
};
|
};
|
||||||
|
|
||||||
me.guideTip = { ttHeight: 20 };
|
me.guideTip = { ttHeight: 20 };
|
||||||
@ -533,10 +528,14 @@ define([
|
|||||||
},
|
},
|
||||||
|
|
||||||
hideScreenTip: function() {
|
hideScreenTip: function() {
|
||||||
this.screenTip.toolTip.hide();
|
this.screenTip.toolTip && this.screenTip.toolTip.hide();
|
||||||
this.screenTip.isVisible = false;
|
this.screenTip.isVisible = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onMouseLeave: function () {
|
||||||
|
this.hideScreenTip();
|
||||||
|
},
|
||||||
|
|
||||||
getUserName: function(id){
|
getUserName: function(id){
|
||||||
var usersStore = PE.getCollection('Common.Collections.Users');
|
var usersStore = PE.getCollection('Common.Collections.Users');
|
||||||
if (usersStore){
|
if (usersStore){
|
||||||
@ -627,7 +626,7 @@ define([
|
|||||||
if (this.screenTip.isHidden && this.screenTip.isVisible) {
|
if (this.screenTip.isHidden && this.screenTip.isVisible) {
|
||||||
me.screenTip.isVisible = false;
|
me.screenTip.isVisible = false;
|
||||||
me.isTooltipHiding = true;
|
me.isTooltipHiding = true;
|
||||||
me.screenTip.toolTip.hide(function(){
|
me.screenTip.toolTip && me.screenTip.toolTip.hide(function(){
|
||||||
me.isTooltipHiding = false;
|
me.isTooltipHiding = false;
|
||||||
if (me.mouseMoveData) me.onMouseMove(me.mouseMoveData);
|
if (me.mouseMoveData) me.onMouseMove(me.mouseMoveData);
|
||||||
me.mouseMoveData = null;
|
me.mouseMoveData = null;
|
||||||
|
|||||||
@ -460,6 +460,21 @@ define([], function () {
|
|||||||
}
|
}
|
||||||
var recalc = false;
|
var recalc = false;
|
||||||
screenTip.isHidden = false;
|
screenTip.isHidden = false;
|
||||||
|
|
||||||
|
if (!me.screenTip.toolTip) {
|
||||||
|
me.screenTip.toolTip = new Common.UI.Tooltip({
|
||||||
|
owner: me,
|
||||||
|
html: true,
|
||||||
|
title: '<br><b>Press Ctrl and click link</b>'
|
||||||
|
});
|
||||||
|
me.screenTip.toolTip.on('tooltip:show', function () {
|
||||||
|
$('#id_main_parent').on('mouseleave', me.wrapEvents.onMouseLeave);
|
||||||
|
});
|
||||||
|
me.screenTip.toolTip.on('tooltip:hide',function () {
|
||||||
|
$('#id_main_parent').off('mouseleave', me.wrapEvents.onMouseLeave);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (screenTip.tipType !== type || screenTip.tipLength !== ToolTip.length || screenTip.strTip.indexOf(ToolTip)<0 ) {
|
if (screenTip.tipType !== type || screenTip.tipLength !== ToolTip.length || screenTip.strTip.indexOf(ToolTip)<0 ) {
|
||||||
screenTip.toolTip.setTitle((type===Asc.c_oAscMouseMoveDataTypes.Hyperlink) ? (ToolTip + (me.isPreviewVisible ? '' : '<br><b>' + Common.Utils.String.platformKey('Ctrl', me.documentHolder.txtPressLink) + '</b>')) : ToolTip);
|
screenTip.toolTip.setTitle((type===Asc.c_oAscMouseMoveDataTypes.Hyperlink) ? (ToolTip + (me.isPreviewVisible ? '' : '<br><b>' + Common.Utils.String.platformKey('Ctrl', me.documentHolder.txtPressLink) + '</b>')) : ToolTip);
|
||||||
screenTip.tipLength = ToolTip.length;
|
screenTip.tipLength = ToolTip.length;
|
||||||
|
|||||||
Reference in New Issue
Block a user