diff options
Diffstat (limited to 'web-ui/app/js')
-rw-r--r-- | web-ui/app/js/mail_view/ui/feedback_box.js | 9 | ||||
-rw-r--r-- | web-ui/app/js/page/events.js | 3 |
2 files changed, 11 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); } }); diff --git a/web-ui/app/js/page/events.js b/web-ui/app/js/page/events.js index c54cc6d6..4d90fff9 100644 --- a/web-ui/app/js/page/events.js +++ b/web-ui/app/js/page/events.js @@ -99,6 +99,9 @@ define(function () { highlightResults: 'search:highlightResults', resetHighlight: 'search:resetHighlight' }, + feedback: { + submitted: 'feedback:submitted' + }, mail: { here: 'mail:here', want: 'mail:want', |