Commit d2036e07 authored by Alexander.Trofimov's avatar Alexander.Trofimov

common/CollaborativeEditingBase to function-closure

parent 57e67b40
......@@ -61,6 +61,7 @@
"../common/Drawings/Externals.js",
"../common/GlobalLoaders.js",
"../common/CollaborativeEditingBase.js",
"../common/scroll.js",
"../cell/view/iscroll.js",
......@@ -157,7 +158,6 @@
"../word/Math/operators.js",
"../word/Math/accent.js",
"../word/Math/borderBox.js",
"../common/CollaborativeEditingBase.js",
"../cell/model/DrawingObjects/GlobalCounters.js",
"../word/apiCommon.js",
"../cell/apiCommonExport.js",
......
......@@ -61,6 +61,7 @@
"../common/Drawings/Externals.js",
"../common/GlobalLoaders.js",
"../common/CollaborativeEditingBase.js",
"../common/scroll.js",
......@@ -73,7 +74,6 @@
"../word/Editor/Serialize2.js",
"../word/Editor/Styles.js",
"../word/Editor/Numbering.js",
"../common/CollaborativeEditingBase.js",
"../slide/Editor/CollaborativeEditing.js",
"../word/Drawing/GraphicsEvents.js",
"../word/Drawing/WorkEvents.js",
......
......@@ -64,6 +64,7 @@
"../common/Drawings/Externals.js",
"../common/GlobalLoaders.js",
"../common/CollaborativeEditingBase.js",
"../common/scroll.js",
"../common/Scrolls/iscroll.js",
......@@ -112,7 +113,6 @@
"../common/Overlay.js",
"../word/Drawing/HatchPattern.js",
"../word/Drawing/ShapeDrawer.js",
"../common/CollaborativeEditingBase.js",
"../word/Drawing/DrawingDocument.js",
"../word/Drawing/GraphicsEvents.js",
"../word/Drawing/WorkEvents.js",
......
......@@ -30,14 +30,14 @@
/**
*
* @constructor
* @extends {CCollaborativeEditingBase}
* @extends {AscCommon.CCollaborativeEditingBase}
*/
function CCollaborativeEditing()
{
CCollaborativeEditing.superclass.constructor.call(this);
}
AscCommon.extendClass(CCollaborativeEditing, CCollaborativeEditingBase);
AscCommon.extendClass(CCollaborativeEditing, AscCommon.CCollaborativeEditingBase);
CCollaborativeEditing.prototype.Have_OtherChanges = function()
{
......
......@@ -24,11 +24,7 @@
*/
"use strict";
/**
* User: Ilja.Kirillov
* Date: 25.07.12
* Time: 12:01
*/
(function(window, undefined){
// Import
var g_memory = AscFonts.g_memory;
......@@ -870,4 +866,12 @@ CDocumentPositionsManager.prototype.Remove_DocumentPosition = function(DocPos)
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);
......@@ -28,15 +28,15 @@
/**
*
* @constructor
* @extends {CCollaborativeEditingBase}
* @extends {AscCommon.CCollaborativeEditingBase}
*/
function CCollaborativeEditing()
{
CCollaborativeEditing.superclass.constructor.call(this);
this.m_oLogicDocument = null;
this.m_aDocumentPositions = new CDocumentPositionsManager();
this.m_aForeignCursorsPos = new CDocumentPositionsManager();
this.m_aDocumentPositions = new AscCommon.CDocumentPositionsManager();
this.m_aForeignCursorsPos = new AscCommon.CDocumentPositionsManager();
this.m_aForeignCursors = {};
this.PosExtChangesX = [];
this.PosExtChangesY = [];
......@@ -47,7 +47,7 @@ function CCollaborativeEditing()
this.m_aForeignCursorsToShow = {};
}
AscCommon.extendClass(CCollaborativeEditing, CCollaborativeEditingBase);
AscCommon.extendClass(CCollaborativeEditing, AscCommon.CCollaborativeEditingBase);
CCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, AdditionalInfo)
......@@ -88,7 +88,7 @@ CCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, AdditionalIn
for ( var Index = 0; Index < Point.Items.length; Index++ )
{
var Item = Point.Items[Index];
var oChanges = new CCollaborativeChanges();
var oChanges = new AscCommon.CCollaborativeChanges();
oChanges.Set_FromUndoRedo( Item.Class, Item.Data, Item.Binary );
aChanges.push( oChanges.m_pData );
}
......@@ -208,7 +208,7 @@ CCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, AdditionalIn
// editor.WordControl.m_oLogicDocument.DrawingDocument.FirePaint();
};
CCollaborativeEditingBase.prototype.Refresh_ForeignCursors = function()
AscCommon.CCollaborativeEditingBase.prototype.Refresh_ForeignCursors = function()
{
for (var UserId in this.m_aCursorsToUpdate)
{
......@@ -593,7 +593,7 @@ CCollaborativeEditing.prototype.Show_ForeignCursorLabel = function(UserId)
{
Cursor.ShowId = null;
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 Color = AscCommon.getUserColorById(UserShortId, null, true);
......
......@@ -945,7 +945,7 @@ CPresentation.prototype =
return;
}
var Changes = new CCollaborativeChanges();
var Changes = new AscCommon.CCollaborativeChanges();
var Reader = Changes.Internal_Load_Data2(CursorInfo, 0, CursorInfo.length);
var RunId = Reader.GetString2();
......
......@@ -158,7 +158,7 @@ asc_docs_api.prototype.sendEvent = function() {
// Init CoAuthoring
asc_docs_api.prototype._coAuthoringSetChange = function(change, oColor)
{
var oChange = new CCollaborativeChanges();
var oChange = new AscCommon.CCollaborativeChanges();
oChange.Set_Data( change );
oChange.Set_Color( oColor );
CollaborativeEditing.Add_Changes( oChange );
......@@ -368,7 +368,7 @@ asc_docs_api.prototype._coAuthoringInitEnd = function() {
};
this.CoAuthoringApi.onSaveChanges = function(e, userId, bFirstLoad) {
// bSendEvent = false - это означает, что мы загружаем имеющиеся изменения при открытии
var Changes = new CCollaborativeChanges();
var Changes = new AscCommon.CCollaborativeChanges();
Changes.Set_Data(e);
CollaborativeEditing.Add_Changes(Changes);
......@@ -4867,7 +4867,7 @@ window["asc_docs_api"].prototype["asc_nativeApplyChanges"] = function(changes)
var _len = changes.length;
for (var i = 0; i < _len; i++)
{
var Changes = new CCollaborativeChanges();
var Changes = new AscCommon.CCollaborativeChanges();
Changes.Set_Data( changes[i]);
CollaborativeEditing.Add_Changes( Changes );
}
......
......@@ -33,21 +33,21 @@
/**
*
* @constructor
* @extends {CCollaborativeEditingBase}
* @extends {AscCommon.CCollaborativeEditingBase}
*/
function CWordCollaborativeEditing()
{
CWordCollaborativeEditing.superclass.constructor.call(this);
this.m_oLogicDocument = null;
this.m_aDocumentPositions = new CDocumentPositionsManager();
this.m_aForeignCursorsPos = new CDocumentPositionsManager();
this.m_aDocumentPositions = new AscCommon.CDocumentPositionsManager();
this.m_aForeignCursorsPos = new AscCommon.CDocumentPositionsManager();
this.m_aForeignCursors = {};
this.m_aForeignCursorsXY = {};
this.m_aForeignCursorsToShow = {};
}
AscCommon.extendClass(CWordCollaborativeEditing, CCollaborativeEditingBase);
AscCommon.extendClass(CWordCollaborativeEditing, AscCommon.CCollaborativeEditingBase);
CWordCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, AdditionalInfo, IsUpdateInterface)
{
......@@ -88,7 +88,7 @@ CWordCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, Addition
for (var Index = 0; Index < Point.Items.length; Index++)
{
var Item = Point.Items[Index];
var oChanges = new CCollaborativeChanges();
var oChanges = new AscCommon.CCollaborativeChanges();
oChanges.Set_FromUndoRedo(Item.Class, Item.Data, Item.Binary);
aChanges.push(oChanges.m_pData);
}
......@@ -472,7 +472,7 @@ CWordCollaborativeEditing.prototype.Show_ForeignCursorLabel = function(UserId)
{
Cursor.ShowId = null;
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 Color = AscCommon.getUserColorById(UserShortId, null, true);
......
......@@ -16009,7 +16009,7 @@ CDocument.prototype.Update_ForeignCursor = function(CursorInfo, UserId, Show, Us
return;
}
var Changes = new CCollaborativeChanges();
var Changes = new AscCommon.CCollaborativeChanges();
var Reader = Changes.Internal_Load_Data2(CursorInfo, 0, CursorInfo.length);
var RunId = Reader.GetString2();
......
......@@ -823,7 +823,7 @@ asc_docs_api.prototype.get_PropertyThemeColorSchemes = function()
// Init CoAuthoring
asc_docs_api.prototype._coAuthoringSetChange = function(change, oColor)
{
var oChange = new CCollaborativeChanges();
var oChange = new AscCommon.CCollaborativeChanges();
oChange.Set_Data( change );
oChange.Set_Color( oColor );
CollaborativeEditing.Add_Changes( oChange );
......
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