add properties json file , minor changes for navbar and login

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@50591 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2018-02-05 15:13:55 +00:00
parent 91b7c11f0a
commit c43c57834c
3 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,6 @@ import { Router,CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot} from '
import {Observable} from 'rxjs/Observable';
import {Session} from './utils/helper.class';
import {ErrorCodes} from './utils/guardHelper.class';
import{EnvProperties} from '../utils/properties/env-properties';
@Injectable()
export class AdminLoginGuard implements CanActivate {
@ -15,7 +14,6 @@ export class AdminLoginGuard implements CanActivate {
var loggedIn = false;
var isAdmin = false;
var errorCode = ErrorCodes.NOT_LOGGIN;
var properties:EnvProperties = route.data.envSpecific;
if(Session.isLoggedIn()){
loggedIn = true;
if(!Session.isValidAndRemove()){

View File

@ -8,7 +8,7 @@ import {RouterHelper} from '../utils/routerHelper.class';
import {StringUtils} from '../utils/string-utils.class';
import{EnvProperties} from '../utils/properties/env-properties';
declare var logoutClicked;
// declare var logoutClicked;
@Component({
selector: 'user-mini',
template: `
@ -139,11 +139,11 @@ export class UserMiniComponent {
logOut(){
if(Session.isLoggedIn()){
Session.removeUser();
// console.log("Try to Logout!");
console.log("Try to Logout!");
// this.logoutOpenaire.logout().subscribe(params => {
// console.log("Logout!");
// });
logoutClicked();
// logoutClicked();
console.log("Redirect to "+location.href);
window.location.href = this.logOutUrl + StringUtils.URIEncode(location.href);
@ -154,6 +154,7 @@ export class UserMiniComponent {
}
logIn(){
console.log("LOgin is clicked " + this.logInUrl);
Session.setCurrentUrl(location.pathname);
Session.setCurrentParameters(location.search);
window.location.href = this.logInUrl

View File

@ -106,7 +106,7 @@ export class NavigationBarComponent {
this.isAuthorized = false;
}
if( this.APIUrl && this.communityId ){
this.config.getCommunityInformation(this.APIUrl, this.communityId ).subscribe(data => {
for(var i=0; i< data.entities.length; i++){
@ -118,6 +118,7 @@ export class NavigationBarComponent {
}
});
}
}
onClick(id: string) {