Merge pull request #35 from ONLYOFFICE/feature/build-version

Feature/build version
This commit is contained in:
Alexander Trofimov 2016-10-19 17:58:57 +03:00 committed by GitHub
commit 8dcd118e42

View file

@ -423,8 +423,9 @@ define([
var changes = version.changes, change, i;
if (changes && changes.length>0) {
arrVersions[arrVersions.length-1].set('changeid', changes.length-1);
arrVersions[arrVersions.length-1].set('docIdPrev', docIdPrev);
if (!_.isEmpty(version.serverVersion) && version.serverVersion == this.appOptions.buildVersion) {
arrVersions[arrVersions.length-1].set('changeid', changes.length-1);
arrVersions[arrVersions.length-1].set('hasChanges', changes.length>1);
for (i=changes.length-2; i>=0; i--) {
change = changes[i];
@ -457,6 +458,7 @@ define([
}));
arrColors.push(user.get('colorval'));
}
}
} else if (ver==0 && versions.length==1) {
arrVersions[arrVersions.length-1].set('docId', version.key + '1');
}
@ -978,6 +980,7 @@ define([
this.appOptions.canEditStyles = this.appOptions.canLicense && this.appOptions.canEdit;
this.appOptions.canPrint = (this.permissions.print !== false);
this.appOptions.canRename = !!this.permissions.rename;
this.appOptions.buildVersion = params.asc_getBuildVersion();
var type = /^(?:(pdf|djvu|xps))$/.exec(this.document.fileType);
this.appOptions.canDownloadOrigin = !this.appOptions.nativeApp && this.permissions.download !== false && (type && typeof type[1] === 'string');