Commit 552972d6 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Сделано, что даже если пользователь находится в режиме быстрого совместного...

Сделано, что даже если пользователь находится в режиме быстрого совместного редактирования, то быстрые действия нельзя делать в залоченных параграфах (баг 30962).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66356 954022d7-b5bf-4e40-9824-e11837661b57
parent 4c2193dc
......@@ -6,7 +6,7 @@
if(typeof CDocument !== "undefined")
{
CDocument.prototype.Document_Is_SelectionLocked = function(CheckType, AdditionalData)
CDocument.prototype.Document_Is_SelectionLocked = function(CheckType, AdditionalData, DontLockInFastMode)
{
if ( true === CollaborativeEditing.Get_GlobalLock() )
return true;
......@@ -117,7 +117,7 @@ if(typeof CDocument !== "undefined")
}
}
var bResult = CollaborativeEditing.OnEnd_CheckLock();
var bResult = CollaborativeEditing.OnEnd_CheckLock(DontLockInFastMode);
if ( true === bResult )
{
......
......@@ -182,7 +182,15 @@ CWordCollaborativeEditing.prototype.Check_MergeData = function()
var LogicDocument = editor.WordControl.m_oLogicDocument;
LogicDocument.Comments.Check_MergeData();
};
CWordCollaborativeEditing.prototype.OnEnd_CheckLock = function()
CWordCollaborativeEditing.prototype.OnStart_CheckLock = function()
{
this.m_aCheckLocks.length = 0;
};
CWordCollaborativeEditing.prototype.Add_CheckLock = function(oItem)
{
this.m_aCheckLocks.push(oItem);
};
CWordCollaborativeEditing.prototype.OnEnd_CheckLock = function(DontLockInFastMode)
{
var aIds = [];
......@@ -197,6 +205,9 @@ CWordCollaborativeEditing.prototype.OnEnd_CheckLock = function()
aIds.push(oItem);
}
if (true === DontLockInFastMode && true === this.Is_Fast())
return false;
if (aIds.length > 0)
{
// Отправляем запрос на сервер со списком Id
......
......@@ -9518,7 +9518,7 @@ CDocument.prototype =
if ( e.KeyCode == 8 && false === editor.isViewMode ) // BackSpace
{
if (true === CollaborativeEditing.Is_Fast() || false === this.Document_Is_SelectionLocked(changestype_Remove))
if (false === this.Document_Is_SelectionLocked(changestype_Remove, null, true))
{
this.Create_NewHistoryPoint(historydescription_Document_BackSpaceButton);
this.Remove(-1, true);
......@@ -9666,7 +9666,7 @@ CDocument.prototype =
}
else if ( e.KeyCode == 32 && false === editor.isViewMode ) // Space
{
if (true === CollaborativeEditing.Is_Fast() || false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content))
if (false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content, null, true))
{
this.Create_NewHistoryPoint(historydescription_Document_SpaceButton);
......@@ -10028,7 +10028,7 @@ CDocument.prototype =
{
if ( true != e.ShiftKey )
{
if (true === CollaborativeEditing.Is_Fast() || false === this.Document_Is_SelectionLocked(changestype_Delete))
if (false === this.Document_Is_SelectionLocked(changestype_Delete, null, true))
{
this.Create_NewHistoryPoint(historydescription_Document_DeleteButton);
this.Remove( 1, true );
......@@ -10492,7 +10492,7 @@ CDocument.prototype =
OnKeyPress : function(e)
{
if ( true === editor.isViewMode )
if (true === this.Api.isViewMode)
return false;
var Code;
......@@ -10507,7 +10507,7 @@ CDocument.prototype =
if ( Code > 0x20 )
{
if (true === CollaborativeEditing.Is_Fast() || false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content))
if (false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content, null, true))
{
this.Create_NewHistoryPoint(historydescription_Document_AddLetter);
......
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