summaryrefslogtreecommitdiff
path: root/web-ui/app/js/mail_view
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/app/js/mail_view')
-rw-r--r--web-ui/app/js/mail_view/ui/feedback_box.js9
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);
}
});