\ No newline at end of file
diff --git a/apps/presentationeditor/mobile/app/view/Collaboration.js b/apps/presentationeditor/mobile/app/view/Collaboration.js
deleted file mode 100644
index 6b8299f82..000000000
--- a/apps/presentationeditor/mobile/app/view/Collaboration.js
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- *
- * (c) Copyright Ascensio System SIA 2010-2019
- *
- * This program is a free software product. You can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License (AGPL)
- * version 3 as published by the Free Software Foundation. In accordance with
- * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
- * that Ascensio System SIA expressly excludes the warranty of non-infringement
- * of any third-party rights.
- *
- * This program is distributed WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
- * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
- *
- * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
- * street, Riga, Latvia, EU, LV-1050.
- *
- * The interactive user interfaces in modified source and object code versions
- * of the Program must display Appropriate Legal Notices, as required under
- * Section 5 of the GNU AGPL version 3.
- *
- * Pursuant to Section 7(b) of the License you must retain the original Product
- * logo when distributing the program. Pursuant to Section 7(e) we decline to
- * grant you any rights under trademark law for use of our trademarks.
- *
- * All the Product's GUI elements, including illustrations and icon sets, as
- * well as technical writing content are licensed under the terms of the
- * Creative Commons Attribution-ShareAlike 4.0 International. See the License
- * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
- *
- */
-
-/**
- * Collaboration.js
- * Presentation Editor
- *
- * Created by Julia Svinareva on 31/5/19
- * Copyright (c) 2019 Ascensio System SIA. All rights reserved.
- *
- */
-
-define([
- 'text!presentationeditor/mobile/app/template/Collaboration.template',
- 'jquery',
- 'underscore',
- 'backbone'
-], function (settingsTemplate, $, _, Backbone) {
- 'use strict';
-
- PE.Views.Collaboration = Backbone.View.extend(_.extend((function() {
- // private
-
- return {
-
- template: _.template(settingsTemplate),
-
- events: {
- //
- },
-
- initialize: function() {
- Common.NotificationCenter.on('collaborationcontainer:show', _.bind(this.initEvents, this));
- this.on('page:show', _.bind(this.updateItemHandlers, this));
- },
-
- initEvents: function () {
- var me = this;
-
- Common.Utils.addScrollIfNeed('.view[data-page=collaboration-root-view] .pages', '.view[data-page=collaboration-root-view] .page');
- me.updateItemHandlers();
- },
-
- initControls: function() {
- //
- },
-
- // Render layout
- render: function() {
- this.layout = $('').append(this.template({
- android : Common.SharedSettings.get('android'),
- phone : Common.SharedSettings.get('phone'),
- orthography: Common.SharedSettings.get('sailfish'),
- scope : this
- }));
-
- return this;
- },
-
- updateItemHandlers: function () {
- var selectorsDynamicPage = [
- '.page[data-page=collaboration-root-view]'
- ].map(function (selector) {
- return selector + ' a.item-link[data-page]';
- }).join(', ');
-
- $(selectorsDynamicPage).single('click', _.bind(this.onItemClick, this));
- },
-
- onItemClick: function (e) {
- var $target = $(e.currentTarget),
- page = $target.data('page');
-
- if (page && page.length > 0 ) {
- this.showPage(page);
- }
- },
-
- rootLayout: function () {
- if (this.layout) {
- var $layour = this.layout.find('#collaboration-root-view'),
- isPhone = Common.SharedSettings.get('phone');
-
- return $layour.html();
- }
-
- return '';
- },
-
- showPage: function(templateId, animate) {
- var rootView = PE.getController('Collaboration').rootView();
-
- if (rootView && this.layout) {
- var $content = this.layout.find(templateId);
-
- // Android fix for navigation
- if (Framework7.prototype.device.android) {
- $content.find('.page').append($content.find('.navbar'));
- }
-
- rootView.router.load({
- content: $content.html(),
- animatePages: animate !== false
- });
-
- this.fireEvent('page:show', [this, templateId]);
- }
- },
-
-
-
- textCollaboration: 'Collaboration',
- textСomments: 'Сomments',
- textBack: 'Back',
- textEditUsers: 'Users'
-
- }
- })(), PE.Views.Collaboration || {}))
-});
\ No newline at end of file
diff --git a/apps/presentationeditor/mobile/app/view/Toolbar.js b/apps/presentationeditor/mobile/app/view/Toolbar.js
index e71a47607..6e7c74ded 100644
--- a/apps/presentationeditor/mobile/app/view/Toolbar.js
+++ b/apps/presentationeditor/mobile/app/view/Toolbar.js
@@ -162,7 +162,7 @@ define([
//Collaboration
showCollaboration: function () {
- PE.getController('Collaboration').showModal();
+ PE.getController('Common.Controllers.Collaboration').showModal();
},
textBack: 'Back'
diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json
index 43260e8f6..389a52701 100644
--- a/apps/presentationeditor/mobile/locale/en.json
+++ b/apps/presentationeditor/mobile/locale/en.json
@@ -226,7 +226,7 @@
"PE.Controllers.Toolbar.dlgLeaveTitleText": "You leave the application",
"PE.Controllers.Toolbar.leaveButtonText": "Leave this Page",
"PE.Controllers.Toolbar.stayButtonText": "Stay on this Page",
- "PE.Controllers.Collaboration.textEditUser": "Document is currently being edited by several users.",
+ "Common.Controllers.Collaboration.textEditUser": "Document is currently being edited by several users.",
"PE.Views.AddImage.textAddress": "Address",
"PE.Views.AddImage.textBack": "Back",
"PE.Views.AddImage.textFromLibrary": "Picture from Library",
@@ -477,8 +477,8 @@
"PE.Views.Settings.unknownText": "Unknown",
"PE.Views.Settings.textCollaboration": "Collaboration",
"PE.Views.Toolbar.textBack": "Back",
- "PE.Views.Collaboration.textCollaboration": "Collaboration",
- "PE.Views.Collaboration.textСomments": "Сomments",
- "PE.Views.Collaboration.textBack": "Back",
- "PE.Views.Collaboration.textEditUsers": "Users"
+ "Common.Views.Collaboration.textCollaboration": "Collaboration",
+ "Common.Views.Collaboration.textСomments": "Сomments",
+ "Common.Views.Collaboration.textBack": "Back",
+ "Common.Views.Collaboration.textEditUsers": "Users"
}
\ No newline at end of file
diff --git a/apps/spreadsheeteditor/mobile/app-dev.js b/apps/spreadsheeteditor/mobile/app-dev.js
index 0a41b8910..1a92b9ba2 100644
--- a/apps/spreadsheeteditor/mobile/app-dev.js
+++ b/apps/spreadsheeteditor/mobile/app-dev.js
@@ -134,8 +134,8 @@ require([
,'AddShape'
,'AddOther'
,'AddLink'
- ,'Collaboration'
,'FilterOptions'
+ ,'Common.Controllers.Collaboration'
]
});
@@ -207,8 +207,8 @@ require([
,'spreadsheeteditor/mobile/app/controller/add/AddShape'
,'spreadsheeteditor/mobile/app/controller/add/AddOther'
,'spreadsheeteditor/mobile/app/controller/add/AddLink'
- ,'spreadsheeteditor/mobile/app/controller/Collaboration'
,'spreadsheeteditor/mobile/app/controller/FilterOptions'
+ ,'common/mobile/lib/controller/Collaboration'
], function() {
window.compareVersions = true;
app.start();
diff --git a/apps/spreadsheeteditor/mobile/app.js b/apps/spreadsheeteditor/mobile/app.js
index 1f518f056..82d26b8e4 100644
--- a/apps/spreadsheeteditor/mobile/app.js
+++ b/apps/spreadsheeteditor/mobile/app.js
@@ -145,8 +145,8 @@ require([
,'AddShape'
,'AddOther'
,'AddLink'
- ,'Collaboration'
,'FilterOptions'
+ ,'Common.Controllers.Collaboration'
]
});
@@ -218,8 +218,8 @@ require([
,'spreadsheeteditor/mobile/app/controller/add/AddShape'
,'spreadsheeteditor/mobile/app/controller/add/AddOther'
,'spreadsheeteditor/mobile/app/controller/add/AddLink'
- ,'spreadsheeteditor/mobile/app/controller/Collaboration'
,'spreadsheeteditor/mobile/app/controller/FilterOptions'
+ ,'common/mobile/lib/controller/Collaboration'
], function() {
app.start();
});
diff --git a/apps/spreadsheeteditor/mobile/app/controller/Collaboration.js b/apps/spreadsheeteditor/mobile/app/controller/Collaboration.js
deleted file mode 100644
index 2e98a912e..000000000
--- a/apps/spreadsheeteditor/mobile/app/controller/Collaboration.js
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- *
- * (c) Copyright Ascensio System SIA 2010-2019
- *
- * This program is a free software product. You can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License (AGPL)
- * version 3 as published by the Free Software Foundation. In accordance with
- * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
- * that Ascensio System SIA expressly excludes the warranty of non-infringement
- * of any third-party rights.
- *
- * This program is distributed WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
- * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
- *
- * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
- * street, Riga, Latvia, EU, LV-1050.
- *
- * The interactive user interfaces in modified source and object code versions
- * of the Program must display Appropriate Legal Notices, as required under
- * Section 5 of the GNU AGPL version 3.
- *
- * Pursuant to Section 7(b) of the License you must retain the original Product
- * logo when distributing the program. Pursuant to Section 7(e) we decline to
- * grant you any rights under trademark law for use of our trademarks.
- *
- * All the Product's GUI elements, including illustrations and icon sets, as
- * well as technical writing content are licensed under the terms of the
- * Creative Commons Attribution-ShareAlike 4.0 International. See the License
- * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
- *
- */
-
-/**
- * Collaboration.js
- * Spreadsheet Editor
- *
- * Created by Julia Svinareva on 4/6/19
- * Copyright (c) 2019 Ascensio System SIA. All rights reserved.
- *
- */
-define([
- 'core',
- 'jquery',
- 'underscore',
- 'backbone',
- 'spreadsheeteditor/mobile/app/view/Collaboration'
-], function (core, $, _, Backbone) {
- 'use strict';
-
- SSE.Controllers.Collaboration = Backbone.Controller.extend(_.extend((function() {
- // Private
- var rootView,
- _userId,
- editUsers = [];
-
- return {
- models: [],
- collections: [],
- views: [
- 'Collaboration'
- ],
-
- initialize: function() {
- var me = this;
- me.addListeners({
- 'Collaboration': {
- 'page:show' : me.onPageShow
- }
- });
- },
-
- setApi: function(api) {
- this.api = api;
- this.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(this.onChangeEditUsers, this));
- this.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(this.onChangeEditUsers, this));
- },
-
- onLaunch: function () {
- this.createView('Collaboration').render();
- },
-
- setMode: function(mode) {
- this.appConfig = mode;
- _userId = mode.user.id;
- return this;
- },
-
-
- showModal: function() {
- var me = this,
- isAndroid = Framework7.prototype.device.android === true,
- modalView,
- mainView = SSE.getController('Editor').getView('Editor').f7View;
-
- uiApp.closeModal();
-
- if (Common.SharedSettings.get('phone')) {
- modalView = $$(uiApp.pickerModal(
- '
\ No newline at end of file
diff --git a/apps/spreadsheeteditor/mobile/app/view/Collaboration.js b/apps/spreadsheeteditor/mobile/app/view/Collaboration.js
deleted file mode 100644
index be4328c70..000000000
--- a/apps/spreadsheeteditor/mobile/app/view/Collaboration.js
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- *
- * (c) Copyright Ascensio System SIA 2010-2019
- *
- * This program is a free software product. You can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License (AGPL)
- * version 3 as published by the Free Software Foundation. In accordance with
- * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
- * that Ascensio System SIA expressly excludes the warranty of non-infringement
- * of any third-party rights.
- *
- * This program is distributed WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
- * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
- *
- * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
- * street, Riga, Latvia, EU, LV-1050.
- *
- * The interactive user interfaces in modified source and object code versions
- * of the Program must display Appropriate Legal Notices, as required under
- * Section 5 of the GNU AGPL version 3.
- *
- * Pursuant to Section 7(b) of the License you must retain the original Product
- * logo when distributing the program. Pursuant to Section 7(e) we decline to
- * grant you any rights under trademark law for use of our trademarks.
- *
- * All the Product's GUI elements, including illustrations and icon sets, as
- * well as technical writing content are licensed under the terms of the
- * Creative Commons Attribution-ShareAlike 4.0 International. See the License
- * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
- *
- */
-
-/**
- * Collaboration.js
- * Presentation Editor
- *
- * Created by Julia Svinareva on 31/5/19
- * Copyright (c) 2019 Ascensio System SIA. All rights reserved.
- *
- */
-
-define([
- 'text!spreadsheeteditor/mobile/app/template/Collaboration.template',
- 'jquery',
- 'underscore',
- 'backbone'
-], function (settingsTemplate, $, _, Backbone) {
- 'use strict';
-
- SSE.Views.Collaboration = Backbone.View.extend(_.extend((function() {
- // private
-
- return {
-
- template: _.template(settingsTemplate),
-
- events: {
- //
- },
-
- initialize: function() {
- Common.NotificationCenter.on('collaborationcontainer:show', _.bind(this.initEvents, this));
- this.on('page:show', _.bind(this.updateItemHandlers, this));
- },
-
- initEvents: function () {
- var me = this;
-
- Common.Utils.addScrollIfNeed('.view[data-page=collaboration-root-view] .pages', '.view[data-page=collaboration-root-view] .page');
- me.updateItemHandlers();
- },
-
- initControls: function() {
- //
- },
-
- // Render layout
- render: function() {
- this.layout = $('').append(this.template({
- android : Common.SharedSettings.get('android'),
- phone : Common.SharedSettings.get('phone'),
- orthography: Common.SharedSettings.get('sailfish'),
- scope : this
- }));
-
- return this;
- },
-
- updateItemHandlers: function () {
- var selectorsDynamicPage = [
- '.page[data-page=collaboration-root-view]'
- ].map(function (selector) {
- return selector + ' a.item-link[data-page]';
- }).join(', ');
-
- $(selectorsDynamicPage).single('click', _.bind(this.onItemClick, this));
- },
-
- onItemClick: function (e) {
- var $target = $(e.currentTarget),
- page = $target.data('page');
-
- if (page && page.length > 0 ) {
- this.showPage(page);
- }
- },
-
- rootLayout: function () {
- if (this.layout) {
- var $layour = this.layout.find('#collaboration-root-view'),
- isPhone = Common.SharedSettings.get('phone');
-
- return $layour.html();
- }
-
- return '';
- },
-
- showPage: function(templateId, animate) {
- var rootView = SSE.getController('Collaboration').rootView();
-
- if (rootView && this.layout) {
- var $content = this.layout.find(templateId);
-
- // Android fix for navigation
- if (Framework7.prototype.device.android) {
- $content.find('.page').append($content.find('.navbar'));
- }
-
- rootView.router.load({
- content: $content.html(),
- animatePages: animate !== false
- });
-
- this.fireEvent('page:show', [this, templateId]);
- }
- },
-
-
-
- textCollaboration: 'Collaboration',
- textСomments: 'Сomments',
- textBack: 'Back',
- textEditUsers: 'Users'
-
- }
- })(), SSE.Views.Collaboration || {}))
-});
\ No newline at end of file
diff --git a/apps/spreadsheeteditor/mobile/app/view/Toolbar.js b/apps/spreadsheeteditor/mobile/app/view/Toolbar.js
index d5bc17b8e..00bfacc15 100644
--- a/apps/spreadsheeteditor/mobile/app/view/Toolbar.js
+++ b/apps/spreadsheeteditor/mobile/app/view/Toolbar.js
@@ -158,7 +158,7 @@ define([
//Collaboration
showCollaboration: function () {
- SSE.getController('Collaboration').showModal();
+ SSE.getController('Common.Controllers.Collaboration').showModal();
},
textBack: 'Back'
diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json
index 801de3914..e897f9296 100644
--- a/apps/spreadsheeteditor/mobile/locale/en.json
+++ b/apps/spreadsheeteditor/mobile/locale/en.json
@@ -300,7 +300,7 @@
"SSE.Controllers.Toolbar.dlgLeaveTitleText": "You leave the application",
"SSE.Controllers.Toolbar.leaveButtonText": "Leave this Page",
"SSE.Controllers.Toolbar.stayButtonText": "Stay on this Page",
- "SSE.Controllers.Collaboration.textEditUser": "Document is currently being edited by several users.",
+ "Common.Controllers.Collaboration.textEditUser": "Document is currently being edited by several users.",
"SSE.Controllers.FilterOptions.textEmptyItem": "{Blanks}",
"SSE.Controllers.FilterOptions.textSelectAll": "Select All",
"SSE.Controllers.FilterOptions.textErrorTitle": "Warning",
@@ -556,10 +556,10 @@
"SSE.Views.Settings.textR1C1Style": "R1C1 Reference Style",
"SSE.Views.Settings.textRegionalSettings": "Regional Settings",
"SSE.Views.Toolbar.textBack": "Back",
- "SSE.Views.Collaboration.textCollaboration": "Collaboration",
- "SSE.Views.Collaboration.textСomments": "Сomments",
- "SSE.Views.Collaboration.textBack": "Back",
- "SSE.Views.Collaboration.textEditUsers": "Users",
+ "Common.Views.Collaboration.textCollaboration": "Collaboration",
+ "Common.Views.Collaboration.textСomments": "Сomments",
+ "Common.Views.Collaboration.textBack": "Back",
+ "Common.Views.Collaboration.textEditUsers": "Users",
"SSE.Views.FilterOptions.textFilter": "Filter Options",
"SSE.Views.FilterOptions.textClearFilter": "Clear Filter",
"SSE.Views.FilterOptions.textDeleteFilter": "Delete Filter"