[DE][PE] Fix version restore

This commit is contained in:
Julia Radzhabova 2021-07-27 22:13:26 +03:00
parent 4f566b1be6
commit 9a5b2487ed
4 changed files with 12 additions and 6 deletions

View file

@ -114,7 +114,8 @@ define([
Common.Gateway.requestRestore(record.get('revision'));
else {
this.isFromSelectRevision = record.get('revision');
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, true));
var fileType = Asc.c_oAscFileType[(record.get('fileType') || '').toUpperCase()] || Asc.c_oAscFileType.DOCX;
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(fileType, true));
}
return;
}

View file

@ -74,7 +74,8 @@ define([
isVisible: true,
allowSelected: true,
selected: false,
serverVersion: 0
serverVersion: 0,
fileType: 'docx'
}
}
});

View file

@ -622,7 +622,8 @@ define([
selected: (opts.data.currentVersion == version.version),
canRestore: this.appOptions.canHistoryRestore && (ver < versions.length-1),
isExpanded: true,
serverVersion: version.serverVersion
serverVersion: version.serverVersion,
fileType: 'docx'
}));
if (opts.data.currentVersion == version.version) {
currentVersion = arrVersions[arrVersions.length-1];
@ -672,7 +673,8 @@ define([
canRestore: this.appOptions.canHistoryRestore && this.appOptions.canDownload,
isRevision: false,
isVisible: true,
serverVersion: version.serverVersion
serverVersion: version.serverVersion,
fileType: 'docx'
}));
arrColors.push(user.get('colorval'));
}

View file

@ -2267,7 +2267,8 @@ define([
selected: (opts.data.currentVersion == version.version),
canRestore: this.appOptions.canHistoryRestore && (ver < versions.length-1),
isExpanded: true,
serverVersion: version.serverVersion
serverVersion: version.serverVersion,
fileType: 'pptx'
}));
if (opts.data.currentVersion == version.version) {
currentVersion = arrVersions[arrVersions.length-1];
@ -2317,7 +2318,8 @@ define([
canRestore: this.appOptions.canHistoryRestore && this.appOptions.canDownload,
isRevision: false,
isVisible: true,
serverVersion: version.serverVersion
serverVersion: version.serverVersion,
fileType: 'pptx'
}));
arrColors.push(user.get('colorval'));
}