Commit e77898b1 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

(1.0.0.2): FileConverter2

(1.0.0.3): FileConverterService2
(1.0.0.3): FileConverterUtils2
Поправлено Get_SelfChanges, изменения сохраняются на сервере.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47265 954022d7-b5bf-4e40-9824-e11837661b57
parent 5373ad3b
......@@ -573,13 +573,13 @@ function CCollaborativeEditing()
for ( var PointIndex = 0; PointIndex < PointsCount; PointIndex++ )
{
var Point = History.Points[PointIndex];
var LastPoint = History.Index;
var LastPoint = Point.Items.length;
for ( var Index = 0; Index <= LastPoint; Index++ )
for ( var Index = 0; Index < LastPoint; Index++ )
{
var Item = Point.Items[Index];
var oChanges = new CCollaborativeChanges()
oChanges.Set_FromUndoRedo( Item.Class, Item.Data );
var oChanges = new CCollaborativeChanges();
oChanges.Set_FromUndoRedo( Item.Class, Item.Data, Item.Binary );
// Изменения могут обрабатываться другим кодом, поэтому здесь
// явно указываются имена свойств, что бы избежать их последующей
// минимизации.
......
......@@ -2137,19 +2137,17 @@ function OnSave_Callback(e)
window['qtDocBridge']['savedDocument'] (data);
} else {
var data = oBinaryFileWriter.Write();
var oAdditionalData = new Object();
oAdditionalData["c"] = "save";
oAdditionalData["id"] = documentId;
oAdditionalData["vkey"] = documentVKey;
oAdditionalData["outputformat"] = c_oAscFileType.INNER;
oAdditionalData["savetype"] = "completeall";
/* uncoment to save changes only instead send file complete
oAdditionalData["savetype"] = "changes";
data = JSON.stringify( CollaborativeEditing.Get_SelfChanges() );
*/
var data = oBinaryFileWriter.Write();
oAdditionalData["savetype"] = "completeall";
////uncoment to save changes only instead send file complete
//var data = JSON.stringify( CollaborativeEditing.Get_SelfChanges() );
//oAdditionalData["savetype"] = "changes";
var sData = "mnuSaveAs" + cCharDelimiter + JSON.stringify(oAdditionalData) + cCharDelimiter + data;
sendCommand(editor, function(incomeObject){
if(null != incomeObject && "save" == incomeObject.type)
......@@ -6163,6 +6161,14 @@ function sendCommand(editor, fCallback, rdata){
var rData = {"id":documentId, "format": documentFormat, "vkey": documentVKey, "editorid": c_oEditorId.Word, "c":"chopen"};
setTimeout( function(){sendCommand(editor, fCallback, JSON.stringify(rData))}, 3000);
break;
case "changes":
editor.canSave = true;
editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Save);
//var rData = {"id":documentId, "c":"sfc", "outputformat": c_oAscFileType.DOCX};
//sendCommand(editor, fCallback, JSON.stringify(rData));
if(fCallback)
fCallback(incomeObject);
break;
case "save":
if(fCallback)
fCallback(incomeObject);
......
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