Merge pull request #1021 from ONLYOFFICE/fix/history

Fix/history
This commit is contained in:
Julia Radzhabova 2021-07-27 23:34:32 +03:00 committed by GitHub
commit 8635e274e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 10 deletions

View file

@ -114,7 +114,8 @@ define([
Common.Gateway.requestRestore(record.get('revision')); Common.Gateway.requestRestore(record.get('revision'));
else { else {
this.isFromSelectRevision = record.get('revision'); 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; return;
} }

View file

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

View file

@ -157,10 +157,10 @@
} }
.revision-restore { .revision-restore {
color: @text-normal-ie; color: @text-normal-pressed-ie;
color: @text-normal; color: @text-normal-pressed;
border-bottom: @scaled-one-px-value-ie dotted @text-normal-ie; border-bottom: @scaled-one-px-value-ie dotted @text-normal-pressed-ie;
border-bottom: @scaled-one-px-value dotted @text-normal; border-bottom: @scaled-one-px-value dotted @text-normal-pressed;
height: 16px; height: 16px;
margin-top: 5px; margin-top: 5px;
white-space: pre-wrap; white-space: pre-wrap;

View file

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

View file

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