summaryrefslogtreecommitdiff
path: root/web-ui/app/js
diff options
context:
space:
mode:
authorGiovane <giovaneliberato@gmail.com>2015-09-21 17:38:55 -0300
committerGiovane <giovaneliberato@gmail.com>2015-09-21 18:09:07 -0300
commitb492d6928dc757e56404a1a6f0d632658c38bc13 (patch)
tree21517158863acdfe7cb133e3e71f74484be32060 /web-ui/app/js
parent84b78e43770efa48d85818cf99aecccbd3035d7b (diff)
#442 Shows success message after sending feedback
Diffstat (limited to 'web-ui/app/js')
-rw-r--r--web-ui/app/js/mail_view/ui/feedback_box.js5
-rw-r--r--web-ui/app/js/page/default.js3
2 files changed, 8 insertions, 0 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 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);
}
diff --git a/web-ui/app/js/page/default.js b/web-ui/app/js/page/default.js
index 37eabaec..1189d1ad 100644
--- a/web-ui/app/js/page/default.js
+++ b/web-ui/app/js/page/default.js
@@ -45,6 +45,7 @@ define(
'page/logout_shortcut',
'feedback/feedback_trigger',
'mail_view/ui/feedback_box',
+ 'mail_view/data/feedback_sender',
'page/version',
],
@@ -78,6 +79,7 @@ define(
logoutShortcut,
feedback,
feedbackBox,
+ feedbackSender,
version) {
'use strict';
@@ -114,6 +116,7 @@ define(
version.attachTo('.version');
feedback.attachTo('#feedback');
+ feedbackSender.attachTo(document);
}
return initialize;