From 8bfa48467a1256dc83c202549205c5607f96af15 Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio <giuseppe.digilio@4science.it> Date: Wed, 7 Mar 2018 12:10:11 +0100 Subject: [PATCH] reverted home-page.component --- src/app/+home-page/home-page.component.html | 13 -------- src/app/+home-page/home-page.component.ts | 33 +-------------------- 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/src/app/+home-page/home-page.component.html b/src/app/+home-page/home-page.component.html index d7442f6f71..6a3e20ca9d 100644 --- a/src/app/+home-page/home-page.component.html +++ b/src/app/+home-page/home-page.component.html @@ -3,16 +3,3 @@ <ds-search-form></ds-search-form> <ds-top-level-community-list></ds-top-level-community-list> </div> - -<button (click)="createNotification()">Notify!</button> -<button (click)="createNotification1()">Notify!</button> -<button (click)="createNotification2()">Notify!</button> - - -<button (click)="deleteHtmlNotification()">Delete Html Notification</button> -<button (click)="deleteAllNotifications()">Delete All</button> - -<!--<ng-template #example>--> - <!--<p>Simple Error example</p>--> - <!--<button [routerLink]="['/mydspace']">Go to mydspace</button>--> -<!--</ng-template>--> diff --git a/src/app/+home-page/home-page.component.ts b/src/app/+home-page/home-page.component.ts index 927ecf2f8d..902a0e820d 100644 --- a/src/app/+home-page/home-page.component.ts +++ b/src/app/+home-page/home-page.component.ts @@ -1,6 +1,4 @@ -import { Component, TemplateRef, ViewChild } from '@angular/core'; -import { NotificationsService } from '../shared/notifications/notifications.service'; -import { NotificationOptions } from '../shared/notifications/models/notification-options.model'; +import { Component } from '@angular/core'; @Component({ selector: 'ds-home-page', @@ -8,33 +6,4 @@ import { NotificationOptions } from '../shared/notifications/models/notification templateUrl: './home-page.component.html' }) export class HomePageComponent { - @ViewChild('example') example: TemplateRef<any>; - - private htmlNotification; - - constructor(private notificationsService: NotificationsService) { - } - - createNotification() { - const n1 = this.notificationsService.success('Welcome in DSpace', 'Good choice!', - new NotificationOptions(10000, true, 'fromLeft', ['bottom', 'left'])); - } - - createNotification1() { - const n1 = this.notificationsService.warning('Welcome in DSpace', 'Good choice!', - new NotificationOptions(10000, false, 'fromLeft', ['bottom', 'left'])); - } - - createNotification2() { - const html = "<h1>Html Alert</h1> <p><button [routerLink]=\"['/mydspace']\">Go to mydspace</button></p>"; - this.htmlNotification = this.notificationsService.info('Ciao', null, null, html); - } - - deleteHtmlNotification() { - this.notificationsService.remove(this.htmlNotification); - } - - deleteAllNotifications() { - this.notificationsService.removeAll(); - } } -- GitLab