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
97f56e75
Commit
97f56e75
authored
Aug 21, 2017
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix load externs
parent
c33278c7
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
28 deletions
+25
-28
cell/api.js
cell/api.js
+2
-2
cell/model/Serialize.js
cell/model/Serialize.js
+1
-1
common/docscoapi.js
common/docscoapi.js
+1
-5
common/editorscommon.js
common/editorscommon.js
+20
-15
common/spellcheckapi.js
common/spellcheckapi.js
+1
-5
No files found.
cell/api.js
View file @
97f56e75
...
...
@@ -986,7 +986,7 @@ var editor;
var
doc
=
new
openXml
.
OpenXmlPackage
();
var
wbPart
=
null
;
var
wbXml
=
null
;
nextPromise
=
JSZip
.
loadAsync
(
data
).
then
(
function
(
zip
)
{
nextPromise
=
AscCommon
.
getJSZip
()
.
loadAsync
(
data
).
then
(
function
(
zip
)
{
return
doc
.
openFromZip
(
zip
);
}).
then
(
function
()
{
wbPart
=
doc
.
getPartByRelationshipType
(
openXml
.
relationshipTypes
.
workbook
);
...
...
@@ -1079,7 +1079,7 @@ var editor;
}).
then
(
resolve
,
reject
);
};
if
(
typeof
url
===
"
string
"
)
{
JSZipUtils
.
getBinaryContent
(
url
,
processData
);
AscCommon
.
getJSZipUtils
()
.
getBinaryContent
(
url
,
processData
);
}
else
{
processData
(
undefined
,
url
);
}
...
...
cell/model/Serialize.js
View file @
97f56e75
This diff is collapsed.
Click to expand it.
common/docscoapi.js
View file @
97f56e75
...
...
@@ -1524,7 +1524,7 @@
}
else
{
//ограничиваем transports WebSocket и XHR / JSONP polling, как и engine.io https://github.com/socketio/engine.io
//при переборе streaming transports у клиента с wirewall происходило зацикливание(не повторялось в версии sock.js 0.3.4)
sockjs
=
this
.
sockjs
=
new
(
this
.
_
getSockJs
())(
this
.
sockjs_url
,
null
,
{
'
transports
'
:
[
'
websocket
'
,
'
xdr-polling
'
,
'
xhr-polling
'
,
'
iframe-xhr-polling
'
,
'
jsonp-polling
'
]});
sockjs
=
this
.
sockjs
=
new
(
AscCommon
.
getSockJs
())(
this
.
sockjs_url
,
null
,
{
'
transports
'
:
[
'
websocket
'
,
'
xdr-polling
'
,
'
xhr-polling
'
,
'
iframe-xhr-polling
'
,
'
jsonp-polling
'
]});
}
sockjs
.
onopen
=
function
()
{
...
...
@@ -1651,10 +1651,6 @@
};
DocsCoApi
.
prototype
.
_getSockJs
=
function
()
{
return
window
[
'
SockJS
'
]
?
window
[
'
SockJS
'
]
:
require
(
'
sockjs
'
);
};
DocsCoApi
.
prototype
.
_getDisconnectErrorCode
=
function
(
opt_closeCode
)
{
if
(
c_oCloseCode
.
serverShutdown
===
opt_closeCode
)
{
return
Asc
.
c_oAscError
.
ID
.
CoAuthoringDisconnect
;
...
...
common/editorscommon.js
View file @
97f56e75
...
...
@@ -132,20 +132,9 @@
return
false
;
};
if
(
typeof
require
===
'
function
'
)
if
(
typeof
require
===
'
function
'
&&
!
window
[
'
XRegExp
'
]
)
{
if
(
!
window
[
'
XRegExp
'
])
{
window
[
'
XRegExp
'
]
=
require
(
'
xregexp
'
);
}
if
(
!
window
[
'
JSZipUtils
'
])
{
window
[
'
JSZipUtils
'
]
=
require
(
'
jsziputils
'
);
}
if
(
!
window
[
'
JSZip
'
])
{
window
[
'
JSZip
'
]
=
require
(
'
jszip
'
);
}
window
[
'
XRegExp
'
]
=
require
(
'
xregexp
'
);
}
var
oZipImages
=
null
;
...
...
@@ -154,6 +143,19 @@
var
sUploadServiceLocalUrlOld
=
"
../../../../uploadold
"
;
var
nMaxRequestLength
=
5242880
;
//5mb <requestLimits maxAllowedContentLength="30000000" /> default 30mb
function
getSockJs
()
{
return
window
[
'
SockJS
'
]
||
require
(
'
sockjs
'
);
}
function
getJSZipUtils
()
{
return
window
[
'
JSZipUtils
'
]
||
require
(
'
jsziputils
'
);
}
function
getJSZip
()
{
return
window
[
'
JSZip
'
]
||
require
(
'
jszip
'
);
}
function
getBaseUrl
()
{
var
indexHtml
=
window
[
"
location
"
][
"
href
"
];
...
...
@@ -438,7 +440,7 @@
if
(
changesUrl
)
{
oZipImages
=
{};
JSZipUtils
.
getBinaryContent
(
changesUrl
,
function
(
err
,
data
)
getJSZipUtils
()
.
getBinaryContent
(
changesUrl
,
function
(
err
,
data
)
{
if
(
err
)
{
...
...
@@ -449,7 +451,7 @@
}
oResult
.
changes
=
[];
JSZip
.
loadAsync
(
data
).
then
(
function
(
zipChanges
)
getJSZip
()
.
loadAsync
(
data
).
then
(
function
(
zipChanges
)
{
var
relativePaths
=
[];
var
promises
=
[];
...
...
@@ -3070,6 +3072,9 @@
//------------------------------------------------------------export---------------------------------------------------
window
[
'
AscCommon
'
]
=
window
[
'
AscCommon
'
]
||
{};
window
[
"
AscCommon
"
].
getSockJs
=
getSockJs
;
window
[
"
AscCommon
"
].
getJSZipUtils
=
getJSZipUtils
;
window
[
"
AscCommon
"
].
getJSZip
=
getJSZip
;
window
[
"
AscCommon
"
].
getBaseUrl
=
getBaseUrl
;
window
[
"
AscCommon
"
].
getEncodingParams
=
getEncodingParams
;
window
[
"
AscCommon
"
].
saveWithParts
=
saveWithParts
;
...
...
common/spellcheckapi.js
View file @
97f56e75
...
...
@@ -189,7 +189,7 @@
function
initSocksJs
(
url
,
docsCoApi
)
{
//ограничиваем transports WebSocket и XHR / JSONP polling, как и engine.io https://github.com/socketio/engine.io
//при переборе streaming transports у клиента с wirewall происходило зацикливание(не повторялось в версии sock.js 0.3.4)
var
sockjs
=
new
(
_
getSockJs
())(
url
,
null
,
var
sockjs
=
new
(
AscCommon
.
getSockJs
())(
url
,
null
,
{
'
transports
'
:
[
'
websocket
'
,
'
xdr-polling
'
,
'
xhr-polling
'
,
'
iframe-xhr-polling
'
,
'
jsonp-polling
'
]});
sockjs
.
onopen
=
function
()
{
...
...
@@ -253,10 +253,6 @@
return
sockjs
;
}
function
_getSockJs
()
{
return
window
[
'
SockJS
'
]
?
window
[
'
SockJS
'
]
:
require
(
'
sockjs
'
);
}
SpellCheckApi
.
prototype
.
init
=
function
(
docid
)
{
this
.
_docid
=
docid
;
var
re
=
/^https
?
:
\/\/
/
;
...
...
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