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
80188b47
Commit
80188b47
authored
May 10, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
before build concate files with closure sdk-all.
parent
5803f73e
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
99 additions
and
69 deletions
+99
-69
build/Gruntfile.js
build/Gruntfile.js
+67
-30
build/configs/webexcel.json
build/configs/webexcel.json
+5
-4
build/configs/webpowerpoint.json
build/configs/webpowerpoint.json
+3
-1
build/configs/webword.json
build/configs/webword.json
+5
-4
cell/api.js
cell/api.js
+0
-2
slide/api.js
slide/api.js
+0
-3
word/Editor/CollaborativeEditing.js
word/Editor/CollaborativeEditing.js
+18
-20
word/Editor/Document.js
word/Editor/Document.js
+1
-1
word/api.js
word/api.js
+0
-4
No files found.
build/Gruntfile.js
View file @
80188b47
...
...
@@ -68,56 +68,95 @@ module.exports = function(grunt) {
grunt
.
registerTask
(
'
build_all
'
,
[
'
build_webword_init
'
,
'
build_sdk
'
,
'
build_webexcel_init
'
,
'
build_sdk
'
,
'
build_webpowerpoint_init
'
,
'
build_sdk
'
]);
grunt
.
registerTask
(
'
compile_sdk_init
'
,
function
(
compilation_level
)
{
var
splitLine
=
''
;
var
tmp_sdk_path
=
'
sdk-js-tmp.js
'
;
var
sdkDstFolder
=
packageFile
[
'
compile
'
][
'
sdk
'
][
'
dst
'
];
var
sdkAllMinDst
=
sdkDstFolder
+
'
/sdk-all-min.js
'
;
var
sdkAllDst
=
sdkDstFolder
+
'
/sdk-all.js
'
;
var
concat_src
=
[
sdkAllDst
];
var
srcFiles
=
packageFile
[
'
compile
'
][
'
sdk
'
][
'
common
'
];
grunt
.
registerTask
(
'
concat_sdk_init
'
,
function
()
{
var
sdkTmp
=
'
sdk-tmp.js
'
,
sdkAllTmp
=
'
sdk-all-tmp.js
'
,
sdkAllMinTmp
=
'
sdk-all-min-tmp.js
'
;
var
srcFilesAll
=
packageFile
[
'
compile
'
][
'
sdk
'
][
'
common
'
];
var
sdkOpt
=
{
compilation_level
:
compilation_level
,
compilation_level
:
'
WHITESPACE_ONLY
'
,
warning_level
:
'
QUIET
'
,
externs
:
packageFile
[
'
compile
'
][
'
sdk
'
][
'
externs
'
]
};
if
(
formatting
)
{
sdkOpt
[
'
formatting
'
]
=
formatting
;
}
if
(
'
ADVANCED
'
===
compilation_level
)
{
splitLine
=
(
'
PRETTY_PRINT
'
===
formatting
)
?
'
window.split = "split";
'
:
'
window.split="split";
'
;
}
else
{
splitLine
=
(
'
PRETTY_PRINT
'
===
formatting
)
?
'
window["split"] = "split";
'
:
'
window["split"]="split";
'
;
}
if
(
grunt
.
option
(
'
mobile
'
))
{
var
excludeFiles
=
packageFile
[
'
compile
'
][
'
sdk
'
][
'
exclude_mobile
'
]
srcFiles
=
srcFiles
.
filter
(
function
(
item
)
{
srcFiles
All
=
srcFilesAll
.
filter
(
function
(
item
)
{
return
-
1
===
excludeFiles
.
indexOf
(
item
);
});
var
mobileFiles
=
packageFile
[
'
compile
'
][
'
sdk
'
][
'
mobile
'
];
if
(
mobileFiles
){
srcFiles
=
srcFiles
.
concat
(
mobileFiles
);
srcFiles
All
=
srcFilesAll
.
concat
(
mobileFiles
);
}
}
if
(
!
grunt
.
option
(
'
noprivate
'
))
{
srcFiles
=
srcFiles
.
concat
(
packageFile
[
'
compile
'
][
'
sdk
'
][
'
private
'
]);
srcFiles
All
=
srcFilesAll
.
concat
(
packageFile
[
'
compile
'
][
'
sdk
'
][
'
private
'
]);
}
if
(
grunt
.
option
(
'
desktop
'
))
{
srcFiles
=
srcFiles
.
concat
(
packageFile
[
'
compile
'
][
'
sdk
'
][
'
desktop
'
]);
srcFiles
All
=
srcFilesAll
.
concat
(
packageFile
[
'
compile
'
][
'
sdk
'
][
'
desktop
'
]);
}
if
(
grunt
.
option
(
'
builder
'
))
{
srcFiles
=
srcFiles
.
concat
(
packageFile
[
'
compile
'
][
'
sdk
'
][
'
builder
'
]);
srcFilesAll
=
srcFilesAll
.
concat
(
packageFile
[
'
compile
'
][
'
sdk
'
][
'
builder
'
]);
}
grunt
.
initConfig
({
concat
:
{
sdkmin
:
{
options
:
{
// banner: '(function(window, undefined) {',
// footer: '})(window);window["split"]="split";'
banner
:
''
,
footer
:
'
window["split"]="split";
'
},
src
:
packageFile
[
'
compile
'
][
'
sdk
'
][
'
min
'
],
dest
:
sdkAllMinTmp
},
sdk
:
{
options
:
{
banner
:
'
(function(window, undefined) {
'
,
footer
:
'
})(window);
'
},
src
:
srcFilesAll
,
dest
:
sdkAllTmp
},
all
:
{
src
:
[
sdkAllMinTmp
,
sdkAllTmp
],
dest
:
sdkTmp
}
},
clean
:
[
sdkAllMinTmp
,
sdkAllTmp
]
});
});
grunt
.
registerTask
(
'
compile_sdk_init
'
,
function
(
compilation_level
)
{
var
sdkTmp
=
'
sdk-tmp.js
'
var
splitLine
=
''
;
var
tmp_sdk_path
=
'
sdk-js-tmp.js
'
;
var
sdkDstFolder
=
packageFile
[
'
compile
'
][
'
sdk
'
][
'
dst
'
];
var
sdkAllMinDst
=
sdkDstFolder
+
'
/sdk-all-min.js
'
;
var
sdkAllDst
=
sdkDstFolder
+
'
/sdk-all.js
'
;
var
sdkOpt
=
{
compilation_level
:
compilation_level
,
warning_level
:
'
QUIET
'
,
externs
:
packageFile
[
'
compile
'
][
'
sdk
'
][
'
externs
'
]
};
if
(
formatting
)
{
sdkOpt
[
'
formatting
'
]
=
formatting
;
}
if
(
'
ADVANCED
'
===
compilation_level
)
{
splitLine
=
(
'
PRETTY_PRINT
'
===
formatting
)
?
'
window.split = "split";
'
:
'
window.split="split";
'
;
}
else
{
splitLine
=
(
'
PRETTY_PRINT
'
===
formatting
)
?
'
window["split"] = "split";
'
:
'
window["split"]="split";
'
;
}
grunt
.
initConfig
({
pkg
:
packageFile
,
'
closure-compiler
'
:
{
sdk
:
{
options
:
sdkOpt
,
dest
:
tmp_sdk_path
,
src
:
srcFiles
src
:
[
sdkTmp
]
}
},
splitfile
:
{
...
...
@@ -136,15 +175,12 @@ module.exports = function(grunt) {
dest
:
sdkAllMinDst
},
sdk
:
{
options
:
{
banner
:
'
<%= grunt.file.read("license.js") %>
'
+
'
\n
(function(window, undefined) {
'
,
footer
:
'
})(window);
'
},
src
:
concat_src
,
src
:
[
'
license.js
'
,
sdkAllDst
],
dest
:
sdkAllDst
}
},
clean
:
[
sdkTmp
,
tmp_sdk_path
],
replace
:
{
...
...
@@ -163,6 +199,7 @@ module.exports = function(grunt) {
});
});
grunt
.
registerTask
(
'
compile_sdk
'
,
[
'
compile_sdk_init:
'
+
level
,
'
closure-compiler
'
,
'
splitfile
'
,
'
concat
'
,
'
replace
'
,
'
clean
'
]);
grunt
.
registerTask
(
'
concat_sdk
'
,
[
'
concat_sdk_init
'
,
'
concat
'
,
'
clean
'
]);
grunt
.
registerTask
(
'
compile_sdk
'
,
[
'
concat_sdk
'
,
'
compile_sdk_init:
'
+
level
,
'
closure-compiler
'
,
'
splitfile
'
,
'
concat
'
,
'
replace
'
,
'
clean
'
]);
grunt
.
registerTask
(
'
default
'
,
[
'
build_webpowerpoint
'
]);
};
\ No newline at end of file
build/configs/webexcel.json
View file @
80188b47
{
"compile"
:
{
"sdk"
:
{
"
commo
n"
:
[
"
mi
n"
:
[
"../common/browser.js"
,
"../common/commonDefines.js"
,
"../common/docscoapicommon.js"
,
...
...
@@ -15,8 +15,9 @@
"../cell/model/CollaborativeEditing.js"
,
"../common/apiBase.js"
,
"../common/Private/license.js"
,
"../cell/api.js"
,
"../cell/api.js"
],
"common"
:
[
"../common/downloaderfiles.js"
,
"../common/NumFormat.js"
,
"../common/SerializeChart.js"
,
...
...
build/configs/webpowerpoint.json
View file @
80188b47
{
"compile"
:
{
"sdk"
:
{
"min"
:
[
],
"common"
:
[
"../common/browser.js"
,
"../common/commonDefines.js"
,
...
...
build/configs/webword.json
View file @
80188b47
{
"compile"
:
{
"sdk"
:
{
"
commo
n"
:
[
"
mi
n"
:
[
"../common/browser.js"
,
"../common/commonDefines.js"
,
"../common/docscoapicommon.js"
,
...
...
@@ -17,8 +17,9 @@
"../word/Editor/CollaborativeEditing.js"
,
"../common/apiBase.js"
,
"../common/Private/license.js"
,
"../word/api.js"
,
"../word/api.js"
],
"common"
:
[
"../common/downloaderfiles.js"
,
"../common/NumFormat.js"
,
"../common/SerializeChart.js"
,
...
...
cell/api.js
View file @
80188b47
...
...
@@ -3549,5 +3549,3 @@ var editor;
prot
[
'
asc_isOffline
'
]
=
prot
.
asc_isOffline
;
prot
[
'
asc_getUrlType
'
]
=
prot
.
asc_getUrlType
;
})(
window
);
// don't delete this line!!! This line used for split minimize files
window
[
'
split
'
]
=
'
split
'
;
slide/api.js
View file @
80188b47
...
...
@@ -5735,6 +5735,3 @@ CTextProp.prototype['get_VertAlign'] = CTextProp.prototype.get_VertAlign;
CTextProp
.
prototype
[
'
get_HighLight
'
]
=
CTextProp
.
prototype
.
get_HighLight
;
CParagraphAndTextProp
.
prototype
[
'
get_ParaPr
'
]
=
CParagraphAndTextProp
.
prototype
.
get_ParaPr
;
CParagraphAndTextProp
.
prototype
[
'
get_TextPr
'
]
=
CParagraphAndTextProp
.
prototype
.
get_TextPr
;
// don't delete this line!!! This line used for split minimize files
window
[
'
split
'
]
=
'
split
'
;
word/Editor/CollaborativeEditing.js
View file @
80188b47
"
use strict
"
;
// Import
var
History
=
AscCommon
.
History
;
/**
*
* @constructor
...
...
@@ -28,18 +25,18 @@ CWordCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, Addition
this
.
Refresh_DCChanges
();
// Генерируем свои изменения
var
StartPoint
=
(
null
===
History
.
SavedIndex
?
0
:
History
.
SavedIndex
+
1
);
var
StartPoint
=
(
null
===
AscCommon
.
History
.
SavedIndex
?
0
:
AscCommon
.
History
.
SavedIndex
+
1
);
var
LastPoint
=
-
1
;
if
(
this
.
m_nUseType
<=
0
)
{
// (ненужные точки предварительно удаляем)
History
.
Clear_Redo
();
LastPoint
=
History
.
Points
.
length
-
1
;
AscCommon
.
History
.
Clear_Redo
();
LastPoint
=
AscCommon
.
History
.
Points
.
length
-
1
;
}
else
{
LastPoint
=
History
.
Index
;
LastPoint
=
AscCommon
.
History
.
Index
;
}
// Просчитаем сколько изменений на сервер пересылать не надо
...
...
@@ -47,16 +44,16 @@ CWordCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, Addition
var
StartPoint2
=
Math
.
min
(
StartPoint
,
LastPoint
+
1
);
for
(
var
PointIndex
=
0
;
PointIndex
<
StartPoint2
;
PointIndex
++
)
{
var
Point
=
History
.
Points
[
PointIndex
];
var
Point
=
AscCommon
.
History
.
Points
[
PointIndex
];
SumIndex
+=
Point
.
Items
.
length
;
}
var
deleteIndex
=
(
null
===
History
.
SavedIndex
?
null
:
SumIndex
);
var
deleteIndex
=
(
null
===
AscCommon
.
History
.
SavedIndex
?
null
:
SumIndex
);
var
aChanges
=
[];
for
(
var
PointIndex
=
StartPoint
;
PointIndex
<=
LastPoint
;
PointIndex
++
)
{
var
Point
=
History
.
Points
[
PointIndex
];
History
.
Update_PointInfoItem
(
PointIndex
,
StartPoint
,
LastPoint
,
SumIndex
,
deleteIndex
);
var
Point
=
AscCommon
.
History
.
Points
[
PointIndex
];
AscCommon
.
History
.
Update_PointInfoItem
(
PointIndex
,
StartPoint
,
LastPoint
,
SumIndex
,
deleteIndex
);
for
(
var
Index
=
0
;
Index
<
Point
.
Items
.
length
;
Index
++
)
{
...
...
@@ -80,31 +77,31 @@ CWordCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, Addition
this
.
m_aNeedUnlock
.
length
=
0
;
this
.
m_aNeedUnlock2
.
length
=
0
;
var
deleteIndex
=
(
null
===
History
.
SavedIndex
?
null
:
SumIndex
);
var
deleteIndex
=
(
null
===
AscCommon
.
History
.
SavedIndex
?
null
:
SumIndex
);
if
(
0
<
aChanges
.
length
||
null
!==
deleteIndex
)
{
editor
.
CoAuthoringApi
.
saveChanges
(
aChanges
,
deleteIndex
,
AdditionalInfo
);
History
.
CanNotAddChanges
=
true
;
AscCommon
.
History
.
CanNotAddChanges
=
true
;
}
else
editor
.
CoAuthoringApi
.
unLockDocument
(
true
);
if
(
-
1
===
this
.
m_nUseType
)
{
// Чистим Undo/Redo только во время совместного редактирования
History
.
Clear
();
History
.
SavedIndex
=
null
;
AscCommon
.
History
.
Clear
();
AscCommon
.
History
.
SavedIndex
=
null
;
}
else
if
(
0
===
this
.
m_nUseType
)
{
// Чистим Undo/Redo только во время совместного редактирования
History
.
Clear
();
History
.
SavedIndex
=
null
;
AscCommon
.
History
.
Clear
();
AscCommon
.
History
.
SavedIndex
=
null
;
this
.
m_nUseType
=
1
;
}
else
{
// Обновляем точку последнего сохранения в истории
History
.
Reset_SavedIndex
(
IsUserSave
);
AscCommon
.
History
.
Reset_SavedIndex
(
IsUserSave
);
}
if
(
false
!==
IsUpdateInterface
)
...
...
@@ -283,7 +280,7 @@ CWordCollaborativeEditing.prototype.OnCallback_AskLock = function(result)
// Делаем откат на 1 шаг назад и удаляем из Undo/Redo эту последнюю точку
oEditor
.
WordControl
.
m_oLogicDocument
.
Document_Undo
();
History
.
Clear_Redo
();
AscCommon
.
History
.
Clear_Redo
();
}
oEditor
.
isChartEditor
=
false
;
...
...
@@ -544,4 +541,5 @@ CWordCollaborativeEditing.prototype.Update_ForeignCursorLabelPosition = function
//--------------------------------------------------------export----------------------------------------------------
window
[
'
AscCommon
'
]
=
window
[
'
AscCommon
'
]
||
{};
window
[
'
AscCommon
'
].
CWordCollaborativeEditing
=
CWordCollaborativeEditing
;
window
[
'
AscCommon
'
].
CollaborativeEditing
=
new
CWordCollaborativeEditing
();
word/Editor/Document.js
View file @
80188b47
...
...
@@ -1252,7 +1252,7 @@ function CDocument(DrawingDocument, isMainLogicDocument)
this
.
History
=
History
;
this
.
IdCounter
=
AscCommon
.
g_oIdCounter
;
this
.
TableId
=
g_oTableId
;
this
.
CollaborativeEditing
=
((
"
undefined
"
!==
typeof
(
CWordCollaborativeEditing
)
&&
AscCommon
.
CollaborativeEditing
instanceof
CWordCollaborativeEditing
)
?
AscCommon
.
CollaborativeEditing
:
null
);
this
.
CollaborativeEditing
=
((
"
undefined
"
!==
typeof
(
AscCommon
.
CWordCollaborativeEditing
)
&&
AscCommon
.
CollaborativeEditing
instanceof
AscCommon
.
CWordCollaborativeEditing
)
?
AscCommon
.
CollaborativeEditing
:
null
);
this
.
Api
=
editor
;
//------------------------------------------------------------------------------------------------------------------
// Выставляем ссылки на главный класс
...
...
word/api.js
View file @
80188b47
...
...
@@ -7864,8 +7864,4 @@ asc_CCommentDataWord.prototype['asc_putSolved'] = asc_CCommentDataWord.prototype
asc_CCommentDataWord
.
prototype
[
'
asc_getReply
'
]
=
asc_CCommentDataWord
.
prototype
.
asc_getReply
;
asc_CCommentDataWord
.
prototype
[
'
asc_addReply
'
]
=
asc_CCommentDataWord
.
prototype
.
asc_addReply
;
asc_CCommentDataWord
.
prototype
[
'
asc_getRepliesCount
'
]
=
asc_CCommentDataWord
.
prototype
.
asc_getRepliesCount
;
})(
window
,
window
.
document
);
// don't delete this line!!! This line used for split minimize files
window
[
'
split
'
]
=
'
split
'
;
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