diff --git a/apps/presentationeditor/mobile/app-dev.js b/apps/presentationeditor/mobile/app-dev.js index 4870f02af..5229e143b 100644 --- a/apps/presentationeditor/mobile/app-dev.js +++ b/apps/presentationeditor/mobile/app-dev.js @@ -221,7 +221,11 @@ require([ ], function() { window.compareVersions = true; - app.start(); + require(['presentationeditor/mobile/app/controller/FeatureEdit'], function () { + app.start(); + }, function (error) { + app.start(); + }); }); }); }, function(err) { diff --git a/apps/presentationeditor/mobile/app.js b/apps/presentationeditor/mobile/app.js index abcec73a8..04819cdf4 100644 --- a/apps/presentationeditor/mobile/app.js +++ b/apps/presentationeditor/mobile/app.js @@ -230,7 +230,11 @@ require([ 'presentationeditor/mobile/app/controller/add/AddSlide', 'common/mobile/lib/controller/Collaboration' ], function() { - app.start(); + require(['presentationeditor/mobile/app/controller/FeatureEdit'], function () { + app.start(); + }, function (error) { + app.start(); + }); }); }); }, function(err) { diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js index af6760aec..1932c5a93 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -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.
Please contact our Sales Department to get a quote.', waitText: 'Please, wait...', errorFileSizeExceed: 'The file size exceeds the limitation set for your server.
Please contact your Document Server administrator for details.', - errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed.
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.
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 || {})) }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/app-dev.js b/apps/spreadsheeteditor/mobile/app-dev.js index b19dcb0bf..eaa939bfd 100644 --- a/apps/spreadsheeteditor/mobile/app-dev.js +++ b/apps/spreadsheeteditor/mobile/app-dev.js @@ -210,7 +210,11 @@ require([ ,'common/mobile/lib/controller/Collaboration' ], function() { window.compareVersions = true; - app.start(); + require(['spreadsheeteditor/mobile/app/controller/FeatureEdit'], function () { + app.start(); + }, function (error) { + app.start(); + }); }); }); }, function(err) { diff --git a/apps/spreadsheeteditor/mobile/app.js b/apps/spreadsheeteditor/mobile/app.js index 9536367dd..8c4412101 100644 --- a/apps/spreadsheeteditor/mobile/app.js +++ b/apps/spreadsheeteditor/mobile/app.js @@ -220,7 +220,11 @@ require([ ,'spreadsheeteditor/mobile/app/controller/FilterOptions' ,'common/mobile/lib/controller/Collaboration' ], function() { - app.start(); + require(['spreadsheeteditor/mobile/app/controller/FeatureEdit'], function () { + app.start(); + }, function (error) { + app.start(); + }); }); }); }, function(err) {