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
dc87a303
Commit
dc87a303
authored
Apr 26, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common/CollaborativeEditingBase to function-closure
parent
38476e15
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
34 additions
and
30 deletions
+34
-30
build/configs/webexcel.json
build/configs/webexcel.json
+1
-1
build/configs/webpowerpoint.json
build/configs/webpowerpoint.json
+1
-1
build/configs/webword.json
build/configs/webword.json
+1
-1
cell/model/DrawingObjects/GlobalCounters.js
cell/model/DrawingObjects/GlobalCounters.js
+2
-2
common/CollaborativeEditingBase.js
common/CollaborativeEditingBase.js
+10
-6
slide/Editor/CollaborativeEditing.js
slide/Editor/CollaborativeEditing.js
+7
-7
slide/Editor/Format/Presentation.js
slide/Editor/Format/Presentation.js
+1
-1
slide/api.js
slide/api.js
+3
-3
word/Editor/CollaborativeEditing.js
word/Editor/CollaborativeEditing.js
+6
-6
word/Editor/Document.js
word/Editor/Document.js
+1
-1
word/api.js
word/api.js
+1
-1
No files found.
build/configs/webexcel.json
View file @
dc87a303
...
@@ -61,6 +61,7 @@
...
@@ -61,6 +61,7 @@
"../common/Drawings/Externals.js"
,
"../common/Drawings/Externals.js"
,
"../common/GlobalLoaders.js"
,
"../common/GlobalLoaders.js"
,
"../common/CollaborativeEditingBase.js"
,
"../common/scroll.js"
,
"../common/scroll.js"
,
"../cell/view/iscroll.js"
,
"../cell/view/iscroll.js"
,
...
@@ -157,7 +158,6 @@
...
@@ -157,7 +158,6 @@
"../word/Math/operators.js"
,
"../word/Math/operators.js"
,
"../word/Math/accent.js"
,
"../word/Math/accent.js"
,
"../word/Math/borderBox.js"
,
"../word/Math/borderBox.js"
,
"../common/CollaborativeEditingBase.js"
,
"../cell/model/DrawingObjects/GlobalCounters.js"
,
"../cell/model/DrawingObjects/GlobalCounters.js"
,
"../word/apiCommon.js"
,
"../word/apiCommon.js"
,
"../cell/apiCommonExport.js"
,
"../cell/apiCommonExport.js"
,
...
...
build/configs/webpowerpoint.json
View file @
dc87a303
...
@@ -61,6 +61,7 @@
...
@@ -61,6 +61,7 @@
"../common/Drawings/Externals.js"
,
"../common/Drawings/Externals.js"
,
"../common/GlobalLoaders.js"
,
"../common/GlobalLoaders.js"
,
"../common/CollaborativeEditingBase.js"
,
"../common/scroll.js"
,
"../common/scroll.js"
,
...
@@ -73,7 +74,6 @@
...
@@ -73,7 +74,6 @@
"../word/Editor/Serialize2.js"
,
"../word/Editor/Serialize2.js"
,
"../word/Editor/Styles.js"
,
"../word/Editor/Styles.js"
,
"../word/Editor/Numbering.js"
,
"../word/Editor/Numbering.js"
,
"../common/CollaborativeEditingBase.js"
,
"../slide/Editor/CollaborativeEditing.js"
,
"../slide/Editor/CollaborativeEditing.js"
,
"../word/Drawing/GraphicsEvents.js"
,
"../word/Drawing/GraphicsEvents.js"
,
"../word/Drawing/WorkEvents.js"
,
"../word/Drawing/WorkEvents.js"
,
...
...
build/configs/webword.json
View file @
dc87a303
...
@@ -64,6 +64,7 @@
...
@@ -64,6 +64,7 @@
"../common/Drawings/Externals.js"
,
"../common/Drawings/Externals.js"
,
"../common/GlobalLoaders.js"
,
"../common/GlobalLoaders.js"
,
"../common/CollaborativeEditingBase.js"
,
"../common/scroll.js"
,
"../common/scroll.js"
,
"../common/Scrolls/iscroll.js"
,
"../common/Scrolls/iscroll.js"
,
...
@@ -112,7 +113,6 @@
...
@@ -112,7 +113,6 @@
"../common/Overlay.js"
,
"../common/Overlay.js"
,
"../word/Drawing/HatchPattern.js"
,
"../word/Drawing/HatchPattern.js"
,
"../word/Drawing/ShapeDrawer.js"
,
"../word/Drawing/ShapeDrawer.js"
,
"../common/CollaborativeEditingBase.js"
,
"../word/Drawing/DrawingDocument.js"
,
"../word/Drawing/DrawingDocument.js"
,
"../word/Drawing/GraphicsEvents.js"
,
"../word/Drawing/GraphicsEvents.js"
,
"../word/Drawing/WorkEvents.js"
,
"../word/Drawing/WorkEvents.js"
,
...
...
cell/model/DrawingObjects/GlobalCounters.js
View file @
dc87a303
...
@@ -6,14 +6,14 @@
...
@@ -6,14 +6,14 @@
/**
/**
*
*
* @constructor
* @constructor
* @extends {CCollaborativeEditingBase}
* @extends {
AscCommon.
CCollaborativeEditingBase}
*/
*/
function
CCollaborativeEditing
()
function
CCollaborativeEditing
()
{
{
CCollaborativeEditing
.
superclass
.
constructor
.
call
(
this
);
CCollaborativeEditing
.
superclass
.
constructor
.
call
(
this
);
}
}
AscCommon
.
extendClass
(
CCollaborativeEditing
,
CCollaborativeEditingBase
);
AscCommon
.
extendClass
(
CCollaborativeEditing
,
AscCommon
.
CCollaborativeEditingBase
);
CCollaborativeEditing
.
prototype
.
Have_OtherChanges
=
function
()
CCollaborativeEditing
.
prototype
.
Have_OtherChanges
=
function
()
{
{
...
...
common/CollaborativeEditingBase.js
View file @
dc87a303
"
use strict
"
;
"
use strict
"
;
/**
(
function
(
window
,
undefined
){
* User: Ilja.Kirillov
* Date: 25.07.12
* Time: 12:01
*/
// Import
// Import
var
g_memory
=
AscFonts
.
g_memory
;
var
g_memory
=
AscFonts
.
g_memory
;
...
@@ -846,4 +842,12 @@ CDocumentPositionsManager.prototype.Remove_DocumentPosition = function(DocPos)
...
@@ -846,4 +842,12 @@ CDocumentPositionsManager.prototype.Remove_DocumentPosition = function(DocPos)
return
;
return
;
}
}
}
}
};
};
\ No newline at end of file
//--------------------------------------------------------export----------------------------------------------------
window
[
'
AscCommon
'
]
=
window
[
'
AscCommon
'
]
||
{};
window
[
'
AscCommon
'
].
FOREIGN_CURSOR_LABEL_HIDETIME
=
FOREIGN_CURSOR_LABEL_HIDETIME
;
window
[
'
AscCommon
'
].
CCollaborativeChanges
=
CCollaborativeChanges
;
window
[
'
AscCommon
'
].
CCollaborativeEditingBase
=
CCollaborativeEditingBase
;
window
[
'
AscCommon
'
].
CDocumentPositionsManager
=
CDocumentPositionsManager
;
})(
window
);
slide/Editor/CollaborativeEditing.js
View file @
dc87a303
...
@@ -4,15 +4,15 @@
...
@@ -4,15 +4,15 @@
/**
/**
*
*
* @constructor
* @constructor
* @extends {CCollaborativeEditingBase}
* @extends {
AscCommon.
CCollaborativeEditingBase}
*/
*/
function
CCollaborativeEditing
()
function
CCollaborativeEditing
()
{
{
CCollaborativeEditing
.
superclass
.
constructor
.
call
(
this
);
CCollaborativeEditing
.
superclass
.
constructor
.
call
(
this
);
this
.
m_oLogicDocument
=
null
;
this
.
m_oLogicDocument
=
null
;
this
.
m_aDocumentPositions
=
new
CDocumentPositionsManager
();
this
.
m_aDocumentPositions
=
new
AscCommon
.
CDocumentPositionsManager
();
this
.
m_aForeignCursorsPos
=
new
CDocumentPositionsManager
();
this
.
m_aForeignCursorsPos
=
new
AscCommon
.
CDocumentPositionsManager
();
this
.
m_aForeignCursors
=
{};
this
.
m_aForeignCursors
=
{};
this
.
PosExtChangesX
=
[];
this
.
PosExtChangesX
=
[];
this
.
PosExtChangesY
=
[];
this
.
PosExtChangesY
=
[];
...
@@ -23,7 +23,7 @@ function CCollaborativeEditing()
...
@@ -23,7 +23,7 @@ function CCollaborativeEditing()
this
.
m_aForeignCursorsToShow
=
{};
this
.
m_aForeignCursorsToShow
=
{};
}
}
AscCommon
.
extendClass
(
CCollaborativeEditing
,
CCollaborativeEditingBase
);
AscCommon
.
extendClass
(
CCollaborativeEditing
,
AscCommon
.
CCollaborativeEditingBase
);
CCollaborativeEditing
.
prototype
.
Send_Changes
=
function
(
IsUserSave
,
AdditionalInfo
)
CCollaborativeEditing
.
prototype
.
Send_Changes
=
function
(
IsUserSave
,
AdditionalInfo
)
...
@@ -64,7 +64,7 @@ CCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, AdditionalIn
...
@@ -64,7 +64,7 @@ CCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, AdditionalIn
for
(
var
Index
=
0
;
Index
<
Point
.
Items
.
length
;
Index
++
)
for
(
var
Index
=
0
;
Index
<
Point
.
Items
.
length
;
Index
++
)
{
{
var
Item
=
Point
.
Items
[
Index
];
var
Item
=
Point
.
Items
[
Index
];
var
oChanges
=
new
CCollaborativeChanges
();
var
oChanges
=
new
AscCommon
.
CCollaborativeChanges
();
oChanges
.
Set_FromUndoRedo
(
Item
.
Class
,
Item
.
Data
,
Item
.
Binary
);
oChanges
.
Set_FromUndoRedo
(
Item
.
Class
,
Item
.
Data
,
Item
.
Binary
);
aChanges
.
push
(
oChanges
.
m_pData
);
aChanges
.
push
(
oChanges
.
m_pData
);
}
}
...
@@ -184,7 +184,7 @@ CCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, AdditionalIn
...
@@ -184,7 +184,7 @@ CCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, AdditionalIn
// editor.WordControl.m_oLogicDocument.DrawingDocument.FirePaint();
// editor.WordControl.m_oLogicDocument.DrawingDocument.FirePaint();
};
};
CCollaborativeEditingBase
.
prototype
.
Refresh_ForeignCursors
=
function
()
AscCommon
.
CCollaborativeEditingBase
.
prototype
.
Refresh_ForeignCursors
=
function
()
{
{
for
(
var
UserId
in
this
.
m_aCursorsToUpdate
)
for
(
var
UserId
in
this
.
m_aCursorsToUpdate
)
{
{
...
@@ -569,7 +569,7 @@ CCollaborativeEditing.prototype.Show_ForeignCursorLabel = function(UserId)
...
@@ -569,7 +569,7 @@ CCollaborativeEditing.prototype.Show_ForeignCursorLabel = function(UserId)
{
{
Cursor
.
ShowId
=
null
;
Cursor
.
ShowId
=
null
;
Api
.
sync_HideForeignCursorLabel
(
UserId
);
Api
.
sync_HideForeignCursorLabel
(
UserId
);
},
FOREIGN_CURSOR_LABEL_HIDETIME
);
},
AscCommon
.
FOREIGN_CURSOR_LABEL_HIDETIME
);
var
UserShortId
=
this
.
m_aForeignCursorsId
[
UserId
]
?
this
.
m_aForeignCursorsId
[
UserId
]
:
UserId
;
var
UserShortId
=
this
.
m_aForeignCursorsId
[
UserId
]
?
this
.
m_aForeignCursorsId
[
UserId
]
:
UserId
;
var
Color
=
AscCommon
.
getUserColorById
(
UserShortId
,
null
,
true
);
var
Color
=
AscCommon
.
getUserColorById
(
UserShortId
,
null
,
true
);
...
...
slide/Editor/Format/Presentation.js
View file @
dc87a303
...
@@ -921,7 +921,7 @@ CPresentation.prototype =
...
@@ -921,7 +921,7 @@ CPresentation.prototype =
return
;
return
;
}
}
var
Changes
=
new
CCollaborativeChanges
();
var
Changes
=
new
AscCommon
.
CCollaborativeChanges
();
var
Reader
=
Changes
.
Internal_Load_Data2
(
CursorInfo
,
0
,
CursorInfo
.
length
);
var
Reader
=
Changes
.
Internal_Load_Data2
(
CursorInfo
,
0
,
CursorInfo
.
length
);
var
RunId
=
Reader
.
GetString2
();
var
RunId
=
Reader
.
GetString2
();
...
...
slide/api.js
View file @
dc87a303
...
@@ -134,7 +134,7 @@ asc_docs_api.prototype.sendEvent = function() {
...
@@ -134,7 +134,7 @@ asc_docs_api.prototype.sendEvent = function() {
// Init CoAuthoring
// Init CoAuthoring
asc_docs_api
.
prototype
.
_coAuthoringSetChange
=
function
(
change
,
oColor
)
asc_docs_api
.
prototype
.
_coAuthoringSetChange
=
function
(
change
,
oColor
)
{
{
var
oChange
=
new
CCollaborativeChanges
();
var
oChange
=
new
AscCommon
.
CCollaborativeChanges
();
oChange
.
Set_Data
(
change
);
oChange
.
Set_Data
(
change
);
oChange
.
Set_Color
(
oColor
);
oChange
.
Set_Color
(
oColor
);
CollaborativeEditing
.
Add_Changes
(
oChange
);
CollaborativeEditing
.
Add_Changes
(
oChange
);
...
@@ -344,7 +344,7 @@ asc_docs_api.prototype._coAuthoringInitEnd = function() {
...
@@ -344,7 +344,7 @@ asc_docs_api.prototype._coAuthoringInitEnd = function() {
};
};
this
.
CoAuthoringApi
.
onSaveChanges
=
function
(
e
,
userId
,
bFirstLoad
)
{
this
.
CoAuthoringApi
.
onSaveChanges
=
function
(
e
,
userId
,
bFirstLoad
)
{
// bSendEvent = false - это означает, что мы загружаем имеющиеся изменения при открытии
// bSendEvent = false - это означает, что мы загружаем имеющиеся изменения при открытии
var
Changes
=
new
CCollaborativeChanges
();
var
Changes
=
new
AscCommon
.
CCollaborativeChanges
();
Changes
.
Set_Data
(
e
);
Changes
.
Set_Data
(
e
);
CollaborativeEditing
.
Add_Changes
(
Changes
);
CollaborativeEditing
.
Add_Changes
(
Changes
);
...
@@ -4843,7 +4843,7 @@ window["asc_docs_api"].prototype["asc_nativeApplyChanges"] = function(changes)
...
@@ -4843,7 +4843,7 @@ window["asc_docs_api"].prototype["asc_nativeApplyChanges"] = function(changes)
var
_len
=
changes
.
length
;
var
_len
=
changes
.
length
;
for
(
var
i
=
0
;
i
<
_len
;
i
++
)
for
(
var
i
=
0
;
i
<
_len
;
i
++
)
{
{
var
Changes
=
new
CCollaborativeChanges
();
var
Changes
=
new
AscCommon
.
CCollaborativeChanges
();
Changes
.
Set_Data
(
changes
[
i
]);
Changes
.
Set_Data
(
changes
[
i
]);
CollaborativeEditing
.
Add_Changes
(
Changes
);
CollaborativeEditing
.
Add_Changes
(
Changes
);
}
}
...
...
word/Editor/CollaborativeEditing.js
View file @
dc87a303
...
@@ -9,21 +9,21 @@
...
@@ -9,21 +9,21 @@
/**
/**
*
*
* @constructor
* @constructor
* @extends {CCollaborativeEditingBase}
* @extends {
AscCommon.
CCollaborativeEditingBase}
*/
*/
function
CWordCollaborativeEditing
()
function
CWordCollaborativeEditing
()
{
{
CWordCollaborativeEditing
.
superclass
.
constructor
.
call
(
this
);
CWordCollaborativeEditing
.
superclass
.
constructor
.
call
(
this
);
this
.
m_oLogicDocument
=
null
;
this
.
m_oLogicDocument
=
null
;
this
.
m_aDocumentPositions
=
new
CDocumentPositionsManager
();
this
.
m_aDocumentPositions
=
new
AscCommon
.
CDocumentPositionsManager
();
this
.
m_aForeignCursorsPos
=
new
CDocumentPositionsManager
();
this
.
m_aForeignCursorsPos
=
new
AscCommon
.
CDocumentPositionsManager
();
this
.
m_aForeignCursors
=
{};
this
.
m_aForeignCursors
=
{};
this
.
m_aForeignCursorsXY
=
{};
this
.
m_aForeignCursorsXY
=
{};
this
.
m_aForeignCursorsToShow
=
{};
this
.
m_aForeignCursorsToShow
=
{};
}
}
AscCommon
.
extendClass
(
CWordCollaborativeEditing
,
CCollaborativeEditingBase
);
AscCommon
.
extendClass
(
CWordCollaborativeEditing
,
AscCommon
.
CCollaborativeEditingBase
);
CWordCollaborativeEditing
.
prototype
.
Send_Changes
=
function
(
IsUserSave
,
AdditionalInfo
,
IsUpdateInterface
)
CWordCollaborativeEditing
.
prototype
.
Send_Changes
=
function
(
IsUserSave
,
AdditionalInfo
,
IsUpdateInterface
)
{
{
...
@@ -64,7 +64,7 @@ CWordCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, Addition
...
@@ -64,7 +64,7 @@ CWordCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, Addition
for
(
var
Index
=
0
;
Index
<
Point
.
Items
.
length
;
Index
++
)
for
(
var
Index
=
0
;
Index
<
Point
.
Items
.
length
;
Index
++
)
{
{
var
Item
=
Point
.
Items
[
Index
];
var
Item
=
Point
.
Items
[
Index
];
var
oChanges
=
new
CCollaborativeChanges
();
var
oChanges
=
new
AscCommon
.
CCollaborativeChanges
();
oChanges
.
Set_FromUndoRedo
(
Item
.
Class
,
Item
.
Data
,
Item
.
Binary
);
oChanges
.
Set_FromUndoRedo
(
Item
.
Class
,
Item
.
Data
,
Item
.
Binary
);
aChanges
.
push
(
oChanges
.
m_pData
);
aChanges
.
push
(
oChanges
.
m_pData
);
}
}
...
@@ -448,7 +448,7 @@ CWordCollaborativeEditing.prototype.Show_ForeignCursorLabel = function(UserId)
...
@@ -448,7 +448,7 @@ CWordCollaborativeEditing.prototype.Show_ForeignCursorLabel = function(UserId)
{
{
Cursor
.
ShowId
=
null
;
Cursor
.
ShowId
=
null
;
Api
.
sync_HideForeignCursorLabel
(
UserId
);
Api
.
sync_HideForeignCursorLabel
(
UserId
);
},
FOREIGN_CURSOR_LABEL_HIDETIME
);
},
AscCommon
.
FOREIGN_CURSOR_LABEL_HIDETIME
);
var
UserShortId
=
this
.
m_aForeignCursorsId
[
UserId
]
?
this
.
m_aForeignCursorsId
[
UserId
]
:
UserId
;
var
UserShortId
=
this
.
m_aForeignCursorsId
[
UserId
]
?
this
.
m_aForeignCursorsId
[
UserId
]
:
UserId
;
var
Color
=
AscCommon
.
getUserColorById
(
UserShortId
,
null
,
true
);
var
Color
=
AscCommon
.
getUserColorById
(
UserShortId
,
null
,
true
);
...
...
word/Editor/Document.js
View file @
dc87a303
...
@@ -15985,7 +15985,7 @@ CDocument.prototype.Update_ForeignCursor = function(CursorInfo, UserId, Show, Us
...
@@ -15985,7 +15985,7 @@ CDocument.prototype.Update_ForeignCursor = function(CursorInfo, UserId, Show, Us
return
;
return
;
}
}
var
Changes
=
new
CCollaborativeChanges
();
var
Changes
=
new
AscCommon
.
CCollaborativeChanges
();
var
Reader
=
Changes
.
Internal_Load_Data2
(
CursorInfo
,
0
,
CursorInfo
.
length
);
var
Reader
=
Changes
.
Internal_Load_Data2
(
CursorInfo
,
0
,
CursorInfo
.
length
);
var
RunId
=
Reader
.
GetString2
();
var
RunId
=
Reader
.
GetString2
();
...
...
word/api.js
View file @
dc87a303
...
@@ -799,7 +799,7 @@ asc_docs_api.prototype.get_PropertyThemeColorSchemes = function()
...
@@ -799,7 +799,7 @@ asc_docs_api.prototype.get_PropertyThemeColorSchemes = function()
// Init CoAuthoring
// Init CoAuthoring
asc_docs_api
.
prototype
.
_coAuthoringSetChange
=
function
(
change
,
oColor
)
asc_docs_api
.
prototype
.
_coAuthoringSetChange
=
function
(
change
,
oColor
)
{
{
var
oChange
=
new
CCollaborativeChanges
();
var
oChange
=
new
AscCommon
.
CCollaborativeChanges
();
oChange
.
Set_Data
(
change
);
oChange
.
Set_Data
(
change
);
oChange
.
Set_Color
(
oColor
);
oChange
.
Set_Color
(
oColor
);
CollaborativeEditing
.
Add_Changes
(
oChange
);
CollaborativeEditing
.
Add_Changes
(
oChange
);
...
...
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