Commit e82da5eb authored by Julia Radzhabova's avatar Julia Radzhabova

Added "token" parameter to api config.

parent fe0026bc
...@@ -336,6 +336,8 @@ ...@@ -336,6 +336,8 @@
window.alert("The \"document.key\" parameter for the config object must be string. Please correct it."); window.alert("The \"document.key\" parameter for the config object must be string. Please correct it.");
return false; return false;
} }
_config.document.token = _config.token;
} }
return true; return true;
......
...@@ -96,6 +96,7 @@ var ApplicationController = new(function(){ ...@@ -96,6 +96,7 @@ var ApplicationController = new(function(){
docInfo.put_Title(docConfig.title); docInfo.put_Title(docConfig.title);
docInfo.put_Format(docConfig.fileType); docInfo.put_Format(docConfig.fileType);
docInfo.put_VKey(docConfig.vkey); docInfo.put_VKey(docConfig.vkey);
docInfo.put_Token(docConfig.token);
if (api) { if (api) {
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions); api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
......
...@@ -285,6 +285,7 @@ define([ ...@@ -285,6 +285,7 @@ define([
docInfo.put_Options(data.doc.options); docInfo.put_Options(data.doc.options);
docInfo.put_UserInfo(_user); docInfo.put_UserInfo(_user);
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
docInfo.put_Token(data.doc.token);
// docInfo.put_Review(this.permissions.review); // docInfo.put_Review(this.permissions.review);
// docInfo.put_OfflineApp(this.editorConfig.nativeApp === true); // used in sdk for testing // docInfo.put_OfflineApp(this.editorConfig.nativeApp === true); // used in sdk for testing
} }
......
...@@ -97,6 +97,7 @@ var ApplicationController = new(function(){ ...@@ -97,6 +97,7 @@ var ApplicationController = new(function(){
docInfo.put_Title(docConfig.title); docInfo.put_Title(docConfig.title);
docInfo.put_Format(docConfig.fileType); docInfo.put_Format(docConfig.fileType);
docInfo.put_VKey(docConfig.vkey); docInfo.put_VKey(docConfig.vkey);
docInfo.put_Token(docConfig.token);
if (api) { if (api) {
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions); api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
......
...@@ -273,6 +273,7 @@ define([ ...@@ -273,6 +273,7 @@ define([
docInfo.put_Options(data.doc.options); docInfo.put_Options(data.doc.options);
docInfo.put_UserInfo(_user); docInfo.put_UserInfo(_user);
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
docInfo.put_Token(data.doc.token);
//docInfo.put_OfflineApp(this.editorConfig.nativeApp === true); //docInfo.put_OfflineApp(this.editorConfig.nativeApp === true);
} }
......
...@@ -95,6 +95,7 @@ var ApplicationController = new(function(){ ...@@ -95,6 +95,7 @@ var ApplicationController = new(function(){
docInfo.put_Title(docConfig.title); docInfo.put_Title(docConfig.title);
docInfo.put_Format(docConfig.fileType); docInfo.put_Format(docConfig.fileType);
docInfo.put_VKey(docConfig.vkey); docInfo.put_VKey(docConfig.vkey);
docInfo.put_Token(docConfig.token);
if (api) { if (api) {
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions); api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
......
...@@ -307,6 +307,7 @@ define([ ...@@ -307,6 +307,7 @@ define([
docInfo.put_Options(data.doc.options); docInfo.put_Options(data.doc.options);
docInfo.put_UserInfo(_user); docInfo.put_UserInfo(_user);
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl); docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
docInfo.put_Token(data.doc.token);
this.headerView.setDocumentCaption(data.doc.title); this.headerView.setDocumentCaption(data.doc.title);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment