From b492d6928dc757e56404a1a6f0d632658c38bc13 Mon Sep 17 00:00:00 2001 From: Giovane Date: Mon, 21 Sep 2015 17:38:55 -0300 Subject: #442 Shows success message after sending feedback --- web-ui/app/js/mail_view/ui/feedback_box.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'web-ui/app/js/mail_view/ui') diff --git a/web-ui/app/js/mail_view/ui/feedback_box.js b/web-ui/app/js/mail_view/ui/feedback_box.js index aad35f2a..eb079b5b 100644 --- a/web-ui/app/js/mail_view/ui/feedback_box.js +++ b/web-ui/app/js/mail_view/ui/feedback_box.js @@ -46,11 +46,16 @@ define(['flight/lib/component', 'views/templates', 'page/events', 'features'], this.trigger(document, events.feedback.submit, { feedback: feedback }); }; + this.showSuccessMessage = function () { + this.trigger(document, events.ui.userAlerts.displayMessage, { message: 'Thanks for your feedback!' }); + }; + this.after('initialize', function () { if (features.isEnabled('feedback')) { this.render(); this.on(document, events.dispatchers.rightPane.openFeedbackBox, this.openFeedbackBox); this.on(document, events.feedback.submitted, this.showNoMessageSelected); + this.on(document, events.feedback.submitted, this.showSuccessMessage); this.on(this.select('closeButton'), 'click', this.showNoMessageSelected); this.on(this.select('submitButton'), 'click', this.submitFeedback); } -- cgit v1.2.3