From d0aae39e80f69da21d48f09380e83fe3f6aaa92b Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Tue, 2 Jul 2019 11:22:38 +0000 Subject: [PATCH] [Connect|Trunk] Search find: add isRouteEnabled in the routing module Index.html: add versions for the css and js files git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@56315 d315682c-612b-4755-9ff5-7f18f6832af3 --- src/app/searchPages/find/libSearch.module.ts | 6 +++++- .../find/mainSearch-routing.module.ts | 10 ++++++---- src/index.html | 16 ++++++++-------- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/app/searchPages/find/libSearch.module.ts b/src/app/searchPages/find/libSearch.module.ts index 84fef82..4a5f5e4 100644 --- a/src/app/searchPages/find/libSearch.module.ts +++ b/src/app/searchPages/find/libSearch.module.ts @@ -8,10 +8,14 @@ import {MainSearchModule} from '../../openaireLibrary/searchPages/find/mainSearc import { OpenaireSearchComponent } from './search.component'; import { MainSearchRoutingModule } from './mainSearch-routing.module'; +import {FreeGuard} from "../../openaireLibrary/login/freeGuard.guard"; +import {PreviousRouteRecorder} from "../../openaireLibrary/utils/piwik/previousRouteRecorder.guard"; +import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard"; @NgModule({ imports: [ MainSearchRoutingModule, MainSearchModule], declarations:[OpenaireSearchComponent], - exports:[OpenaireSearchComponent] + exports:[OpenaireSearchComponent], + providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled], }) export class LibMainSearchModule { } diff --git a/src/app/searchPages/find/mainSearch-routing.module.ts b/src/app/searchPages/find/mainSearch-routing.module.ts index 193e0c1..e7df40e 100644 --- a/src/app/searchPages/find/mainSearch-routing.module.ts +++ b/src/app/searchPages/find/mainSearch-routing.module.ts @@ -2,14 +2,16 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import{OpenaireSearchComponent} from './search.component'; -// import {FreeGuard} from'../../login/freeGuard.guard'; -// import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard'; +import {FreeGuard} from "../../openaireLibrary/login/freeGuard.guard"; +import {PreviousRouteRecorder} from "../../openaireLibrary/utils/piwik/previousRouteRecorder.guard"; +import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard"; + @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireSearchComponent } - // { path: '', component: OpenaireSearchComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] } + // { path: '', component: OpenaireSearchComponent } + { path: '', component: OpenaireSearchComponent, canActivate: [FreeGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] } ]) ] diff --git a/src/index.html b/src/index.html index 64b2c1f..5138a63 100644 --- a/src/index.html +++ b/src/index.html @@ -48,8 +48,8 @@ // console.log(errorMsg + " __" + url + " __" + lineNumber + " __" + column + " __" + errorObj); if((errorMsg && errorMsg.indexOf("uikit.js") != -1) || url.indexOf("uikit.js") != -1 ){ console.log("********UIKIT Error ***********"); - $.getScript("assets/common-assets/common/uikit.min.js"); - $.getScript("assets/common-assets/common/uikit-icons.min.js"); + $.getScript("assets/common-assets/common/uikit.min.js?v=1"); + $.getScript("assets/common-assets/common/uikit-icons.min.js?v=1"); } } @@ -57,22 +57,22 @@ - - + + - - + +