diff --git a/login/userMini.component.ts b/login/userMini.component.ts
index ea4caec3..00a6041f 100644
--- a/login/userMini.component.ts
+++ b/login/userMini.component.ts
@@ -1,4 +1,4 @@
-import {Component, Input, OnChanges, OnInit, SimpleChanges} from '@angular/core';
+import {Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {Session, User} from './utils/helper.class';
import {RouterHelper} from '../utils/routerHelper.class';
@@ -6,72 +6,44 @@ import {Subscriber} from "rxjs";
import {MenuItem} from "../sharedComponents/menu";
import {UserManagementService} from "../services/user-management.service";
-// declare var logoutClicked;
+declare var UIkit;
+
@Component({
selector: 'user-mini',
template: `
-
@@ -172,9 +122,10 @@ export class UserMiniComponent implements OnInit, OnChanges {
@Input() logOutUrl;
@Input() cookieDomain;
@Input() dark: boolean = false;
- subscriptions = [];
+ @Output() closeCanvasEmitter: EventEmitter = new EventEmitter();
+ private subscriptions = [];
- constructor(private router: Router, private route: ActivatedRoute, private userManagementService: UserManagementService) {
+ constructor(private router: Router, private route: ActivatedRoute, private userManagementService: UserManagementService) {
}
ngOnInit() {
@@ -189,7 +140,7 @@ export class UserMiniComponent implements OnInit, OnChanges {
this.initUser();
}
}
-
+
ngOnDestroy() {
this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscriber) {
@@ -198,6 +149,10 @@ export class UserMiniComponent implements OnInit, OnChanges {
});
}
+ closeCanvas() {
+ this.closeCanvasEmitter.emit(true);
+ }
+
initUser() {
if (this.user) {
this.loggedIn = true;
@@ -222,14 +177,12 @@ export class UserMiniComponent implements OnInit, OnChanges {
logIn() {
this.userManagementService.login();
}
-
+
isTheActiveSubMenu(menuItem: MenuItem): boolean {
let currentRoute = this.router.url.split('?')[0];
- if (menuItem.route == currentRoute || menuItem.route == (currentRoute + "/") ) {
- return true;
- }
- return false;
+ return menuItem.route == currentRoute || menuItem.route == (currentRoute + "/");
}
+
parseName() {
this.firstLetters = "";
if (this.user && this.user.firstname) {
diff --git a/sharedComponents/navigationBar.component.html b/sharedComponents/navigationBar.component.html
index d98e5150..c138489a 100644
--- a/sharedComponents/navigationBar.component.html
+++ b/sharedComponents/navigationBar.component.html
@@ -32,95 +32,71 @@
-
-
@@ -161,12 +137,10 @@
-->
-
-
-
-