git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49099 954022d7-b5bf-4e40-9824-e11837661b57

This commit is contained in:
Sergey.Luzyanin
2013-08-23 13:22:22 +00:00
committed by Alexander.Trofimov
parent fd8f360c46
commit e63b529052
2 changed files with 49 additions and 2 deletions

View File

@ -638,6 +638,8 @@ function CCollaborativeEditing()
if ( locktype_Other3 != CurLockType && locktype_Other != CurLockType )
{
this.m_aNeedUnlock[Index].Lock.Set_Type( locktype_None, false);
if(this.m_aNeedUnlock[Index] instanceof Slide)
editor.WordControl.m_oLogicDocument.DrawingDocument.LockSlide(this.m_aNeedUnlock[Index].num);
/*if ( this.m_aNeedUnlock[Index] instanceof CHeaderFooterController )
editor.sync_UnLockHeaderFooters();
@ -651,6 +653,8 @@ function CCollaborativeEditing()
else if ( locktype_Other3 === CurLockType )
{
this.m_aNeedUnlock[Index].Lock.Set_Type( locktype_Other, false);
if(this.m_aNeedUnlock[Index] instanceof Slide)
editor.WordControl.m_oLogicDocument.DrawingDocument.LockSlide(this.m_aNeedUnlock[Index].num);
}
}
@ -659,7 +663,34 @@ function CCollaborativeEditing()
{
var Class = this.m_aNeedUnlock2[Index];
Class.Lock.Set_Type( locktype_None, false);
editor.CoAuthoringApi.releaseLocks( Class.Get_Id() );
if(Class instanceof Slide)
editor.WordControl.m_oLogicDocument.DrawingDocument.UnLockSlide(Class.num);
var check_obj = null;
if(Class instanceof CShape
|| Class instanceof CImageShape
|| Class instanceof CGroupShape
)
{
check_obj =
{
"type": c_oAscLockTypeElemPresentation.Object,
"slideId": Class.parent.Get_Id(),
"objId": Class.Get_Id(),
"guid": Class.Get_Id()
};
}
else if(Class instanceof Slide)
{
check_obj =
{
"type": c_oAscLockTypeElemPresentation.Slide,
"val": Class.Get_Id(),
"guid": Class.Get_Id()
};
}
if(isRealObject(check_obj))
editor.CoAuthoringApi.releaseLocks( check_obj );
}
this.m_aNeedUnlock.length = 0;
@ -831,6 +862,8 @@ function CCollaborativeEditing()
if ( null != Class )
{
Class.Lock.Set_Type( locktype_Mine );
if(Class instanceof Slide)
editor.WordControl.m_oLogicDocument.DrawingDocument.UnLockSlide(Class.num);
this.Add_Unlock2( Class );
}
}
@ -881,6 +914,8 @@ function CCollaborativeEditing()
if ( null != Class )
{
Class.Lock.Set_Type( locktype_Mine );
if(Class instanceof Slide)
editor.WordControl.m_oLogicDocument.DrawingDocument.UnLockSlide(Class.num);
oThis.Add_Unlock2( Class );
}
}
@ -928,6 +963,8 @@ function CCollaborativeEditing()
{
var Lock = Class.Lock;
Lock.Set_Type( locktype_Other, false );
if(Class instanceof Slide)
editor.WordControl.m_oLogicDocument.DrawingDocument.UnLockSlide(Class.num);
Lock.Set_UserId( this.m_aNeedLock[Id] );
}
}

View File

@ -188,7 +188,8 @@ asc_docs_api.prototype._coAuthoringInit = function (docId, user) {
Lock.Set_Type( locktype_Other3, true );
else
Lock.Set_Type( locktype_Other, true );
if(Class instanceof Slide)
editor.WordControl.m_oLogicDocument.DrawingDocument.LockSlide(Class.num);
// Выставляем ID пользователя, залочившего данный элемент
Lock.Set_UserId( e["user"] );
@ -268,6 +269,15 @@ asc_docs_api.prototype._coAuthoringInit = function (docId, user) {
NewType = locktype_Other2;
Lock.Set_Type( NewType, true );
if(Class instanceof Slide )
{
if(NewType !== locktype_Mine && NewType !== locktype_None)
editor.WordControl.m_oLogicDocument.DrawingDocument.LockSlide(Class.num);
else
editor.WordControl.m_oLogicDocument.DrawingDocument.UnLockSlide(Class.num);
}
}
}
else