Commit 4ed32747 authored by Alexey.Musinov's avatar Alexey.Musinov

apply jwt token

parent f5b0647f
......@@ -4111,6 +4111,7 @@ function OfflineEditor () {
docInfo.put_Url(this.initSettings["docURL"]);
docInfo.put_Format("xlsx");
docInfo.put_UserInfo(userInfo);
docInfo.put_Token(this.initSettings["token"]);
_api.asc_setDocInfo(docInfo);
......@@ -4122,6 +4123,9 @@ function OfflineEditor () {
_api.asc_setAutoSaveGap(1);
_api._coAuthoringInit();
_api.asc_SetFastCollaborative(true);
window["native"]["onTokenJWT"](_api.CoAuthoringApi.get_jwt());
} else {
_api.asc_nativeOpenFile(window["native"]["GetFileString"](), undefined, true);
......@@ -7911,7 +7915,7 @@ window["Asc"]["spreadsheet_api"].prototype.openDocument = function(sData) {
if (!sdkCheck) {
console.log("OPEN FILE ONLINE");
//console.log("OPEN FILE ONLINE");
t.wb.showWorksheet(undefined, false, true);
......
......@@ -32,6 +32,8 @@
window.IS_NATIVE_EDITOR = true;
var sdkCheck = true;
window['SockJS'] = createSockJS();
Asc['asc_docs_api'].prototype.Update_ParaInd = function( Ind )
......@@ -5832,6 +5834,8 @@ function NativeOpenFile3(_params, documentInfo)
var doc_bin = window.native.GetFileString(window.g_file_path);
if (window.NATIVE_DOCUMENT_TYPE == "presentation" || window.NATIVE_DOCUMENT_TYPE == "document")
{
sdkCheck = documentInfo["sdkCheck"];
_api = new window["Asc"]["asc_docs_api"]("");
AscCommon.g_clipboardBase.Init(_api);
......@@ -5854,7 +5858,8 @@ function NativeOpenFile3(_params, documentInfo)
docInfo.put_Url(window.documentInfo["docURL"]);
docInfo.put_Format("docx");
docInfo.put_UserInfo(userInfo);
docInfo.put_Token(window.documentInfo["token"]);
_api.asc_setDocInfo(docInfo);
_api.asc_registerCallback("asc_onAdvancedOptions", function(options) {
......@@ -5878,6 +5883,8 @@ function NativeOpenFile3(_params, documentInfo)
_api.asc_setAutoSaveGap(1);
_api._coAuthoringInit();
_api.asc_SetFastCollaborative(true);
window["native"]["onTokenJWT"](_api.CoAuthoringApi.get_jwt());
_api.asc_registerCallback("asc_onAuthParticipantsChanged", function(users) {
var stream = global_memory_stream_menu;
......
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