Merge branch 'feature/disconnect-warn' into develop
This commit is contained in:
commit
15f95b293b
|
@ -76,11 +76,12 @@ define([
|
|||
this.target = this.options.target;
|
||||
this.text = !_.isEmpty(this.options.text) ? this.options.text : this.textSynchronize;
|
||||
this.textLink = !_.isEmpty(this.options.textLink) ? this.options.textLink : this.textDontShow;
|
||||
this.placement = this.options.placement;
|
||||
this.placement = this.options.placement; // if placement='target' and position is undefined show in top,left position of target, also use for arrow position
|
||||
this.showLink = this.options.showLink;
|
||||
this.showButton = this.options.showButton;
|
||||
this.closable = this.options.closable;
|
||||
this.textButton = this.options.textButton || '';
|
||||
this.position = this.options.position; // show in the position relative to target
|
||||
},
|
||||
|
||||
render: function() {
|
||||
|
@ -90,6 +91,8 @@ define([
|
|||
this.cmpEl.find('.close').on('click', _.bind(function() { this.trigger('closeclick');}, this));
|
||||
this.cmpEl.find('.show-link label').on('click', _.bind(function() { this.trigger('dontshowclick');}, this));
|
||||
this.cmpEl.find('.btn-div').on('click', _.bind(function() { this.trigger('buttonclick');}, this));
|
||||
|
||||
this.closable && this.cmpEl.addClass('closable');
|
||||
}
|
||||
|
||||
this.applyPlacement();
|
||||
|
@ -115,12 +118,28 @@ define([
|
|||
},
|
||||
|
||||
applyPlacement: function () {
|
||||
var showxy = this.target.offset();
|
||||
if (this.placement=='target') {
|
||||
var target = this.target && this.target.length>0 ? this.target : $(document.body);
|
||||
var showxy = target.offset();
|
||||
if (this.placement=='target' && !this.position) {
|
||||
this.cmpEl.css({top : showxy.top + 5 + 'px', left: showxy.left + 5 + 'px'});
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.position && typeof this.position == 'object') {
|
||||
var top = this.position.top, left = this.position.left, bottom = this.position.bottom, right = this.position.right;
|
||||
if (bottom!==undefined || top!==undefined)
|
||||
left = showxy.left + (target.width() - this.cmpEl.width())/2;
|
||||
else
|
||||
top = showxy.top + (target.height() - this.cmpEl.height())/2;
|
||||
top = (top!==undefined) ? (top + 'px') : 'auto';
|
||||
bottom = (bottom!==undefined) ? (bottom + 'px') : 'auto';
|
||||
right = (right!==undefined) ? (right + 'px') : 'auto';
|
||||
left = (left!==undefined) ? (left + 'px') : 'auto';
|
||||
|
||||
this.cmpEl.css({top : top, left: left, right: right, bottom: bottom});
|
||||
return;
|
||||
}
|
||||
|
||||
var placement = this.placement.split('-');
|
||||
if (placement.length>0) {
|
||||
var top, left, bottom, right;
|
||||
|
@ -128,29 +147,29 @@ define([
|
|||
if (pos=='top') {
|
||||
bottom = Common.Utils.innerHeight() - showxy.top;
|
||||
} else if (pos == 'bottom') {
|
||||
top = showxy.top + this.target.height();
|
||||
top = showxy.top + target.height();
|
||||
} else if (pos == 'left') {
|
||||
right = Common.Utils.innerWidth() - showxy.left;
|
||||
} else if (pos == 'right') {
|
||||
left = showxy.left + this.target.width();
|
||||
left = showxy.left + target.width();
|
||||
}
|
||||
pos = placement[1];
|
||||
if (pos=='top') {
|
||||
bottom = Common.Utils.innerHeight() - showxy.top - this.target.height()/2;
|
||||
bottom = Common.Utils.innerHeight() - showxy.top - target.height()/2;
|
||||
} else if (pos == 'bottom') {
|
||||
top = showxy.top + this.target.height()/2;
|
||||
top = showxy.top + target.height()/2;
|
||||
var height = this.cmpEl.height();
|
||||
if (top+height>Common.Utils.innerHeight())
|
||||
top = Common.Utils.innerHeight() - height - 10;
|
||||
} else if (pos == 'left') {
|
||||
right = Common.Utils.innerWidth() - showxy.left - this.target.width()/2;
|
||||
right = Common.Utils.innerWidth() - showxy.left - target.width()/2;
|
||||
} else if (pos == 'right') {
|
||||
left = showxy.left + this.target.width()/2;
|
||||
left = showxy.left + target.width()/2;
|
||||
} else {
|
||||
if (bottom!==undefined || top!==undefined)
|
||||
left = showxy.left + (this.target.width() - this.cmpEl.width())/2;
|
||||
left = showxy.left + (target.width() - this.cmpEl.width())/2;
|
||||
else
|
||||
top = showxy.top + (this.target.height() - this.cmpEl.height())/2;
|
||||
top = showxy.top + (target.height() - this.cmpEl.height())/2;
|
||||
}
|
||||
top = (top!==undefined) ? (top + 'px') : 'auto';
|
||||
bottom = (bottom!==undefined) ? (bottom + 'px') : 'auto';
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
.synch-tip-root {
|
||||
position: fixed;
|
||||
z-index: @zindex-navbar + 2;
|
||||
@tip-width: 300px;
|
||||
|
||||
&:not(.simple) {
|
||||
width: @tip-width;
|
||||
|
||||
.tip-text {
|
||||
width: @tip-width - 40px;
|
||||
}
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
&.simple {
|
||||
|
@ -18,17 +13,15 @@
|
|||
.tip-arrow {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.asc-synchronizetip {
|
||||
padding-right: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
&.no-arrow {
|
||||
.tip-arrow {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&.closable {
|
||||
.asc-synchronizetip {
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
@ -84,12 +77,6 @@
|
|||
}
|
||||
|
||||
&.colored {
|
||||
@tip-width: 270px;
|
||||
width: @tip-width;
|
||||
.tip-text {
|
||||
width: @tip-width - 40px;
|
||||
}
|
||||
|
||||
.asc-synchronizetip {
|
||||
background-color: @background-contrast-popover-ie;
|
||||
background-color: @background-contrast-popover;
|
||||
|
@ -439,7 +426,7 @@
|
|||
}
|
||||
|
||||
.asc-synchronizetip {
|
||||
padding: 15px 8px 15px 15px;
|
||||
padding: 10px 15px;
|
||||
border-radius: 5px;
|
||||
background-color: @background-notification-popover-ie;
|
||||
background-color: @background-notification-popover;
|
||||
|
@ -528,7 +515,7 @@
|
|||
top: 0;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin: 8px;
|
||||
margin: 5px;
|
||||
cursor: pointer;
|
||||
|
||||
opacity: 0.7;
|
||||
|
|
|
@ -942,6 +942,8 @@ define([
|
|||
|
||||
if ( id == Asc.c_oAscAsyncAction['Disconnect']) {
|
||||
this.disableEditing(false, true);
|
||||
this.getApplication().getController('Statusbar').hideDisconnectTip();
|
||||
this.getApplication().getController('Statusbar').setStatusCaption(this.textReconnect);
|
||||
}
|
||||
|
||||
if ( type == Asc.c_oAscAsyncActionType.BlockInteraction &&
|
||||
|
@ -955,6 +957,7 @@ define([
|
|||
|
||||
setLongActionView: function(action) {
|
||||
var title = '', text = '', force = false;
|
||||
var statusCallback = null; // call after showing status
|
||||
|
||||
switch (action.id) {
|
||||
case Asc.c_oAscAsyncAction['Open']:
|
||||
|
@ -1043,6 +1046,10 @@ define([
|
|||
case Asc.c_oAscAsyncAction['Disconnect']:
|
||||
text = this.textDisconnect;
|
||||
this.disableEditing(true, true);
|
||||
var me = this;
|
||||
statusCallback = function() {
|
||||
me.getApplication().getController('Statusbar').showDisconnectTip();
|
||||
};
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1062,7 +1069,7 @@ define([
|
|||
if (!this.isShowOpenDialog)
|
||||
this.loadMask.show(action.id===Asc.c_oAscAsyncAction['Open']);
|
||||
} else {
|
||||
this.getApplication().getController('Statusbar').setStatusCaption(text, force);
|
||||
this.getApplication().getController('Statusbar').setStatusCaption(text, force, 0, statusCallback);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -3070,6 +3077,7 @@ define([
|
|||
txtStyle_endnote_text: 'Endnote Text',
|
||||
txtTOCHeading: 'TOC Heading',
|
||||
textDisconnect: 'Connection is lost',
|
||||
textReconnect: 'Connection is restored',
|
||||
errorLang: 'The interface language is not loaded.<br>Please contact your Document Server administrator.',
|
||||
errorLoadingFont: 'Fonts are not loaded.<br>Please contact your Document Server administrator.'
|
||||
}
|
||||
|
|
|
@ -260,13 +260,14 @@ define([
|
|||
this.statusbar.reloadLanguages(langs);
|
||||
},
|
||||
|
||||
setStatusCaption: function(text, force, delay) {
|
||||
setStatusCaption: function(text, force, delay, callback) {
|
||||
if (this.timerCaption && ( ((new Date()) < this.timerCaption) || text.length==0 ) && !force )
|
||||
return;
|
||||
|
||||
this.timerCaption = undefined;
|
||||
if (text.length) {
|
||||
this.statusbar.showStatusMessage(text);
|
||||
callback && callback();
|
||||
if (delay>0)
|
||||
this.timerCaption = (new Date()).getTime() + delay;
|
||||
} else
|
||||
|
@ -315,10 +316,38 @@ define([
|
|||
return tip;
|
||||
},
|
||||
|
||||
showDisconnectTip: function () {
|
||||
var me = this;
|
||||
if (!this.disconnectTip) {
|
||||
var target = this.statusbar.getStatusLabel();
|
||||
target = target.is(':visible') ? target.parent() : this.statusbar.isVisible() ? this.statusbar.$el : $(document.body);
|
||||
this.disconnectTip = new Common.UI.SynchronizeTip({
|
||||
target : target,
|
||||
text : this.textDisconnect,
|
||||
placement: 'top',
|
||||
position: this.statusbar.isVisible() ? undefined : {bottom: 0},
|
||||
showLink: false
|
||||
});
|
||||
this.disconnectTip.on({
|
||||
'closeclick': function() {
|
||||
me.disconnectTip.hide();
|
||||
me.disconnectTip = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
this.disconnectTip.show();
|
||||
},
|
||||
|
||||
hideDisconnectTip: function() {
|
||||
this.disconnectTip && this.disconnectTip.hide();
|
||||
this.disconnectTip = null;
|
||||
},
|
||||
|
||||
zoomText : 'Zoom {0}%',
|
||||
textHasChanges : 'New changes have been tracked',
|
||||
textTrackChanges: 'The document is opened with the Track Changes mode enabled',
|
||||
tipReview : 'Review',
|
||||
textSetTrackChanges: 'You are in Track Changes mode'
|
||||
textSetTrackChanges: 'You are in Track Changes mode',
|
||||
textDisconnect: '<b>Connection is lost</b><br>Please check connection settings.'
|
||||
}, DE.Controllers.Statusbar || {}));
|
||||
});
|
|
@ -325,6 +325,10 @@ define([
|
|||
: this.hide();
|
||||
},
|
||||
|
||||
isVisible: function() {
|
||||
return this.$el && this.$el.is(':visible');
|
||||
},
|
||||
|
||||
reloadLanguages: function(array) {
|
||||
var arr = [],
|
||||
saved = this.langMenu.saved;
|
||||
|
@ -358,12 +362,16 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
getStatusLabel: function() {
|
||||
return $('.statusbar #label-action');
|
||||
},
|
||||
|
||||
showStatusMessage: function(message) {
|
||||
$('.statusbar #label-action').text(message);
|
||||
this.getStatusLabel().text(message);
|
||||
},
|
||||
|
||||
clearStatusMessage: function() {
|
||||
$('.statusbar #label-action').text('');
|
||||
this.getStatusLabel().text('');
|
||||
},
|
||||
|
||||
SetDisabled: function(disable) {
|
||||
|
|
|
@ -884,6 +884,7 @@
|
|||
"DE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact %1 sales team for personal upgrade terms.",
|
||||
"DE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
|
||||
"DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
|
||||
"DE.Controllers.Main.textReconnect": "Connection is restored",
|
||||
"DE.Controllers.Navigation.txtBeginning": "Beginning of document",
|
||||
"DE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document",
|
||||
"DE.Controllers.Statusbar.textHasChanges": "New changes have been tracked",
|
||||
|
@ -891,6 +892,7 @@
|
|||
"DE.Controllers.Statusbar.textTrackChanges": "The document is opened with the Track Changes mode enabled",
|
||||
"DE.Controllers.Statusbar.tipReview": "Track changes",
|
||||
"DE.Controllers.Statusbar.zoomText": "Zoom {0}%",
|
||||
"DE.Controllers.Statusbar.textDisconnect": "<b>Connection is lost</b><br>Please check connection settings.",
|
||||
"DE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.<br>The text style will be displayed using one of the system fonts, the saved font will be used when it is available.<br>Do you want to continue?",
|
||||
"DE.Controllers.Toolbar.dataUrl": "Paste a data URL",
|
||||
"DE.Controllers.Toolbar.notcriticalErrorTitle": "Warning",
|
||||
|
|
|
@ -621,6 +621,8 @@ define([
|
|||
|
||||
if ( id == Asc.c_oAscAsyncAction['Disconnect']) {
|
||||
this.disableEditing(false, true);
|
||||
this.getApplication().getController('Statusbar').hideDisconnectTip();
|
||||
this.getApplication().getController('Statusbar').setStatusCaption(this.textReconnect);
|
||||
}
|
||||
|
||||
if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.inTextareaControl || Common.Utils.ModalWindow.isVisible() || this.inFormControl))) {
|
||||
|
@ -631,6 +633,7 @@ define([
|
|||
|
||||
setLongActionView: function(action) {
|
||||
var title = '', text = '', force = false;
|
||||
var statusCallback = null; // call after showing status
|
||||
|
||||
switch (action.id) {
|
||||
case Asc.c_oAscAsyncAction['Open']:
|
||||
|
@ -712,6 +715,10 @@ define([
|
|||
case Asc.c_oAscAsyncAction['Disconnect']:
|
||||
text = this.textDisconnect;
|
||||
this.disableEditing(true, true);
|
||||
var me = this;
|
||||
statusCallback = function() {
|
||||
me.getApplication().getController('Statusbar').showDisconnectTip();
|
||||
};
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -731,7 +738,7 @@ define([
|
|||
if (!this.isShowOpenDialog)
|
||||
this.loadMask.show(action.id===Asc.c_oAscAsyncAction['Open']);
|
||||
} else {
|
||||
this.getApplication().getController('Statusbar').setStatusCaption(text, force);
|
||||
this.getApplication().getController('Statusbar').setStatusCaption(text, force, 0, statusCallback);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -2854,7 +2861,8 @@ define([
|
|||
errorLoadingFont: 'Fonts are not loaded.<br>Please contact your Document Server administrator.',
|
||||
textConvertEquation: 'This equation was created with an old version of equation editor which is no longer supported. Converting this equation to Office Math ML format will make it editable.<br>Do you want to convert this equation?',
|
||||
textApplyAll: 'Apply to all equations',
|
||||
textLearnMore: 'Learn More'
|
||||
textLearnMore: 'Learn More',
|
||||
textReconnect: 'Connection is restored'
|
||||
}
|
||||
})(), PE.Controllers.Main || {}))
|
||||
});
|
||||
|
|
|
@ -202,13 +202,14 @@ define([
|
|||
this.statusbar.reloadLanguages(langs);
|
||||
},
|
||||
|
||||
setStatusCaption: function(text, force, delay) {
|
||||
setStatusCaption: function(text, force, delay, callback) {
|
||||
if (this.timerCaption && ( ((new Date()) < this.timerCaption) || text.length==0 ) && !force )
|
||||
return;
|
||||
|
||||
this.timerCaption = undefined;
|
||||
if (text.length) {
|
||||
this.statusbar.showStatusMessage(text);
|
||||
callback && callback();
|
||||
if (delay>0)
|
||||
this.timerCaption = (new Date()).getTime() + delay;
|
||||
} else
|
||||
|
@ -235,6 +236,35 @@ define([
|
|||
Common.NotificationCenter.trigger('edit:complete', this.statusbar);
|
||||
},
|
||||
|
||||
zoomText : 'Zoom {0}%'
|
||||
showDisconnectTip: function () {
|
||||
var me = this;
|
||||
if (!this.disconnectTip) {
|
||||
var target = this.statusbar.getStatusLabel();
|
||||
target = target.is(':visible') ? target.parent() : this.statusbar.isVisible() ? this.statusbar.$el : $(document.body);
|
||||
this.disconnectTip = new Common.UI.SynchronizeTip({
|
||||
target : target,
|
||||
text : this.textDisconnect,
|
||||
placement: 'top',
|
||||
position: this.statusbar.isVisible() ? undefined : {bottom: 0},
|
||||
showLink: false
|
||||
});
|
||||
this.disconnectTip.on({
|
||||
'closeclick': function() {
|
||||
me.disconnectTip.hide();
|
||||
me.disconnectTip = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
this.disconnectTip.show();
|
||||
},
|
||||
|
||||
hideDisconnectTip: function() {
|
||||
this.disconnectTip && this.disconnectTip.hide();
|
||||
this.disconnectTip = null;
|
||||
},
|
||||
|
||||
zoomText : 'Zoom {0}%',
|
||||
textDisconnect: '<b>Connection is lost</b><br>Please check connection settings.'
|
||||
|
||||
}, PE.Controllers.Statusbar || {}));
|
||||
});
|
|
@ -309,12 +309,20 @@ define([
|
|||
: this.hide();
|
||||
},
|
||||
|
||||
isVisible: function() {
|
||||
return this.$el && this.$el.is(':visible');
|
||||
},
|
||||
|
||||
getStatusLabel: function() {
|
||||
return $('.statusbar #status-label-action');
|
||||
},
|
||||
|
||||
showStatusMessage: function(message) {
|
||||
$('#status-label-action').text(message);
|
||||
this.getStatusLabel().text(message);
|
||||
},
|
||||
|
||||
clearStatusMessage: function() {
|
||||
$('#status-label-action').text('');
|
||||
this.getStatusLabel().text('');
|
||||
},
|
||||
|
||||
reloadLanguages: function(array) {
|
||||
|
|
|
@ -757,7 +757,9 @@
|
|||
"PE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact %1 sales team for personal upgrade terms.",
|
||||
"PE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
|
||||
"PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
|
||||
"PE.Controllers.Main.textReconnect": "Connection is restored",
|
||||
"PE.Controllers.Statusbar.zoomText": "Zoom {0}%",
|
||||
"PE.Controllers.Statusbar.textDisconnect": "<b>Connection is lost</b><br>Please check connection settings.",
|
||||
"PE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.<br>The text style will be displayed using one of the system fonts, the saved font will be used when it is available.<br>Do you want to continue?",
|
||||
"PE.Controllers.Toolbar.textAccent": "Accents",
|
||||
"PE.Controllers.Toolbar.textBracket": "Brackets",
|
||||
|
|
|
@ -707,11 +707,14 @@ define([
|
|||
}
|
||||
if ( id == Asc.c_oAscAsyncAction['Disconnect']) {
|
||||
this.disableEditing(false, true);
|
||||
this.getApplication().getController('Statusbar').hideDisconnectTip();
|
||||
this.getApplication().getController('Statusbar').setStatusCaption(this.textReconnect);
|
||||
}
|
||||
},
|
||||
|
||||
setLongActionView: function(action) {
|
||||
var title = '', text = '', force = false;
|
||||
var statusCallback = null; // call after showing status
|
||||
|
||||
switch (action.id) {
|
||||
case Asc.c_oAscAsyncAction.Open:
|
||||
|
@ -787,6 +790,10 @@ define([
|
|||
title = this.textDisconnect;
|
||||
text = this.textDisconnect;
|
||||
this.disableEditing(true, true);
|
||||
var me = this;
|
||||
statusCallback = function() {
|
||||
me.getApplication().getController('Statusbar').showDisconnectTip();
|
||||
};
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -806,7 +813,7 @@ define([
|
|||
this.loadMask.show();
|
||||
}
|
||||
} else {
|
||||
this.getApplication().getController('Statusbar').setStatusCaption(text, force);
|
||||
this.getApplication().getController('Statusbar').setStatusCaption(text, force, 0, statusCallback);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -3440,7 +3447,8 @@ define([
|
|||
textFormulaFilledAllRows: 'Formula filled {0} rows have data. Filling other empty rows may take a few minutes.',
|
||||
textFormulaFilledAllRowsWithEmpty: 'Formula filled first {0} rows. Filling other empty rows may take a few minutes.',
|
||||
textFormulaFilledFirstRowsOtherIsEmpty: 'Formula filled only first {0} rows by memory save reason. Other rows in this sheet don\'t have data.',
|
||||
textFormulaFilledFirstRowsOtherHaveData: 'Formula filled only first {0} rows have data by memory save reason. There are other {1} rows have data in this sheet. You can fill them manually.'
|
||||
textFormulaFilledFirstRowsOtherHaveData: 'Formula filled only first {0} rows have data by memory save reason. There are other {1} rows have data in this sheet. You can fill them manually.',
|
||||
textReconnect: 'Connection is restored'
|
||||
}
|
||||
})(), SSE.Controllers.Main || {}))
|
||||
});
|
||||
|
|
|
@ -791,13 +791,13 @@ define([
|
|||
Common.NotificationCenter.trigger('edit:complete', this.statusbar);
|
||||
},
|
||||
|
||||
setStatusCaption: function(text, force, delay) {
|
||||
setStatusCaption: function(text, force, delay, callback) {
|
||||
if (this.timerCaption && ( ((new Date()) < this.timerCaption) || text.length==0 ) && !force )
|
||||
return;
|
||||
|
||||
this.timerCaption = undefined;
|
||||
if (text.length) {
|
||||
this.statusbar.showStatusMessage(text);
|
||||
this.statusbar.showStatusMessage(text, callback);
|
||||
if (delay>0)
|
||||
this.timerCaption = (new Date()).getTime() + delay;
|
||||
} else
|
||||
|
@ -814,12 +814,40 @@ define([
|
|||
return isDragDrop;
|
||||
},
|
||||
|
||||
showDisconnectTip: function () {
|
||||
var me = this;
|
||||
if (!this.disconnectTip) {
|
||||
var target = this.statusbar.getStatusLabel();
|
||||
target = target.is(':visible') ? target.parent() : this.statusbar.isVisible() ? this.statusbar.$el : $(document.body);
|
||||
this.disconnectTip = new Common.UI.SynchronizeTip({
|
||||
target : target,
|
||||
text : this.textDisconnect,
|
||||
placement: 'top',
|
||||
position: this.statusbar.isVisible() ? undefined : {bottom: 0},
|
||||
showLink: false
|
||||
});
|
||||
this.disconnectTip.on({
|
||||
'closeclick': function() {
|
||||
me.disconnectTip.hide();
|
||||
me.disconnectTip = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
this.disconnectTip.show();
|
||||
},
|
||||
|
||||
hideDisconnectTip: function() {
|
||||
this.disconnectTip && this.disconnectTip.hide();
|
||||
this.disconnectTip = null;
|
||||
},
|
||||
|
||||
zoomText : 'Zoom {0}%',
|
||||
errorLastSheet : 'Workbook must have at least one visible worksheet.',
|
||||
errorRemoveSheet: 'Can\'t delete the worksheet.',
|
||||
warnDeleteSheet : 'The worksheet maybe has data. Proceed operation?',
|
||||
strSheet : 'Sheet',
|
||||
textSheetViewTip: 'You are in Sheet View mode. Filters and sorting are visible only to you and those who are still in this view.',
|
||||
textSheetViewTipFilters: 'You are in Sheet View mode. Filters are visible only to you and those who are still in this view.'
|
||||
textSheetViewTipFilters: 'You are in Sheet View mode. Filters are visible only to you and those who are still in this view.',
|
||||
textDisconnect: '<b>Connection is lost</b><br>Please check connection settings.'
|
||||
}, SSE.Controllers.Statusbar || {}));
|
||||
});
|
|
@ -525,6 +525,10 @@ define([
|
|||
visible ? this.show(): this.hide();
|
||||
},
|
||||
|
||||
isVisible: function() {
|
||||
return this.$el && this.$el.is(':visible');
|
||||
},
|
||||
|
||||
update: function() {
|
||||
var me = this;
|
||||
|
||||
|
@ -983,7 +987,7 @@ define([
|
|||
return _message;
|
||||
},
|
||||
|
||||
showStatusMessage: function(message) {
|
||||
showStatusMessage: function(message, callback) {
|
||||
this.statusMessage = message;
|
||||
if (!this.actionWidth) {
|
||||
this.actionWidth = message.length > 22 ? 166 : 140;
|
||||
|
@ -1002,6 +1006,7 @@ define([
|
|||
_.delay(function(){
|
||||
me.updateTabbarBorders();
|
||||
me.onTabInvisible(undefined, me.tabbar.checkInvisible(true));
|
||||
callback && callback();
|
||||
},30);
|
||||
},
|
||||
|
||||
|
@ -1010,6 +1015,10 @@ define([
|
|||
this.statusMessage = undefined;
|
||||
},
|
||||
|
||||
getStatusLabel: function() {
|
||||
return this.labelAction;
|
||||
},
|
||||
|
||||
sheetIndexText : 'Sheet {0} of {1}',
|
||||
tipZoomIn : 'Zoom In',
|
||||
tipZoomOut : 'Zoom Out',
|
||||
|
|
|
@ -1056,6 +1056,7 @@
|
|||
"SSE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact %1 sales team for personal upgrade terms.",
|
||||
"SSE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
|
||||
"SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
|
||||
"SSE.Controllers.Main.textReconnect": "Connection is restored",
|
||||
"SSE.Controllers.Print.strAllSheets": "All Sheets",
|
||||
"SSE.Controllers.Print.textFirstCol": "First column",
|
||||
"SSE.Controllers.Print.textFirstRow": "First row",
|
||||
|
@ -1075,6 +1076,7 @@
|
|||
"SSE.Controllers.Statusbar.textSheetViewTipFilters": "You are in Sheet View mode. Filters are visible only to you and those who are still in this view.",
|
||||
"SSE.Controllers.Statusbar.warnDeleteSheet": "The selected worksheets might contain data. Are you sure you want to proceed?",
|
||||
"SSE.Controllers.Statusbar.zoomText": "Zoom {0}%",
|
||||
"SSE.Controllers.Statusbar.textDisconnect": "<b>Connection is lost</b><br>Please check connection settings.",
|
||||
"SSE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.<br>The text style will be displayed using one of the system fonts, the saved font will be used when it is available.<br>Do you want to continue?",
|
||||
"SSE.Controllers.Toolbar.errorComboSeries": "To create a combination chart, select at least two series of data.",
|
||||
"SSE.Controllers.Toolbar.errorMaxRows": "ERROR! The maximum number of data series per chart is 255",
|
||||
|
|
Loading…
Reference in a new issue