From f5854fd32c19c44d32a3e6739b30271d4dccd393 Mon Sep 17 00:00:00 2001 From: Avi Ziv Date: Mon, 31 Jul 2017 15:50:46 +0300 Subject: [SDC] code rebase for sdc resync to LF Change-Id: If6d87c9e324f508a8a6b80b10a03d1843901472e Signed-off-by: Michael Lando --- .../view-models/onboard-vendor/onboard-vendor-view-model.ts | 10 ++++++++-- .../app/view-models/onboard-vendor/onboard-vendor-view.html | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'catalog-ui/src/app/view-models/onboard-vendor') 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):ng.IPromise => { @@ -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 @@
- +
-- cgit 1.2.3-korg