[PE mobile][SSE mobile] Disable editing
This commit is contained in:
parent
30ac0b8b9d
commit
19e4859e10
|
@ -221,7 +221,11 @@ require([
|
|||
|
||||
], function() {
|
||||
window.compareVersions = true;
|
||||
require(['presentationeditor/mobile/app/controller/FeatureEdit'], function () {
|
||||
app.start();
|
||||
}, function (error) {
|
||||
app.start();
|
||||
});
|
||||
});
|
||||
});
|
||||
}, function(err) {
|
||||
|
|
|
@ -230,7 +230,11 @@ require([
|
|||
'presentationeditor/mobile/app/controller/add/AddSlide',
|
||||
'common/mobile/lib/controller/Collaboration'
|
||||
], function() {
|
||||
require(['presentationeditor/mobile/app/controller/FeatureEdit'], function () {
|
||||
app.start();
|
||||
}, function (error) {
|
||||
app.start();
|
||||
});
|
||||
});
|
||||
});
|
||||
}, function(err) {
|
||||
|
|
|
@ -575,6 +575,23 @@ define([
|
|||
|
||||
applyLicense: function() {
|
||||
var me = this;
|
||||
if (this.editorConfig.mode !== 'view' && !this.isSupportEditFeature()) {
|
||||
var value = Common.localStorage.getItem("pe-opensource-warning");
|
||||
value = (value!==null) ? parseInt(value) : 0;
|
||||
var now = (new Date).getTime();
|
||||
if (now - value > 40) {
|
||||
// if (now - value > 86400000) {
|
||||
Common.localStorage.setItem("pe-opensource-warning", now);
|
||||
uiApp.modal({
|
||||
title: me.notcriticalErrorTitle,
|
||||
text : me.errorOpensource,
|
||||
buttons: [{text: 'OK'}]
|
||||
});
|
||||
}
|
||||
PE.getController('Toolbar').activateControls();
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._state.licenseType) {
|
||||
var license = this._state.licenseType,
|
||||
buttons = [{text: 'OK'}];
|
||||
|
@ -669,7 +686,8 @@ define([
|
|||
me.appOptions.canRequestEditRights = me.editorConfig.canRequestEditRights;
|
||||
me.appOptions.canEdit = (me.permissions.edit !== false || me.permissions.review === true) && // can edit or review
|
||||
(me.editorConfig.canRequestEditRights || me.editorConfig.mode !== 'view') && // if mode=="view" -> canRequestEditRights must be defined
|
||||
(!me.appOptions.isReviewOnly || me.appOptions.canLicense); // if isReviewOnly==true -> canLicense must be true
|
||||
(!me.appOptions.isReviewOnly || me.appOptions.canLicense) && // if isReviewOnly==true -> canLicense must be true
|
||||
me.isSupportEditFeature();
|
||||
me.appOptions.isEdit = me.appOptions.canLicense && me.appOptions.canEdit && me.editorConfig.mode !== 'view';
|
||||
me.appOptions.canReview = me.appOptions.canLicense && me.appOptions.isEdit && (me.permissions.review===true);
|
||||
me.appOptions.canUseHistory = me.appOptions.canLicense && !me.appOptions.isLightVersion && me.editorConfig.canUseHistory && me.appOptions.canCoAuthoring && !me.appOptions.isDesktopApp;
|
||||
|
@ -1249,6 +1267,10 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
isSupportEditFeature: function() {
|
||||
return false;
|
||||
},
|
||||
|
||||
// Translation
|
||||
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.',
|
||||
criticalErrorTitle: 'Error',
|
||||
|
@ -1412,7 +1434,8 @@ define([
|
|||
textCustomLoader: 'Please note that according to the terms of the license you are not entitled to change the loader.<br>Please contact our Sales Department to get a quote.',
|
||||
waitText: 'Please, wait...',
|
||||
errorFileSizeExceed: 'The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.',
|
||||
errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed.<br>Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.'
|
||||
errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed.<br>Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.',
|
||||
errorOpensource: 'Files can be opened for viewing only. Mobile web editors are not available in the Open Source version.'
|
||||
}
|
||||
})(), PE.Controllers.Main || {}))
|
||||
});
|
|
@ -210,7 +210,11 @@ require([
|
|||
,'common/mobile/lib/controller/Collaboration'
|
||||
], function() {
|
||||
window.compareVersions = true;
|
||||
require(['spreadsheeteditor/mobile/app/controller/FeatureEdit'], function () {
|
||||
app.start();
|
||||
}, function (error) {
|
||||
app.start();
|
||||
});
|
||||
});
|
||||
});
|
||||
}, function(err) {
|
||||
|
|
|
@ -220,7 +220,11 @@ require([
|
|||
,'spreadsheeteditor/mobile/app/controller/FilterOptions'
|
||||
,'common/mobile/lib/controller/Collaboration'
|
||||
], function() {
|
||||
require(['spreadsheeteditor/mobile/app/controller/FeatureEdit'], function () {
|
||||
app.start();
|
||||
}, function (error) {
|
||||
app.start();
|
||||
});
|
||||
});
|
||||
});
|
||||
}, function(err) {
|
||||
|
|
Loading…
Reference in a new issue