summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/directives/loader
diff options
context:
space:
mode:
authorTal Gitelman <tg851x@intl.att.com>2017-12-10 18:55:03 +0200
committerTal Gitelman <tg851x@intl.att.com>2017-12-10 19:33:38 +0200
commit51d50f0ef642e0f996a1c8b8d2ef4838bdfec892 (patch)
tree3ac236a864d74d19b0f5c9020891a7a7e5c31b44 /catalog-ui/src/app/directives/loader
parentb5cc2e0695f195716d6ccdc65e73807a6632ec70 (diff)
Final commit to master merge from
Change-Id: Ib464f9a8828437c86fe6def8af238aaf83473507 Issue-ID: SDC-714 Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
Diffstat (limited to 'catalog-ui/src/app/directives/loader')
-rw-r--r--catalog-ui/src/app/directives/loader/loader-directive.ts21
1 files changed, 8 insertions, 13 deletions
diff --git a/catalog-ui/src/app/directives/loader/loader-directive.ts b/catalog-ui/src/app/directives/loader/loader-directive.ts
index 36efc22079..7e056c774f 100644
--- a/catalog-ui/src/app/directives/loader/loader-directive.ts
+++ b/catalog-ui/src/app/directives/loader/loader-directive.ts
@@ -56,19 +56,14 @@ export class LoaderDirective implements ng.IDirective {
let interval;
- this.EventListenerService.registerObserverCallback(EVENTS.SHOW_LOADER_EVENT, (loaderType)=> {
- if (scope.loaderType !== loaderType) {
- return;
- }
- scope.display = true;
- });
- this.EventListenerService.registerObserverCallback(EVENTS.HIDE_LOADER_EVENT, (loaderType)=> {
- if (scope.loaderType !== loaderType) {
- return;
- }
- scope.display = false;
- });
-
+ if(scope.loaderType) {
+ this.EventListenerService.registerObserverCallback(EVENTS.SHOW_LOADER_EVENT + scope.loaderType, (loaderType)=> {
+ scope.display = true;
+ });
+ this.EventListenerService.registerObserverCallback(EVENTS.HIDE_LOADER_EVENT + scope.loaderType, (loaderType)=> {
+ scope.display = false;
+ });
+ }
let calculateSizesForFixPosition = (positionStyle:string):void => {
// This is problematic, I do not want to change the parent position.
// set the loader on all the screen