diff --git a/apps/common/main/lib/controller/History.js b/apps/common/main/lib/controller/History.js index b3714940d..97efc03dc 100644 --- a/apps/common/main/lib/controller/History.js +++ b/apps/common/main/lib/controller/History.js @@ -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; } diff --git a/apps/common/main/lib/model/HistoryVersion.js b/apps/common/main/lib/model/HistoryVersion.js index 5c4341806..169ee5a2f 100644 --- a/apps/common/main/lib/model/HistoryVersion.js +++ b/apps/common/main/lib/model/HistoryVersion.js @@ -74,7 +74,8 @@ define([ isVisible: true, allowSelected: true, selected: false, - serverVersion: 0 + serverVersion: 0, + fileType: 'docx' } } }); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index ee3f7c6ad..8c34fb009 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -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')); } diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 278e59cb1..cd911a81c 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -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')); }