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

При первом заходе в документ не отправлялся setIndexUser

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@61347 954022d7-b5bf-4e40-9824-e11837661b57
parent 2d225765
...@@ -272,7 +272,7 @@ ...@@ -272,7 +272,7 @@
this.saveLockCallbackErrorTimeOutId = null; this.saveLockCallbackErrorTimeOutId = null;
this.saveCallbackErrorTimeOutId = null; this.saveCallbackErrorTimeOutId = null;
this._id = ""; this._id = "";
this._indexuser = -1; this._indexuser = 0;
// Если пользователей больше 1, то совместно редактируем // Если пользователей больше 1, то совместно редактируем
this.isCoAuthoring = false; this.isCoAuthoring = false;
// Мы сами отключились от совместного редактирования // Мы сами отключились от совместного редактирования
...@@ -695,9 +695,8 @@ ...@@ -695,9 +695,8 @@
}; };
DocsCoApi.prototype._onSetIndexUser = function (data) { DocsCoApi.prototype._onSetIndexUser = function (data) {
if (data && this.onSetIndexUser) { if (this.onSetIndexUser)
this.onSetIndexUser (data); this.onSetIndexUser(data);
}
}; };
DocsCoApi.prototype._onSavePartChanges = function (data) { DocsCoApi.prototype._onSavePartChanges = function (data) {
...@@ -805,26 +804,24 @@ ...@@ -805,26 +804,24 @@
DocsCoApi.prototype._onAuth = function (data) { DocsCoApi.prototype._onAuth = function (data) {
if (true === this._isAuth) { if (true === this._isAuth) {
// Мы уже авторизовывались, это просто reconnect и нужно проверить не было ли изменений пока не было сети // Мы уже авторизовывались, это просто reconnect и нужно проверить не было ли изменений пока не было сети
if (this._checkSaveChangesInDisconnect(data["changes"] || [])) { if (this._checkSaveChangesInDisconnect(data['changes'] || [])) {
// делаем drop // делаем drop
this._onDrop(); this._onDrop();
} }
return; return;
} }
if (data["result"] === 1) { if (data['result'] === 1) {
// Выставляем флаг, что мы уже авторизовывались // Выставляем флаг, что мы уже авторизовывались
this._isAuth = true; this._isAuth = true;
//TODO: add checks //TODO: add checks
this._state = 2; // Authorized this._state = 2; // Authorized
this._id = data["sessionId"]; this._id = data['sessionId'];
this._onAuthParticipantsChanged(data["participants"]); this._onAuthParticipantsChanged(data['participants']);
if (data["indexUser"]) { if (data.hasOwnProperty('indexUser'))
this._indexuser = data["indexUser"]; this._onSetIndexUser(this._indexuser = data['indexUser']);
this._onSetIndexUser (this._indexuser);
}
this._userId = this._user.asc_getId() + this._indexuser; this._userId = this._user.asc_getId() + this._indexuser;
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
var asc_Range = asc.Range; var asc_Range = asc.Range;
var asc_ActiveRange = asc.ActiveRange; var asc_ActiveRange = asc.ActiveRange;
var asc_CMM = asc.asc_CMouseMoveData; var asc_CMM = asc.asc_CMouseMoveData;
var asc_VR = asc.VisibleRange var asc_VR = asc.VisibleRange;
var asc_CCellFlag = asc.asc_CCellFlag; var asc_CCellFlag = asc.asc_CCellFlag;
var asc_CFont = asc.asc_CFont; var asc_CFont = asc.asc_CFont;
...@@ -114,7 +114,6 @@ ...@@ -114,7 +114,6 @@
return Math.abs(num) < 10 ? 1 : 1 + calcDecades( asc_floor(num * 0.1) ); return Math.abs(num) < 10 ? 1 : 1 + calcDecades( asc_floor(num * 0.1) );
} }
function CacheElement() { function CacheElement() {
if ( !(this instanceof CacheElement) ) { if ( !(this instanceof CacheElement) ) {
return new CacheElement(); return new CacheElement();
......
...@@ -2619,21 +2619,21 @@ asc_docs_api.prototype.selectTable = function() ...@@ -2619,21 +2619,21 @@ asc_docs_api.prototype.selectTable = function()
} }
asc_docs_api.prototype.setColumnWidth = function(width){ asc_docs_api.prototype.setColumnWidth = function(width){
} };
asc_docs_api.prototype.setRowHeight = function(height){ asc_docs_api.prototype.setRowHeight = function(height){
} };
asc_docs_api.prototype.set_TblDistanceFromText = function(left,top,right,bottom){ asc_docs_api.prototype.set_TblDistanceFromText = function(left,top,right,bottom){
} };
asc_docs_api.prototype.CheckBeforeMergeCells = function() asc_docs_api.prototype.CheckBeforeMergeCells = function()
{ {
return this.WordControl.m_oLogicDocument.Table_CheckMerge(); return this.WordControl.m_oLogicDocument.Table_CheckMerge();
} };
asc_docs_api.prototype.CheckBeforeSplitCells = function() asc_docs_api.prototype.CheckBeforeSplitCells = function()
{ {
return this.WordControl.m_oLogicDocument.Table_CheckSplit(); return this.WordControl.m_oLogicDocument.Table_CheckSplit();
} };
asc_docs_api.prototype.MergeCells = function() asc_docs_api.prototype.MergeCells = function()
{ {
var doc = this.WordControl.m_oLogicDocument; var doc = this.WordControl.m_oLogicDocument;
...@@ -2642,7 +2642,7 @@ asc_docs_api.prototype.MergeCells = function() ...@@ -2642,7 +2642,7 @@ asc_docs_api.prototype.MergeCells = function()
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Table_MergeCells(); this.WordControl.m_oLogicDocument.Table_MergeCells();
} }
} };
asc_docs_api.prototype.SplitCell = function(Cols, Rows) asc_docs_api.prototype.SplitCell = function(Cols, Rows)
{ {
var doc = this.WordControl.m_oLogicDocument; var doc = this.WordControl.m_oLogicDocument;
...@@ -2651,26 +2651,26 @@ asc_docs_api.prototype.SplitCell = function(Cols, Rows) ...@@ -2651,26 +2651,26 @@ asc_docs_api.prototype.SplitCell = function(Cols, Rows)
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(); this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Table_SplitCell(Cols, Rows); this.WordControl.m_oLogicDocument.Table_SplitCell(Cols, Rows);
} }
} };
asc_docs_api.prototype.widthTable = function(width){ asc_docs_api.prototype.widthTable = function(width){
} };
asc_docs_api.prototype.put_CellsMargin = function(left,top,right,bottom){ asc_docs_api.prototype.put_CellsMargin = function(left,top,right,bottom){
} };
asc_docs_api.prototype.set_TblWrap = function(type){ asc_docs_api.prototype.set_TblWrap = function(type){
} };
asc_docs_api.prototype.set_TblIndentLeft = function(spacing){ asc_docs_api.prototype.set_TblIndentLeft = function(spacing){
} };
asc_docs_api.prototype.set_Borders = function(typeBorders,size,Color){//если size == 0 то границы нет. asc_docs_api.prototype.set_Borders = function(typeBorders,size,Color){//если size == 0 то границы нет.
} };
asc_docs_api.prototype.set_TableBackground = function(Color) asc_docs_api.prototype.set_TableBackground = function(Color)
{ {
} };
asc_docs_api.prototype.set_AlignCell = function(align){// c_oAscAlignType.RIGHT, c_oAscAlignType.LEFT, c_oAscAlignType.CENTER asc_docs_api.prototype.set_AlignCell = function(align){// c_oAscAlignType.RIGHT, c_oAscAlignType.LEFT, c_oAscAlignType.CENTER
switch(align) switch(align)
{ {
...@@ -2678,7 +2678,7 @@ asc_docs_api.prototype.set_AlignCell = function(align){// c_oAscAlignType.RIGHT, ...@@ -2678,7 +2678,7 @@ asc_docs_api.prototype.set_AlignCell = function(align){// c_oAscAlignType.RIGHT,
case c_oAscAlignType.CENTER : break; case c_oAscAlignType.CENTER : break;
case c_oAscAlignType.RIGHT : break; case c_oAscAlignType.RIGHT : break;
} }
} };
asc_docs_api.prototype.set_TblAlign = function(align){// c_oAscAlignType.RIGHT, c_oAscAlignType.LEFT, c_oAscAlignType.CENTER asc_docs_api.prototype.set_TblAlign = function(align){// c_oAscAlignType.RIGHT, c_oAscAlignType.LEFT, c_oAscAlignType.CENTER
switch(align) switch(align)
{ {
...@@ -2686,12 +2686,12 @@ asc_docs_api.prototype.set_TblAlign = function(align){// c_oAscAlignType.RIGHT, ...@@ -2686,12 +2686,12 @@ asc_docs_api.prototype.set_TblAlign = function(align){// c_oAscAlignType.RIGHT,
case c_oAscAlignType.CENTER : break; case c_oAscAlignType.CENTER : break;
case c_oAscAlignType.RIGHT : break; case c_oAscAlignType.RIGHT : break;
} }
} };
asc_docs_api.prototype.set_SpacingBetweenCells = function(isOn,spacing){// c_oAscAlignType.RIGHT, c_oAscAlignType.LEFT, c_oAscAlignType.CENTER asc_docs_api.prototype.set_SpacingBetweenCells = function(isOn,spacing){// c_oAscAlignType.RIGHT, c_oAscAlignType.LEFT, c_oAscAlignType.CENTER
if(isOn){ if(isOn){
} }
} };
/* /*
......
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