From ecd3d712aad4ac37f399c90f4bf9258bfe483b9a Mon Sep 17 00:00:00 2001 From: Idan Amit Date: Mon, 7 May 2018 15:55:00 +0300 Subject: Developed disable navigation mechanism Added a mechanism to disable and enable the navigation when waiting for a response from a plugin Change-Id: I11cba9a7fc2a32e3d3d32fb9cf9f0590900fe73b Issue-ID: SDC-1277 Signed-off-by: Idan Amit --- catalog-ui/src/app/view-models/workspace/workspace-view-model.ts | 7 ++++--- catalog-ui/src/app/view-models/workspace/workspace.less | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'catalog-ui/src/app/view-models') diff --git a/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts b/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts index 3797707046..9abd7139b7 100644 --- a/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts +++ b/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts @@ -276,7 +276,6 @@ export class WorkspaceViewModel { return versionObj.versionId === this.$scope.component.uniqueId; }); } - this.$scope.isLoading = true; let eventData = { uuid: this.$scope.component.uuid, @@ -284,6 +283,8 @@ export class WorkspaceViewModel { }; this.eventBusService.notify("VERSION_CHANGED", eventData).subscribe(() => { + this.$scope.isLoading = true; + this.$state.go(this.$state.current.name, { id: selectedId, type: this.$scope.componentType.toLowerCase(), @@ -461,7 +462,7 @@ export class WorkspaceViewModel { switch (url) { case 'lifecycleState/CHECKOUT': - this.eventBusService.notify("CHECK_OUT", eventData).subscribe(() => { + this.eventBusService.notify("CHECK_OUT", eventData, false).subscribe(() => { // only checkOut get the full component from server // this.$scope.component = component; // Work around to change the csar version @@ -503,7 +504,7 @@ export class WorkspaceViewModel { }); break; case 'lifecycleState/UNDOCHECKOUT': - this.eventBusService.notify("UNDO_CHECK_OUT", eventData).subscribe(() => { + this.eventBusService.notify("UNDO_CHECK_OUT", eventData, false).subscribe(() => { defaultActionAfterChangeLifecycleState(); this.Notification.success({ message: this.$filter('translate')("DELETE_SUCCESS_MESSAGE_TEXT"), diff --git a/catalog-ui/src/app/view-models/workspace/workspace.less b/catalog-ui/src/app/view-models/workspace/workspace.less index 84a3599d47..cee146aa12 100644 --- a/catalog-ui/src/app/view-models/workspace/workspace.less +++ b/catalog-ui/src/app/view-models/workspace/workspace.less @@ -79,7 +79,7 @@ padding: 0px 0px 0px 0px; background-color: @main_color_p; - z-index: 1; + //z-index: 1; .sdc-workspace-top-bar { height: @action_nav_height; -- cgit 1.2.3-korg