From cee89671b6e5a2952a4da2e7cef643e610ac9de1 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 18 Mar 2019 14:48:10 +0300 Subject: [PATCH] [all] send action data to sdk --- apps/documenteditor/main/app/controller/Main.js | 6 ++++-- apps/presentationeditor/main/app/controller/Main.js | 6 ++++-- apps/spreadsheeteditor/main/app/controller/Main.js | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 75f9b64fb..0c1043fd5 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -357,7 +357,9 @@ define([ this.permissions = $.extend(this.permissions, data.doc.permissions); var _permissions = $.extend({}, data.doc.permissions), - _user = new Asc.asc_CUserInfo(); + _options = $.extend({}, data.doc.options, {actions: this.editorConfig.actionLink || {}}); + + var _user = new Asc.asc_CUserInfo(); _user.put_Id(this.appOptions.user.id); _user.put_FullName(this.appOptions.user.fullname); @@ -367,7 +369,7 @@ define([ docInfo.put_Title(data.doc.title); docInfo.put_Format(data.doc.fileType); docInfo.put_VKey(data.doc.vkey); - docInfo.put_Options(data.doc.options); + docInfo.put_Options(_options); docInfo.put_UserInfo(_user); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_Token(data.doc.token); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index ee133ee34..ffc4a2955 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -336,7 +336,9 @@ define([ this.permissions = $.extend(this.permissions, data.doc.permissions); var _permissions = $.extend({}, data.doc.permissions), - _user = new Asc.asc_CUserInfo(); + _options = $.extend({}, data.doc.options, {actions: this.editorConfig.actionLink || {}}); + + var _user = new Asc.asc_CUserInfo(); _user.put_Id(this.appOptions.user.id); _user.put_FullName(this.appOptions.user.fullname); @@ -346,7 +348,7 @@ define([ docInfo.put_Title(data.doc.title); docInfo.put_Format(data.doc.fileType); docInfo.put_VKey(data.doc.vkey); - docInfo.put_Options(data.doc.options); + docInfo.put_Options(_options); docInfo.put_UserInfo(_user); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_Token(data.doc.token); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index d40a23278..2ff2b7636 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -362,7 +362,9 @@ define([ this.permissions = _.extend(this.permissions, data.doc.permissions); var _permissions = $.extend({}, data.doc.permissions), - _user = new Asc.asc_CUserInfo(); + _options = $.extend({}, data.doc.options, {actions: this.editorConfig.actionLink || {}}); + + var _user = new Asc.asc_CUserInfo(); _user.put_Id(this.appOptions.user.id); _user.put_FullName(this.appOptions.user.fullname); @@ -372,7 +374,7 @@ define([ docInfo.put_Title(data.doc.title); docInfo.put_Format(data.doc.fileType); docInfo.put_VKey(data.doc.vkey); - docInfo.put_Options(data.doc.options); + docInfo.put_Options(_options); docInfo.put_UserInfo(_user); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_Token(data.doc.token);