From f0b9c58b66773814f66705200ab41ef5452d9200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6berl?= Date: Wed, 5 Aug 2020 02:40:24 +0200 Subject: [PATCH] fix(history): use links in pinned history, fix dropdown position - Pinned history should use default links (using href). - History dropdown menu should have a configurable position with 'bottom-right' as the default - Only display 3 entries of history - Fix hideLast was of type "true" --- src/clr-addons/history/history-pinned.html | 2 +- src/clr-addons/history/history-pinned.ts | 6 +----- src/clr-addons/history/history.html | 2 +- src/clr-addons/history/history.service.ts | 2 +- src/clr-addons/history/history.ts | 3 ++- src/dev/src/app/app.component.html | 18 ++++++++++------- src/dev/src/app/app.component.ts | 12 ++++++++--- src/dev/src/app/app.module.ts | 7 ++++--- src/dev/src/app/route-history.service.ts | 23 ++++++++++++++++++++++ 9 files changed, 53 insertions(+), 22 deletions(-) create mode 100644 src/dev/src/app/route-history.service.ts diff --git a/src/clr-addons/history/history-pinned.html b/src/clr-addons/history/history-pinned.html index 3a8ec4ed8..273720b1d 100644 --- a/src/clr-addons/history/history-pinned.html +++ b/src/clr-addons/history/history-pinned.html @@ -2,7 +2,7 @@
  1. - {{historyItem.title}} + {{historyItem.title}}
diff --git a/src/clr-addons/history/history-pinned.ts b/src/clr-addons/history/history-pinned.ts index 8f0f9227a..283ae5ab8 100644 --- a/src/clr-addons/history/history-pinned.ts +++ b/src/clr-addons/history/history-pinned.ts @@ -4,7 +4,7 @@ * The full license information can be found in LICENSE in the root directory of this project. */ -import { Component, Input, OnInit, OnDestroy } from '@angular/core'; +import { Component, Input, OnDestroy, OnInit } from '@angular/core'; import { ClrHistoryModel } from './history-model.interface'; import { ClrHistoryService } from './history.service'; import { Subscription } from 'rxjs'; @@ -46,8 +46,4 @@ export class ClrHistoryPinned implements OnInit, OnDestroy { ngOnDestroy(): void { this.settingsSubscription.unsubscribe(); } - - select(history: ClrHistoryModel): void { - window.location.href = history.url; - } } diff --git a/src/clr-addons/history/history.html b/src/clr-addons/history/history.html index b85d18a02..5be099a11 100644 --- a/src/clr-addons/history/history.html +++ b/src/clr-addons/history/history.html @@ -3,7 +3,7 @@ - +