diff options
author | Giovane <giovaneliberato@gmail.com> | 2015-09-17 16:15:35 -0300 |
---|---|---|
committer | Giovane <giovaneliberato@gmail.com> | 2015-09-17 16:15:35 -0300 |
commit | 035f3ceb689e3d9905ec642b2526e8ec4f0b617f (patch) | |
tree | c2df7c192a635920c0937f7459d3ac5f05eca2f8 /web-ui/app/js/mail_view | |
parent | 1a7476f7a187f7eb65e358875a05c01869f54020 (diff) |
#442 Improve feedback box UI and show message after clicking submit.
Diffstat (limited to 'web-ui/app/js/mail_view')
-rw-r--r-- | web-ui/app/js/mail_view/ui/feedback_box.js | 9 |
1 files changed, 8 insertions, 1 deletions
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 4656a235..5a04e291 100644 --- a/web-ui/app/js/mail_view/ui/feedback_box.js +++ b/web-ui/app/js/mail_view/ui/feedback_box.js @@ -21,7 +21,8 @@ define(['flight/lib/component', 'views/templates', 'page/events', 'features'], return defineComponent(function () { this.defaultAttrs({ - 'closeButton': '.close-mail-button' + 'closeButton': '.close-mail-button', + 'submitButton': '#send-button', }); this.render = function () { @@ -39,11 +40,17 @@ define(['flight/lib/component', 'views/templates', 'page/events', 'features'], this.trigger(document, events.dispatchers.rightPane.openNoMessageSelected); }; + this.showFeedbackSubmittedMessage = 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(this.select('closeButton'), 'click', this.showNoMessageSelected); + this.on(this.select('submitButton'), 'click', this.showNoMessageSelected); + this.on(this.select('submitButton'), 'click', this.showFeedbackSubmittedMessage); } }); |