[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
This commit is contained in:
argiro.kokogiannaki 2019-07-02 11:22:38 +00:00
parent ecbf4208a7
commit d0aae39e80
3 changed files with 19 additions and 13 deletions

View File

@ -8,10 +8,14 @@ import {MainSearchModule} from '../../openaireLibrary/searchPages/find/mainSearc
import { OpenaireSearchComponent } from './search.component'; import { OpenaireSearchComponent } from './search.component';
import { MainSearchRoutingModule } from './mainSearch-routing.module'; 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({ @NgModule({
imports: [ MainSearchRoutingModule, MainSearchModule], imports: [ MainSearchRoutingModule, MainSearchModule],
declarations:[OpenaireSearchComponent], declarations:[OpenaireSearchComponent],
exports:[OpenaireSearchComponent] exports:[OpenaireSearchComponent],
providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled],
}) })
export class LibMainSearchModule { } export class LibMainSearchModule { }

View File

@ -2,14 +2,16 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import{OpenaireSearchComponent} from './search.component'; import{OpenaireSearchComponent} from './search.component';
// import {FreeGuard} from'../../login/freeGuard.guard'; import {FreeGuard} from "../../openaireLibrary/login/freeGuard.guard";
// import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard'; import {PreviousRouteRecorder} from "../../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard";
@NgModule({ @NgModule({
imports: [ imports: [
RouterModule.forChild([ RouterModule.forChild([
{ path: '', component: OpenaireSearchComponent } // { path: '', component: OpenaireSearchComponent }
// { path: '', component: OpenaireSearchComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] } { path: '', component: OpenaireSearchComponent, canActivate: [FreeGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] }
]) ])
] ]

View File

@ -48,8 +48,8 @@
// console.log(errorMsg + " __" + url + " __" + lineNumber + " __" + column + " __" + errorObj); // console.log(errorMsg + " __" + url + " __" + lineNumber + " __" + column + " __" + errorObj);
if((errorMsg && errorMsg.indexOf("uikit.js") != -1) || url.indexOf("uikit.js") != -1 ){ if((errorMsg && errorMsg.indexOf("uikit.js") != -1) || url.indexOf("uikit.js") != -1 ){
console.log("********UIKIT Error ***********"); console.log("********UIKIT Error ***********");
$.getScript("assets/common-assets/common/uikit.min.js"); $.getScript("assets/common-assets/common/uikit.min.js?v=1");
$.getScript("assets/common-assets/common/uikit-icons.min.js"); $.getScript("assets/common-assets/common/uikit-icons.min.js?v=1");
} }
} }
@ -57,22 +57,22 @@
<script src="assets/common-assets/common/jquery.js"></script> <script src="assets/common-assets/common/jquery.js"></script>
<script src="assets/common-assets/citeproc.js"></script> <script src="assets/common-assets/citeproc.js"></script>
<script src="assets/common-assets/common/uikit.min.js"></script> <script src="assets/common-assets/common/uikit.min.js?v=1"></script>
<script src="assets/common-assets/common/uikit-icons.min.js"></script> <script src="assets/common-assets/common/uikit-icons.min.js?v=1"></script>
<script src="https://cdn.ckeditor.com/4.5.11/full-all/ckeditor.js"></script> <script src="https://cdn.ckeditor.com/4.5.11/full-all/ckeditor.js"></script>
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
console.log("Is ready - load uikit ***") console.log("Is ready - load uikit ***")
$.getScript("assets/common-assets/common/uikit.min.js"); $.getScript("assets/common-assets/common/uikit.min.js?v=1");
$.getScript("assets/common-assets/common/uikit-icons.min.js"); $.getScript("assets/common-assets/common/uikit-icons.min.js?v=1");
}); });
</script> </script>
<link rel="stylesheet" href="assets/common-assets/common/theme.css"> <link rel="stylesheet" href="assets/common-assets/common/theme.css">
<link rel="stylesheet" href="assets/common-assets/common/custom.css"> <link rel="stylesheet" href="assets/common-assets/common/custom.css">
<link rel="stylesheet" href="assets/common-assets/library.css"> <link rel="stylesheet" href="assets/common-assets/library.css?v=1">
<link rel="stylesheet" href="assets/connect-custom.css"> <link rel="stylesheet" href="assets/connect-custom.css?v=1">
<script src="assets/common-assets/clipboard.min.js"></script> <script src="assets/common-assets/clipboard.min.js"></script>