From cacb5e4d4ac71477a582eb0f086576c097941842 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 27 Oct 2017 11:52:56 +0300 Subject: [PATCH 1/3] [PE] Don't disable prev-next buttons for slide demonstration. --- apps/presentationeditor/main/app/view/DocumentPreview.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/presentationeditor/main/app/view/DocumentPreview.js b/apps/presentationeditor/main/app/view/DocumentPreview.js index c948a37bd..f91dd33de 100644 --- a/apps/presentationeditor/main/app/view/DocumentPreview.js +++ b/apps/presentationeditor/main/app/view/DocumentPreview.js @@ -344,8 +344,6 @@ define([ var count = this.api.getCountPages(); if (count !== this.pages.get('count')) this.pages.set('count', count); - this.btnPrev.setDisabled(slideNum<=0); - this.btnNext.setDisabled(slideNum>=count-1); this.txtGoToPage.setValue(slideNum + 1); this.txtGoToPage.checkValidate(); } From 0f6213f9db487377e49a58a63aeda613fc957c1d Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 30 Oct 2017 14:50:59 +0300 Subject: [PATCH 2/3] For Bug 36122. --- apps/presentationeditor/embed/js/ApplicationController.js | 5 +++-- apps/presentationeditor/main/app/controller/Main.js | 5 +++-- apps/presentationeditor/mobile/app/controller/Main.js | 5 +++-- apps/spreadsheeteditor/embed/js/ApplicationController.js | 5 +++-- apps/spreadsheeteditor/main/app/controller/Main.js | 5 +++-- apps/spreadsheeteditor/mobile/app/controller/Main.js | 5 +++-- 6 files changed, 18 insertions(+), 12 deletions(-) diff --git a/apps/presentationeditor/embed/js/ApplicationController.js b/apps/presentationeditor/embed/js/ApplicationController.js index f8c11f498..bec396de7 100644 --- a/apps/presentationeditor/embed/js/ApplicationController.js +++ b/apps/presentationeditor/embed/js/ApplicationController.js @@ -91,14 +91,15 @@ var ApplicationController = new(function(){ if (docConfig) { permissions = $.extend(permissions, docConfig.permissions); - var docInfo = new Asc.asc_CDocInfo(); + var _permissions = $.extend({}, docConfig.permissions), + docInfo = new Asc.asc_CDocInfo(); docInfo.put_Id(docConfig.key); docInfo.put_Url(docConfig.url); docInfo.put_Title(docConfig.title); docInfo.put_Format(docConfig.fileType); docInfo.put_VKey(docConfig.vkey); docInfo.put_Token(docConfig.token); - docInfo.put_Permissions(permissions); + docInfo.put_Permissions(_permissions); if (api) { api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index bfa635fe1..9412332c1 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -299,7 +299,8 @@ define([ if (data.doc) { this.permissions = $.extend(this.permissions, data.doc.permissions); - var _user = new Asc.asc_CUserInfo(); + var _permissions = $.extend({}, data.doc.permissions), + _user = new Asc.asc_CUserInfo(); _user.put_Id(this.appOptions.user.id); _user.put_FullName(this.appOptions.user.fullname); @@ -313,7 +314,7 @@ define([ docInfo.put_UserInfo(_user); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_Token(data.doc.token); - docInfo.put_Permissions(this.permissions); + docInfo.put_Permissions(_permissions); //docInfo.put_OfflineApp(this.editorConfig.nativeApp === true); } diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js index e2e9d6ced..121372001 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -217,7 +217,8 @@ define([ if (data.doc) { this.permissions = $.extend(this.permissions, data.doc.permissions); - var _user = new Asc.asc_CUserInfo(); + var _permissions = $.extend({}, data.doc.permissions), + _user = new Asc.asc_CUserInfo(); _user.put_Id(this.appOptions.user.id); _user.put_FullName(this.appOptions.user.fullname); @@ -231,7 +232,7 @@ define([ docInfo.put_UserInfo(_user); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_Token(data.doc.token); - docInfo.put_Permissions(this.permissions); + docInfo.put_Permissions(_permissions); } this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this)); diff --git a/apps/spreadsheeteditor/embed/js/ApplicationController.js b/apps/spreadsheeteditor/embed/js/ApplicationController.js index 111997a78..2fb85a683 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -89,14 +89,15 @@ var ApplicationController = new(function(){ if (docConfig) { permissions = $.extend(permissions, docConfig.permissions); - var docInfo = new Asc.asc_CDocInfo(); + var _permissions = $.extend({}, docConfig.permissions), + docInfo = new Asc.asc_CDocInfo(); docInfo.put_Id(docConfig.key); docInfo.put_Url(docConfig.url); docInfo.put_Title(docConfig.title); docInfo.put_Format(docConfig.fileType); docInfo.put_VKey(docConfig.vkey); docInfo.put_Token(docConfig.token); - docInfo.put_Permissions(permissions); + docInfo.put_Permissions(_permissions); if (api) { api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 7a8e1aa01..9bf081dbd 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -334,7 +334,8 @@ define([ if (data.doc) { this.permissions = _.extend(this.permissions, data.doc.permissions); - var _user = new Asc.asc_CUserInfo(); + var _permissions = $.extend({}, data.doc.permissions), + _user = new Asc.asc_CUserInfo(); _user.put_Id(this.appOptions.user.id); _user.put_FullName(this.appOptions.user.fullname); @@ -348,7 +349,7 @@ define([ docInfo.put_UserInfo(_user); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_Token(data.doc.token); - docInfo.put_Permissions(this.permissions); + docInfo.put_Permissions(_permissions); this.headerView.setDocumentCaption(data.doc.title); } diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js index 078c1ef74..aeeae8a11 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -220,7 +220,8 @@ define([ if ( data.doc ) { this.permissions = $.extend(this.permissions, data.doc.permissions); - var _user = new Asc.asc_CUserInfo(); + var _permissions = $.extend({}, data.doc.permissions), + _user = new Asc.asc_CUserInfo(); _user.put_Id(this.appOptions.user.id); _user.put_FullName(this.appOptions.user.fullname); @@ -234,7 +235,7 @@ define([ docInfo.put_UserInfo(_user); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_Token(data.doc.token); - docInfo.put_Permissions(this.permissions); + docInfo.put_Permissions(_permissions); } this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this)); From c8879d7c077142a2842b8f1b4455a9712b45d80d Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 31 Oct 2017 11:51:45 +0300 Subject: [PATCH 3/3] Comments refactoring. --- apps/common/main/lib/controller/Comments.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/common/main/lib/controller/Comments.js b/apps/common/main/lib/controller/Comments.js index bc59760eb..7fd24d159 100644 --- a/apps/common/main/lib/controller/Comments.js +++ b/apps/common/main/lib/controller/Comments.js @@ -802,6 +802,8 @@ define([ saveTxtReplyId = uids[i] + '-R'; comment = this.findComment(saveTxtId); + if (!comment) continue; + if (this.subEditStrings[saveTxtId] && !hint) { comment.set('editTextInPopover', true); text = this.subEditStrings[saveTxtId]; @@ -905,6 +907,8 @@ define([ saveTxtReplyId = uids[i] + '-R'; comment = this.findComment(saveTxtId); + if (!comment) continue; + if (this.subEditStrings[saveTxtId]) { comment.set('editTextInPopover', true); text = this.subEditStrings[saveTxtId];