Commit 3c91ecba authored by Ilya.Kirillov's avatar Ilya.Kirillov

Исправлен баг с объединением точек в истории при наборе текста (перестало...

Исправлен баг с объединением точек в истории при наборе текста (перестало работать после добавления логов) (баг 30916).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66241 954022d7-b5bf-4e40-9824-e11837661b57
parent 9d8a30d4
......@@ -1583,6 +1583,7 @@ var historydescription_Document_AcceptRevisionChange = 0x0129;
var historydescription_Document_RejectRevisionChange = 0x012a;
var historydescription_Document_AcceptRevisionChangesBySelection = 0x012b;
var historydescription_Document_RejectRevisionChangesBySelection = 0x012c;
var historydescription_Document_AddLetterUnion = 0x012d;
......@@ -1895,6 +1896,7 @@ function Get_HistoryPointStringDescription(nDescription)
case historydescription_Document_RejectRevisionChange : sString = "Document_RejectRevisionChange "; break;
case historydescription_Document_AcceptRevisionChangesBySelection : sString = "Document_AcceptRevisionChangesBySelection "; break;
case historydescription_Document_RejectRevisionChangesBySelection : sString = "Document_RejectRevisionChangesBySelection "; break;
case historydescription_Document_AddLetterUnion : sString = "Document_AddLetterUnion "; break;
}
return sString;
......
......@@ -567,9 +567,17 @@ CHistory.prototype =
if ( Point1.Items.length > 63 )
return;
var StartIndex1 = 0;
var StartIndex2 = 0;
if (Point1.Items.length > 0 && Point1.Items[0].Data && historyitem_TableId_Description === Point1.Items[0].Data.Type)
StartIndex1 = 1;
if (Point2.Items.length > 0 && Point2.Items[0].Data && historyitem_TableId_Description === Point2.Items[0].Data.Type)
StartIndex2 = 1;
var PrevItem = null;
var Class = null;
for ( var Index = 0; Index < Point1.Items.length; Index++ )
for ( var Index = StartIndex1; Index < Point1.Items.length; Index++ )
{
var Item = Point1.Items[Index];
......@@ -581,7 +589,7 @@ CHistory.prototype =
PrevItem = Item;
}
for ( var Index = 0; Index < Point2.Items.length; Index++ )
for ( var Index = StartIndex2; Index < Point2.Items.length; Index++ )
{
var Item = Point2.Items[Index];
......@@ -591,13 +599,19 @@ CHistory.prototype =
PrevItem = Item;
}
if (0 !== StartIndex1)
Point1.Items.splice(0, 1);
if (0 !== StartIndex2)
Point2.Items.splice(0, 1);
var NewPoint =
{
State : Point1.State,
Items : Point1.Items.concat(Point2.Items),
Time : Point1.Time,
Additional : {},
Description: historydescription_Document_AddLetter
Description: historydescription_Document_AddLetterUnion
};
if (null !== this.SavedIndex && this.SavedIndex >= this.Points.length - 2)
......
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