Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
e07a86fd
Commit
e07a86fd
authored
Mar 17, 2017
by
Alexey.Musinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert native
parent
fa324181
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
67 deletions
+11
-67
common/Native/native.js
common/Native/native.js
+11
-67
No files found.
common/Native/native.js
View file @
e07a86fd
...
...
@@ -44,7 +44,6 @@ window.location.pathname = "";
window
.
NATIVE_EDITOR_ENJINE
=
true
;
window
.
NATIVE_EDITOR_ENJINE_SYNC_RECALC
=
true
;
window
.
IS_NATIVE_EDITOR
=
true
;
var
document
=
{};
window
.
document
=
document
;
...
...
@@ -485,12 +484,13 @@ function NativeOpenFile()
Api
=
_api
;
}
function
NativeOpenFile2
(
_params
,
documentInfo
)
function
NativeOpenFile2
(
_params
)
{
window
[
"
CreateMainTextMeasurerWrapper
"
]();
window
.
g_file_path
=
"
native_open_file
"
;
window
.
NATIVE_DOCUMENT_TYPE
=
window
.
native
.
GetEditorType
();
var
doc_bin
=
window
.
native
.
GetFileString
(
window
.
g_file_path
);
if
(
window
.
NATIVE_DOCUMENT_TYPE
==
"
presentation
"
||
window
.
NATIVE_DOCUMENT_TYPE
==
"
document
"
)
{
_api
=
new
window
[
"
Asc
"
][
"
asc_docs_api
"
](
""
);
...
...
@@ -500,71 +500,10 @@ function NativeOpenFile2(_params, documentInfo)
_api
.
Native_Editor_Initialize_Settings
(
_params
);
}
window
.
documentInfo
=
documentInfo
;
var
userInfo
=
new
Asc
.
asc_CUserInfo
();
userInfo
.
asc_putId
(
window
.
documentInfo
[
"
docUserId
"
]);
userInfo
.
asc_putFullName
(
window
.
documentInfo
[
"
docUserName
"
]);
userInfo
.
asc_putFirstName
(
window
.
documentInfo
[
"
docUserFirstName
"
]);
userInfo
.
asc_putLastName
(
window
.
documentInfo
[
"
docUserLastName
"
]);
var
docInfo
=
new
Asc
.
asc_CDocInfo
();
docInfo
.
put_Id
(
window
.
documentInfo
[
"
docKey
"
]);
docInfo
.
put_UserInfo
(
userInfo
);
_api
.
asc_setDocInfo
(
docInfo
);
if
(
window
.
documentInfo
[
"
iscoauthoring
"
])
{
_api
.
isSpellCheckEnable
=
false
;
_api
.
asc_setAutoSaveGap
(
1
);
_api
.
_coAuthoringInit
();
_api
.
asc_SetFastCollaborative
(
true
);
_api
.
asc_registerCallback
(
"
asc_onAuthParticipantsChanged
"
,
function
(
users
)
{
var
stream
=
global_memory_stream_menu
;
stream
[
"
ClearNoAttack
"
]();
asc_WriteUsers
(
users
,
stream
);
window
[
"
native
"
][
"
OnCallMenuEvent
"
](
20101
,
stream
);
// ASC_COAUTH_EVENT_TYPE_PARTICIPANTS_CHANGED
});
_api
.
asc_registerCallback
(
"
asc_onParticipantsChanged
"
,
function
(
users
)
{
var
stream
=
global_memory_stream_menu
;
stream
[
"
ClearNoAttack
"
]();
asc_WriteUsers
(
users
,
stream
);
window
[
"
native
"
][
"
OnCallMenuEvent
"
](
20101
,
stream
);
// ASC_COAUTH_EVENT_TYPE_PARTICIPANTS_CHANGED
});
_api
.
asc_registerCallback
(
"
asc_onGetEditorPermissions
"
,
function
(
state
)
{
var
rData
=
{
"
c
"
:
"
open
"
,
"
id
"
:
window
.
documentInfo
[
"
docKey
"
],
"
userid
"
:
window
.
documentInfo
[
"
docUserId
"
],
"
format
"
:
"
docx
"
,
"
vkey
"
:
undefined
,
"
url
"
:
window
.
documentInfo
[
"
docURL
"
],
"
title
"
:
this
.
documentTitle
,
"
embeddedfonts
"
:
false
};
_api
.
CoAuthoringApi
.
auth
(
window
.
documentInfo
[
"
viewmode
"
],
rData
);
});
_api
.
asc_registerCallback
(
"
asc_onDocumentUpdateVersion
"
,
function
(
callback
)
{
var
me
=
this
;
me
.
needToUpdateVersion
=
true
;
if
(
callback
)
callback
.
call
(
me
);
});
}
else
{
var
doc_bin
=
window
.
native
.
GetFileString
(
window
.
g_file_path
);
_api
.
asc_nativeOpenFile
(
doc_bin
);
if
(
_api
.
NativeAfterLoad
)
_api
.
NativeAfterLoad
();
}
// ToDo get_PropertyThemeColorSchemes method removed, now the only Event!!!!
/*if (_api.__SendThemeColorScheme)
...
...
@@ -582,6 +521,11 @@ function NativeOpenFile2(_params, documentInfo)
}
}*/
}
else
{
_api
=
new
window
[
"
Asc
"
][
"
spreadsheet_api
"
]();
_api
.
asc_nativeOpenFile
(
doc_bin
);
}
Api
=
_api
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment