diff --git a/apps/common/main/lib/component/SynchronizeTip.js b/apps/common/main/lib/component/SynchronizeTip.js index 7f0a49f6dc..5240544eee 100644 --- a/apps/common/main/lib/component/SynchronizeTip.js +++ b/apps/common/main/lib/component/SynchronizeTip.js @@ -230,7 +230,9 @@ define([ // next: '' // show next tooltip on close // prev: '' // don't show tooltip if the prev was not shown // automove: false // applyPlacement on window resize - // maxwidth: 250 // 250 by default + // maxwidth: 250 // 250 by default, + // noHighlight: false // false by default, + // multiple: false // false by default, show tip multiple times // } }; @@ -270,13 +272,13 @@ define([ if (!(target && target.length && target.is(':visible'))) return false; - var placement = props.placement; + var placement = props.placement || 'bottom'; if (Common.UI.isRTL()) { placement = placement.indexOf('right')>-1 ? placement.replace('right', 'left') : placement.replace('left', 'right'); } - target.addClass('highlight-tip'); + !props.noHighlight && target.addClass('highlight-tip'); props.tip = new Common.UI.SynchronizeTip({ - extCls: 'colored', + extCls: 'colored' + (props.noHighlight ? ' no-arrow' : ''), style: 'min-width:200px;max-width:' + (props.maxwidth ? props.maxwidth : 250) + 'px;', placement: placement, target: target, @@ -305,7 +307,7 @@ define([ props.name && Common.localStorage.setItem(props.name, 1); props.callback && props.callback(); props.next && _showTip(props.next); - delete _helpTips[step]; + !props.multiple && (delete _helpTips[step]); } }); props.tip.show(); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index d742ca8d0f..02c20ff875 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1103,11 +1103,13 @@ define([ if ( id == Asc.c_oAscAsyncAction['Disconnect']) { this._state.timerDisconnect && clearTimeout(this._state.timerDisconnect); this.disableEditing(false, 'reconnect'); - this.getApplication().getController('Statusbar').hideDisconnectTip(); + // this.getApplication().getController('Statusbar').hideDisconnectTip(); + Common.UI.TooltipManager.closeTip('disconnect'); this.getApplication().getController('Statusbar').setStatusCaption(this.textReconnect); } else if (id === Asc.c_oAscAsyncAction['RefreshFile']) { this.disableEditing(false, 'refresh-file'); - this.getApplication().getController('Statusbar').hideDisconnectTip(); + // this.getApplication().getController('Statusbar').hideDisconnectTip(); + Common.UI.TooltipManager.closeTip('refreshFile'); this.getApplication().getController('Statusbar').setStatusCaption(''); } @@ -1216,7 +1218,8 @@ define([ var me = this; statusCallback = function() { me._state.timerDisconnect = setTimeout(function(){ - me.getApplication().getController('Statusbar').showDisconnectTip(); + Common.UI.TooltipManager.showTip('disconnect'); + // me.getApplication().getController('Statusbar').showDisconnectTip(); }, me._state.unloadTimer || 0); }; break; @@ -1226,7 +1229,8 @@ define([ text = this.textUpdating; Common.UI.Menu.Manager.hideAll(); this.disableEditing(true, 'refresh-file'); - this.getApplication().getController('Statusbar').showDisconnectTip(this.textUpdateVersion); + Common.UI.TooltipManager.showTip('refreshFile'); + // this.getApplication().getController('Statusbar').showDisconnectTip(this.textUpdateVersion); break; case Asc.c_oAscAsyncAction['Submit']: diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 6043874507..9863824465 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -252,10 +252,13 @@ define([ }, setMode: function(mode) { + var _main = this.getApplication().getController('Main'); this.mode = mode; this.toolbar.applyLayout(mode); !this.mode.isPDFForm && Common.UI.TooltipManager.addTips({ - 'pageColor' : {name: 'de-help-tip-page-color', placement: 'bottom-left', text: this.helpPageColor, header: this.helpPageColorHeader, target: '#slot-btn-pagecolor', automove: true} + 'pageColor' : {name: 'de-help-tip-page-color', placement: 'bottom-left', text: this.helpPageColor, header: this.helpPageColorHeader, target: '#slot-btn-pagecolor', automove: true}, + 'refreshFile' : {text: _main.textUpdateVersion, target: '#toolbar', maxwidth: 'none', showButton: false, automove: true, noHighlight: true, multiple: true}, + 'disconnect' : {text: _main.textConnectionLost, target: '#toolbar', maxwidth: 'none', showButton: false, automove: true, noHighlight: true, multiple: true} }); }, diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 31d50d0610..f72158ae9e 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1298,6 +1298,7 @@ "DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", "DE.Controllers.Main.textUpdating": "Updating", "DE.Controllers.Main.textUpdateVersion": "The file version has been changed. Please wait...", + "DE.Controllers.Main.textConnectionLost": "Connection is lost
Trying to connect. Please check connection settings.", "DE.Controllers.Navigation.txtBeginning": "Beginning of document", "DE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document", "DE.Controllers.Print.textMarginsLast": "Last Custom",