diff options
author | 2017-08-02 19:57:39 +0000 | |
---|---|---|
committer | 2017-08-02 19:57:39 +0000 | |
commit | d1d771bed17c6a5beea19af8da0bf9113972f25a (patch) | |
tree | 6e7420dd3d82200849e51c2af3f2696f11815d12 /catalog-ui/src/app/view-models/onboard-vendor | |
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')
-rw-r--r-- | catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view-model.ts | 10 | ||||
-rw-r--r-- | catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view.html | 2 |
2 files changed, 9 insertions, 3 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; diff --git a/catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view.html b/catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view.html index 56a36863e1..eec7c4758d 100644 --- a/catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view.html +++ b/catalog-ui/src/app/view-models/onboard-vendor/onboard-vendor-view.html @@ -1,6 +1,6 @@ <div class="sdc-catalog-container"> - <loader ng-init="isLoading=true" data-display="isLoading"></loader> + <loader data-display="isLoading"></loader> <div class="w-sdc-main-container"> <punch-out name="'onboarding/vendor'" data="vendorData" user="user" on-event="onVendorEvent"></punch-out> </div> |