Commit 458f692e authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Сделано, чтобы когда пользовател оставался 1 (во время совсместного...

Сделано, чтобы когда пользовател оставался 1 (во время совсместного редактирования) у него не рисовались знаки о том, что залочено именно им (баг 19506).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49394 954022d7-b5bf-4e40-9824-e11837661b57
parent b6255f34
......@@ -30,7 +30,7 @@
if (this._CoAuthoringApi && this._CoAuthoringApi.isRightURL()) {
var t = this;
this._CoAuthoringApi.onAuthParticipantsChanged = function (e) {t.callback_OnAuthParticipantsChanged(e);};
this._CoAuthoringApi.onParticipantsChanged = function (e) {t.callback_OnParticipantsChanged(e);};
this._CoAuthoringApi.onParticipantsChanged = function (e, Count) {t.callback_OnParticipantsChanged(e, Count);};
this._CoAuthoringApi.onMessage = function (e) {t.callback_OnMessage(e);};
this._CoAuthoringApi.onLocksAcquired = function (e) {t.callback_OnLocksAcquired(e);};
this._CoAuthoringApi.onLocksReleased = function (e, bChanges) {t.callback_OnLocksReleased(e, bChanges);};
......@@ -149,9 +149,9 @@
return this.onAuthParticipantsChanged(e);
};
CDocsCoApi.prototype.callback_OnParticipantsChanged = function (e) {
CDocsCoApi.prototype.callback_OnParticipantsChanged = function (e, Count) {
if (this.onParticipantsChanged)
return this.onParticipantsChanged (e);
return this.onParticipantsChanged (e, Count);
};
CDocsCoApi.prototype.callback_OnMessage = function (e) {
......@@ -643,7 +643,7 @@
}
else {
if (this.onParticipantsChanged)
this.onParticipantsChanged (this._participants);
this.onParticipantsChanged (this._participants, countEditUsers);
}
// Посылаем эвент о совместном редактировании
......
......@@ -3952,7 +3952,8 @@ Paragraph.prototype =
var Y_top = this.Pages[CurPage].Bounds.Top;
var Y_bottom = this.Pages[CurPage].Bounds.Bottom;
pGraphics.DrawLockParagraph(this.Lock.Get_Type(), X_min, Y_top, Y_bottom);
if ( true === editor.isCoMarksDraw || locktype_Mine != this.Lock.Get_Type() )
pGraphics.DrawLockParagraph(this.Lock.Get_Type(), X_min, Y_top, Y_bottom);
}
}
},
......
......@@ -534,6 +534,7 @@ function asc_docs_api(name)
this.User = undefined;
this.CoAuthoringApi = new CDocsCoApi();
this.isCoAuthoringEnable = true;
this.isCoMarksDraw = false;
// Spell Checking
this.SpellCheckApi = new CSpellCheckApi();
......@@ -1299,8 +1300,19 @@ asc_docs_api.prototype._coAuthoringInit = function()
}
var t = this;
this.CoAuthoringApi.onParticipantsChanged = function (e) { t.asc_fireCallback( "asc_onParticipantsChanged", e ); };
this.CoAuthoringApi.onAuthParticipantsChanged = function (e) { t.asc_fireCallback( "asc_onAuthParticipantsChanged", e ); };
this.CoAuthoringApi.onParticipantsChanged = function (e, CountEditUsers)
{
t.asc_fireCallback( "asc_onParticipantsChanged", e );
if ( 1 >= CountEditUsers )
editor.asc_setDrawCollaborationMarks(false);
else
editor.asc_setDrawCollaborationMarks(true);
};
this.CoAuthoringApi.onAuthParticipantsChanged = function (e)
{
t.asc_fireCallback( "asc_onAuthParticipantsChanged", e );
};
this.CoAuthoringApi.onMessage = function (e) { t.asc_fireCallback( "asc_onCoAuthoringChatReceiveMessage", e ); };
this.CoAuthoringApi.onConnectionStateChanged = function (e) { t.asc_fireCallback( "asc_onConnectionStateChanged", e ); };
this.CoAuthoringApi.onUserStateChanged = function (e) { t.asc_fireCallback( "asc_onUserStateChanged", e ); };
......@@ -1409,6 +1421,7 @@ asc_docs_api.prototype._coAuthoringInit = function()
this.CoAuthoringApi.onStartCoAuthoring = function (e)
{
CollaborativeEditing.Start_CollaborationEditing();
editor.asc_setDrawCollaborationMarks(true);
editor.WordControl.m_oLogicDocument.DrawingDocument.Start_CollaborationEditing();
if ( true != History.Is_Clear() )
......@@ -6945,4 +6958,14 @@ asc_docs_api.prototype.asc_getChartPreviews = function(chartType, chartSubType)
asc_docs_api.prototype.sync_closeChartEditor = function()
{
this.asc_fireCallback("asc_onCloseChartEditor");
}
\ No newline at end of file
}
asc_docs_api.prototype.asc_setDrawCollaborationMarks = function (bDraw)
{
if ( bDraw !== this.isCoMarksDraw )
{
this.isCoMarksDraw = bDraw;
this.WordControl.m_oLogicDocument.DrawingDocument.ClearCachePages();
this.WordControl.m_oLogicDocument.DrawingDocument.FirePaint();
}
}
......@@ -1010,8 +1010,8 @@ $("#td_formatmodel,#td_info, #td_redo, #td_undo, #td_orient, #td_bold, #td_itali
//editor.WordControl.m_oLogicDocument.Document_CreateFontMap();
//Menu_Hyperlink_Add();
editor.WordControl.m_oLogicDocument.Add_DropCap();
Menu_Hyperlink_Add();
//editor.WordControl.m_oLogicDocument.Add_DropCap();
//editor.WordControl.m_oLogicDocument.Search_Start(String);
break;
......@@ -1064,7 +1064,7 @@ $("#td_formatmodel,#td_info, #td_redo, #td_undo, #td_orient, #td_bold, #td_itali
if (editor.ShowParaMarks = (!editor.ShowParaMarks)) $(this).addClass("iconPressed"); else $(this).removeClass("iconPressed");
editor.WordControl.OnRePaintAttack();
break;
case "td_tl_superscript":
case"td_tl_superscript":
if ($(this).hasClass("iconPressed")){
$(this).removeClass("iconPressed");
editor.put_TextPrBaseline(0);
......
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