From 6b89758e03cbfe8a29886ec3302544173b4a95df Mon Sep 17 00:00:00 2001 From: sanketpathak Date: Wed, 25 Apr 2018 18:39:57 +0530 Subject: [PATCH] fix(bug): notification has been removed from feedback and it is made more intuitive. --- .../component-feedback.component.html | 12 +++++---- .../component-feedback.component.less | 26 +++++++++++++++++++ .../component-feedback.component.ts | 13 +++++++++- 3 files changed, 45 insertions(+), 6 deletions(-) diff --git a/src/app/stack/utils/component-feedback/component-feedback.component.html b/src/app/stack/utils/component-feedback/component-feedback.component.html index 7078f2d..2e9cb7c 100644 --- a/src/app/stack/utils/component-feedback/component-feedback.component.html +++ b/src/app/stack/utils/component-feedback/component-feedback.component.html @@ -1,11 +1,13 @@ - +
----- diff --git a/src/app/stack/utils/component-feedback/component-feedback.component.less b/src/app/stack/utils/component-feedback/component-feedback.component.less index 77163f9..62fbecb 100644 --- a/src/app/stack/utils/component-feedback/component-feedback.component.less +++ b/src/app/stack/utils/component-feedback/component-feedback.component.less @@ -5,6 +5,32 @@ margin-right: 10px; } + .thumbs-up { + color:#363636; + &:hover { + color:#6ec664; + } + &:active { + color:#6ec664; + } + &-true { + color:#6ec664; + } + } + + .thumbs-down { + color:#363636; + &:hover { + color:#c00; + } + &:active { + color:#c00; + } + &-true { + color:#c00; + } + } + .no-feedback { font-size: unset; } diff --git a/src/app/stack/utils/component-feedback/component-feedback.component.ts b/src/app/stack/utils/component-feedback/component-feedback.component.ts index 4724427..e8351c2 100644 --- a/src/app/stack/utils/component-feedback/component-feedback.component.ts +++ b/src/app/stack/utils/component-feedback/component-feedback.component.ts @@ -23,10 +23,12 @@ import { ComponentFeedbackService } from './component-feedback.service'; export class ComponentFeedbackComponent implements OnChanges { @Input() feedback: MComponentFeedback; feedbackMessages: Array = []; + feedbackColorTypeUp: boolean = false; + feedbackColorTypeDown: boolean = false; constructor(private feedbackService: ComponentFeedbackService) {} - public handleFeedback(event: MouseEvent, type: boolean): void { + public handleFeedback(event: MouseEvent, type: boolean, colorType: boolean): void { event.stopPropagation(); if (this.feedback && this.feedback.feedbackTemplate) { this.feedback.feedbackTemplate.feedback_type = type; @@ -40,6 +42,15 @@ export class ComponentFeedbackComponent implements OnChanges { }); } } + if (type) { + if (colorType) { + this.feedbackColorTypeDown = false; + } + } else { + if (colorType) { + this.feedbackColorTypeUp = false; + } + } } ngOnChanges(changes: SimpleChanges) {