diff options
author | Giovane <giovaneliberato@gmail.com> | 2015-09-14 14:44:47 -0300 |
---|---|---|
committer | Giovane <giovaneliberato@gmail.com> | 2015-09-14 15:55:37 -0300 |
commit | 424f135cf1c777399ff6659b7e5ba1d1f37593ea (patch) | |
tree | fc27aa6eb8a3513f7f7f84b2ccc727a6d820ecf3 /web-ui/app/js | |
parent | b4bc06226f7b64a928d54483b77707022f068235 (diff) |
#442 trigger open event when click on feedback link.
Diffstat (limited to 'web-ui/app/js')
-rw-r--r-- | web-ui/app/js/page/events.js | 3 | ||||
-rw-r--r-- | web-ui/app/js/page/feedback.js | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/web-ui/app/js/page/events.js b/web-ui/app/js/page/events.js index cf1b29ad..c00c2848 100644 --- a/web-ui/app/js/page/events.js +++ b/web-ui/app/js/page/events.js @@ -69,6 +69,9 @@ define(function () { next: 'ui:page:next', changed: 'ui:page:changed' }, + feedback: { + open: 'ui:feedback:open' + }, composeBox: { newMessage: 'ui:composeBox:newMessage', newReply: 'ui:composeBox:newReply', diff --git a/web-ui/app/js/page/feedback.js b/web-ui/app/js/page/feedback.js index 032aedbc..34af9b67 100644 --- a/web-ui/app/js/page/feedback.js +++ b/web-ui/app/js/page/feedback.js @@ -15,7 +15,7 @@ * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. */ -define(['flight/lib/component', 'views/templates'], function (defineComponent, templates) { +define(['flight/lib/component', 'views/templates', 'page/events'], function (defineComponent, templates, events) { 'use strict'; return defineComponent(function () { @@ -23,8 +23,13 @@ define(['flight/lib/component', 'views/templates'], function (defineComponent, t this.$node.html(templates.page.feedback()); }; + this.onClick = function() { + this.trigger(document, events.ui.feedback.open); + } + this.after('initialize', function () { this.render(); + this.on('click', this.onClick); }); }); |