[DE] Change style for disconnect tips

This commit is contained in:
Julia Radzhabova
2024-10-01 22:55:14 +03:00
parent cb80cca2b9
commit 5fc510e5f9
4 changed files with 20 additions and 10 deletions

View File

@ -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();

View File

@ -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']:

View File

@ -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}
});
},

View File

@ -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": "<b>Connection is lost</b><br>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",