From fe65ddd4b7e68a683d4e027f136ac85c8d0b29f4 Mon Sep 17 00:00:00 2001 From: Idan Amit Date: Tue, 8 Jan 2019 16:41:23 +0200 Subject: minor fixes to sdc-pubsub Aligned sdc code to the fixes that were made in the sdc-pubsub library Change-Id: I54e48e55915dadd3fdb53c0290e013708161aa46 Issue-ID: SDC-2032 Signed-off-by: Idan Amit --- .../src/app/ng2/components/ui/plugin/plugin-frame.component.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'catalog-ui/src/app/ng2/components/ui') diff --git a/catalog-ui/src/app/ng2/components/ui/plugin/plugin-frame.component.ts b/catalog-ui/src/app/ng2/components/ui/plugin/plugin-frame.component.ts index 067bb96d8e..d70c448984 100644 --- a/catalog-ui/src/app/ng2/components/ui/plugin/plugin-frame.component.ts +++ b/catalog-ui/src/app/ng2/components/ui/plugin/plugin-frame.component.ts @@ -1,4 +1,4 @@ -import {Component, Inject, Input, Output, OnInit, EventEmitter} from "@angular/core"; +import {Component, EventEmitter, Inject, Input, OnInit, Output} from "@angular/core"; import {URLSearchParams} from '@angular/http'; import {Plugin} from "app/models"; import {EventBusService} from "../../../services/event-bus.service"; @@ -35,6 +35,8 @@ export class PluginFrameComponent implements OnInit { if (this.plugin.isOnline) { this.initPlugin(); + } else { + this.onLoadingDone.emit(); } }) @@ -68,7 +70,7 @@ export class PluginFrameComponent implements OnInit { // before moving to a new state this.$scope.$on('$stateChangeStart', (event, toState, toParams, fromState, fromParams) => { if ((fromState.name !== toState.name) || (fromState.name === toState.name) && (toParams.path !== fromParams.path)) { - if(this.eventBusService.NoWindowOutEvents.indexOf(this.eventBusService.lastEventNotified) == -1) { + if (this.eventBusService.NoWindowOutEvents.indexOf(this.eventBusService.lastEventNotified) == -1) { if (!this.isClosed) { event.preventDefault(); @@ -79,8 +81,7 @@ export class PluginFrameComponent implements OnInit { this.$state.go(toState.name, toParams); }); } - } - else { + } else { this.eventBusService.unregister(this.plugin.pluginId); } } -- cgit 1.2.3-korg