Commit 5ec9aa00 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Добавлена функция, подсчитывающая время редактирования документа.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48431 954022d7-b5bf-4e40-9824-e11837661b57
parent cb1ff0cc
......@@ -47,6 +47,7 @@ var historyitem_Paragraph_Borders_Top = 30; // Изменяем н
var historyitem_Paragraph_Pr = 31; // Изменяем свойства полностью
var historyitem_Paragraph_PresentationPr_Bullet = 32; // Изменяем свойства нумерации у параграфа в презентации
var historyitem_Paragraph_PresentationPr_Level = 33; // Изменяем уровень параграфа в презентациях
var historyitem_Paragraph_FramePr = 34; // Изменяем настройки рамки
// Типы изменений в классе ParaTextPr
var historyitem_TextPr_Change = 1; // Изменяем настройку
......@@ -692,6 +693,41 @@ CHistory.prototype =
{
this.Points[this.Index].Additional = new Object();
}
},
Get_EditingTime : function(dTime)
{
var Count = this.Points.length;
var TimeLine = new Array();
for ( var Index = 0; Index < Count; Index++ )
{
var PointTime = this.Points[Index].Time;
TimeLine.push( { t0 : PointTime - dTime, t1 : PointTime } );
}
Count = TimeLine.length;
for ( var Index = 1; Index < Count; Index++ )
{
var CurrEl = TimeLine[Index];
var PrevEl = TimeLine[Index - 1];
if ( CurrEl.t0 <= PrevEl.t1 )
{
PrevEl.t1 = CurrEl.t1;
TimeLine.splice( Index, 1 );
Index--;
Count--;
}
}
Count = TimeLine.length;
var OverallTime = 0;
for ( var Index = 0; Index < Count; Index++ )
{
OverallTime += TimeLine[Index].t1 - TimeLine[Index].t0;
}
return OverallTime;
}
};
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