[DE] show warning on locked document open
This commit is contained in:
parent
e582d74f32
commit
6892321fb5
|
@ -105,6 +105,10 @@ define([
|
|||
applyPlacement: function () {
|
||||
var showxy = this.target.offset(),
|
||||
innerHeight = Common.Utils.innerHeight();
|
||||
|
||||
if (this.placement == 'document') {
|
||||
// this.cmpEl.css('top', $('#editor_sdk').offset().top);
|
||||
} else
|
||||
if (this.placement == 'top')
|
||||
this.cmpEl.css({bottom : innerHeight - showxy.top + 'px', right: Common.Utils.innerWidth() - showxy.left - this.target.width()/2 + 'px'});
|
||||
else {// left or right
|
||||
|
|
|
@ -1,10 +1,27 @@
|
|||
.synch-tip-root {
|
||||
position: absolute;
|
||||
z-index: @zindex-navbar + 2;
|
||||
|
||||
&:not(.simple) {
|
||||
width: 300px;
|
||||
|
||||
.tip-text {
|
||||
width: 260px;
|
||||
}
|
||||
}
|
||||
|
||||
&.simple {
|
||||
max-width: 700px;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 20px);
|
||||
.tip-arrow {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.asc-synchronizetip {
|
||||
padding-right: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
&.inc-index {
|
||||
z-index: @zindex-navbar + 4;
|
||||
|
|
|
@ -1058,6 +1058,10 @@ define([
|
|||
|
||||
Common.NotificationCenter.trigger('document:ready', 'main');
|
||||
me.applyLicense();
|
||||
|
||||
if ( me.api.asc_isReadOnly() ) {
|
||||
me.warningDocumentIsLocked();
|
||||
}
|
||||
}
|
||||
}, 50);
|
||||
} else {
|
||||
|
@ -2219,6 +2223,41 @@ define([
|
|||
})
|
||||
},
|
||||
|
||||
warningDocumentIsLocked: function() {
|
||||
var me = this;
|
||||
var _disable_ui = function (disable) {
|
||||
DE.getController('RightMenu').SetDisabled(disable, false, true);
|
||||
DE.getController('Toolbar').DisableToolbar(disable, disable);
|
||||
DE.getController('Statusbar').getView('Statusbar').SetDisabled(disable);
|
||||
DE.getController('Common.Controllers.ReviewChanges').SetDisabled(disable);
|
||||
DE.getController('DocumentHolder').getView().SetDisabled(disable, true);
|
||||
DE.getController('Navigation') && DE.getController('Navigation').SetDisabled(disable);
|
||||
DE.getController('LeftMenu').setPreviewMode(disable);
|
||||
var comments = DE.getController('Common.Controllers.Comments');
|
||||
if (comments) comments.setPreviewMode(disable);
|
||||
}
|
||||
|
||||
_disable_ui(true);
|
||||
|
||||
var tip = new Common.UI.SynchronizeTip({
|
||||
extCls : 'simple',
|
||||
text : Common.Locale.get("warnFileLocked",{name:"DE.Controllers.Main"}),
|
||||
textLink : Common.Locale.get("txtContinueEditing",{name:"DE.Views.SignatureSettings"}),
|
||||
placement : 'document'
|
||||
});
|
||||
tip.on({
|
||||
'dontshowclick': function() {
|
||||
_disable_ui(false);
|
||||
me.api.asc_setIsReadOnly(false);
|
||||
this.close();
|
||||
},
|
||||
'closeclick': function() {
|
||||
this.close();
|
||||
}
|
||||
});
|
||||
tip.show();
|
||||
},
|
||||
|
||||
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.',
|
||||
criticalErrorTitle: 'Error',
|
||||
notcriticalErrorTitle: 'Warning',
|
||||
|
|
|
@ -743,6 +743,7 @@
|
|||
"DE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.",
|
||||
"DE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.",
|
||||
"DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
|
||||
"DE.Controllers.Main.warnFileLocked": "Document is in use by another application. You can continue editing and save it as a copy.",
|
||||
"DE.Controllers.Main.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?",
|
||||
"DE.Controllers.Main.textApplyAll": "Apply to all equations",
|
||||
"DE.Controllers.Main.textLearnMore": "Learn More",
|
||||
|
|
Loading…
Reference in a new issue