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

common/CollaborativeEditingBase to function-closure

parent 38476e15
......@@ -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",
......
......@@ -6,14 +6,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()
{
......
"use strict";
/**
* User: Ilja.Kirillov
* Date: 25.07.12
* Time: 12:01
*/
(function(window, undefined){
// Import
var g_memory = AscFonts.g_memory;
......@@ -846,4 +842,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);
......@@ -4,15 +4,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 = [];
......@@ -23,7 +23,7 @@ function CCollaborativeEditing()
this.m_aForeignCursorsToShow = {};
}
AscCommon.extendClass(CCollaborativeEditing, CCollaborativeEditingBase);
AscCommon.extendClass(CCollaborativeEditing, AscCommon.CCollaborativeEditingBase);
CCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, AdditionalInfo)
......@@ -64,7 +64,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 );
}
......@@ -184,7 +184,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)
{
......@@ -569,7 +569,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);
......
......@@ -921,7 +921,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();
......
......@@ -134,7 +134,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 );
......@@ -344,7 +344,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);
......@@ -4843,7 +4843,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 );
}
......
......@@ -9,21 +9,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)
{
......@@ -64,7 +64,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);
}
......@@ -448,7 +448,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);
......
......@@ -15985,7 +15985,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();
......
......@@ -799,7 +799,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