summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/models/base-pubsub.ts
diff options
context:
space:
mode:
authorIdan Amit <ia096e@intl.att.com>2018-05-08 16:06:34 +0300
committerMichael Lando <ml636r@att.com>2018-05-08 13:40:11 +0000
commit60c47df2499a98a1d0bd54ef4feb3316ae738e05 (patch)
treed02bae3b1b52ab602c5393ab50624ecb90128496 /catalog-ui/src/app/models/base-pubsub.ts
parentecd3d712aad4ac37f399c90f4bf9258bfe483b9a (diff)
Developed disable navigation mechanism
Added a list for events to not fire an WINDOW_OUT event after sdc notifies about them Small fix to Plugins loader Change-Id: Ia31ebf4095b94a5ca602c4f502df4fcc32368b0b Issue-ID: SDC-1277 Signed-off-by: Idan Amit <ia096e@intl.att.com>
Diffstat (limited to 'catalog-ui/src/app/models/base-pubsub.ts')
-rw-r--r--catalog-ui/src/app/models/base-pubsub.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/catalog-ui/src/app/models/base-pubsub.ts b/catalog-ui/src/app/models/base-pubsub.ts
index c4b109f1d5..41e8039da5 100644
--- a/catalog-ui/src/app/models/base-pubsub.ts
+++ b/catalog-ui/src/app/models/base-pubsub.ts
@@ -6,12 +6,14 @@ export class BasePubSub {
eventsCallbacks: Array<Function>;
clientId: string;
eventsToWait: Map<string, Array<string>>;
+ lastEventNotified: string;
constructor(pluginId: string) {
this.subscribers = new Map<string, ISubscriber>();
this.eventsCallbacks = [];
this.eventsToWait = new Map<string, Array<string>>();
this.clientId = pluginId;
+ this.lastEventNotified = "";
this.onMessage = this.onMessage.bind(this);
window.addEventListener("message", this.onMessage);
@@ -54,9 +56,10 @@ export class BasePubSub {
this.subscribers.forEach( (subscriber: ISubscriber, subscriberId: string) => {
subscriber.window.postMessage(eventObj, subscriber.locationUrl);
-
});
+ this.lastEventNotified = eventType;
+
return {
subscribe: function(callbackFn) {