mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-6587] ACA: Viewer does not update after restoring version and the toolbar disappears (#9383)
* [ACS-6587] reload files after update * [ACS-6587] update view after version change * [ACS-6587] update view after version change * [ACS-6587] update tests * AAE-0000 e2e affected were not running on ADF pipeline' (#9409) * AAE-14727 Removed unused css rule (#9408) * [ACS-6587] update tests * [ACS-6587] rearrange tests description --------- Co-authored-by: Vito Albano <vito.albano@alfresco.com> Co-authored-by: Ehsan Rezaei <ehsan.rezaei@hyland.com>
This commit is contained in:
@@ -258,7 +258,7 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit, OnDestroy {
|
||||
(node) =>
|
||||
node &&
|
||||
node.id === this.nodeId &&
|
||||
(node.name !== this.fileName || this.getNodeVersionProperty(this.nodeEntry.entry) !== this.getNodeVersionProperty(node))
|
||||
this.getNodeVersionProperty(this.nodeEntry.entry) !== this.getNodeVersionProperty(node)
|
||||
),
|
||||
takeUntil(this.onDestroy$)
|
||||
)
|
||||
@@ -323,9 +323,7 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit, OnDestroy {
|
||||
: encodeURI('1.0');
|
||||
|
||||
urlFileContent = versionData ? this.contentApi.getVersionContentUrl(this.nodeId, versionData.id) : this.contentApi.getContentUrl(this.nodeId);
|
||||
urlFileContent = this.cacheBusterNumber
|
||||
? urlFileContent + '&' + currentFileVersion + '&' + this.cacheBusterNumber
|
||||
: urlFileContent + '&' + currentFileVersion;
|
||||
urlFileContent = urlFileContent + '&' + currentFileVersion;
|
||||
|
||||
const fileExtension = this.viewUtilService.getFileExtension(versionData ? versionData.name : nodeData.name);
|
||||
this.fileName = versionData ? versionData.name : nodeData.name;
|
||||
@@ -348,7 +346,7 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
this.mimeType = mimeType;
|
||||
this.urlFileContent = urlFileContent;
|
||||
this.urlFileContent = urlFileContent + (this.cacheBusterNumber ? '&' + this.cacheBusterNumber : '');
|
||||
this.sidebarRightTemplateContext.node = nodeData;
|
||||
this.sidebarLeftTemplateContext.node = nodeData;
|
||||
}
|
||||
|
Reference in New Issue
Block a user