diff options
author | Michael Lando <ml636r@att.com> | 2017-08-02 19:57:39 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-08-02 19:57:39 +0000 |
commit | d1d771bed17c6a5beea19af8da0bf9113972f25a (patch) | |
tree | 6e7420dd3d82200849e51c2af3f2696f11815d12 /catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view-model.ts | |
parent | f15292dd1b262f0a4300c3e7a5bdc5430a6f2a63 (diff) | |
parent | f5854fd32c19c44d32a3e6739b30271d4dccd393 (diff) |
Merge "[SDC] code rebase for sdc resync to LF"
Diffstat (limited to 'catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view-model.ts')
-rw-r--r-- | catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view-model.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view-model.ts b/catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view-model.ts index 37b9b9db9c..f77a29b003 100644 --- a/catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view-model.ts +++ b/catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view-model.ts @@ -22,6 +22,7 @@ import {IUserProperties} from "app/models"; import {MenuItemGroup, MenuItem} from "app/utils"; import {CacheService} from "app/services"; +declare var PunchOutRegistry; export class BreadcrumbsMenuItem { key:string; @@ -48,7 +49,7 @@ export interface IOnboardVendorViewModelScope extends ng.IScope { topNavRootMenu:MenuItemGroup; user:IUserProperties; version:string; - isLoading: boolean; + isLoading:boolean; } export class OnboardVendorViewModel { @@ -66,10 +67,13 @@ export class OnboardVendorViewModel { this.$scope.isLoading = true; - $.getScript("/onboarding/punch-outs_en.js", () => { + PunchOutRegistry.loadOnBoarding(()=> { this.$scope.isLoading = false; }); + this.initScope(); + } + private initScope = ():void => { this.$scope.vendorData = { breadcrumbs: { selectedKeys: [] @@ -89,6 +93,7 @@ export class OnboardVendorViewModel { this.$scope.topNavMenuModel = []; this.$scope.user = this.cacheService.get('user'); + } updateBreadcrumbsPath = (selectedKeys:Array<string>):ng.IPromise<boolean> => { @@ -140,6 +145,7 @@ export class OnboardVendorViewModel { let topNavRootMenu = topNavMenuModel[0]; let onboardItem = topNavRootMenu.menuItems[topNavRootMenu.selectedIndex]; let originalCallback = onboardItem.callback; + //noinspection TypeScriptValidateTypes onboardItem.callback = (...args) => { let ret = this.updateBreadcrumbsPath([]); return originalCallback && originalCallback.apply(undefined, args) || ret; |