summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiovane <giovaneliberato@gmail.com>2015-09-16 14:59:09 -0300
committerGiovane <giovaneliberato@gmail.com>2015-09-16 18:39:30 -0300
commit6d0f97b677704b8dc04aa70f32a85660df4f1822 (patch)
tree86bad223d8910513aca3bea53009d9d959173cdf
parent9f5885fc7fc725e8541bf2b0cd60527d3b96b87e (diff)
#442 Renames open feedback box event.
-rw-r--r--web-ui/app/js/dispatchers/right_pane_dispatcher.js2
-rw-r--r--web-ui/app/js/feedback/feedback_trigger.js2
-rw-r--r--web-ui/app/js/mail_view/ui/feedback_box.js2
-rw-r--r--web-ui/app/js/page/events.js4
-rw-r--r--web-ui/app/js/page/pane_contract_expand.js2
-rw-r--r--web-ui/test/spec/dispatchers/right_pane_dispatcher.spec.js2
-rw-r--r--web-ui/test/spec/feedback/feedback_trigger.spec.js2
-rw-r--r--web-ui/test/spec/page/pane_contract_expand.spec.js2
8 files changed, 8 insertions, 10 deletions
diff --git a/web-ui/app/js/dispatchers/right_pane_dispatcher.js b/web-ui/app/js/dispatchers/right_pane_dispatcher.js
index c342b0b2..870bcd92 100644
--- a/web-ui/app/js/dispatchers/right_pane_dispatcher.js
+++ b/web-ui/app/js/dispatchers/right_pane_dispatcher.js
@@ -104,7 +104,7 @@ define(
this.on(document, events.dispatchers.rightPane.openComposeBox, this.openComposeBox);
this.on(document, events.dispatchers.rightPane.openDraft, this.openDraft);
this.on(document, events.ui.mail.open, this.openMail);
- this.on(document, events.ui.feedback.open, this.openFeedbackBox);
+ this.on(document, events.dispatchers.rightPane.openFeedbackBox, this.openFeedbackBox);
this.on(document, events.dispatchers.rightPane.openNoMessageSelected, this.openNoMessageSelectedPane);
this.on(document, events.dispatchers.rightPane.selectTag, this.selectTag);
this.on(document, events.ui.tag.selected, this.saveTag);
diff --git a/web-ui/app/js/feedback/feedback_trigger.js b/web-ui/app/js/feedback/feedback_trigger.js
index e98c3e30..598f9060 100644
--- a/web-ui/app/js/feedback/feedback_trigger.js
+++ b/web-ui/app/js/feedback/feedback_trigger.js
@@ -25,7 +25,7 @@ define(['flight/lib/component', 'views/templates', 'page/events', 'features'],
};
this.onClick = function() {
- this.trigger(document, events.ui.feedback.open);
+ this.trigger(document, events.dispatchers.rightPane.openFeedbackBox);
};
this.after('initialize', function () {
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 85c0dadc..1a06b8a3 100644
--- a/web-ui/app/js/mail_view/ui/feedback_box.js
+++ b/web-ui/app/js/mail_view/ui/feedback_box.js
@@ -34,7 +34,7 @@ define(['flight/lib/component', 'views/templates', 'page/events', 'features'],
this.after('initialize', function () {
if (features.isEnabled('feedback')) {
this.render();
- this.on(document, events.ui.feedback.open, this.openFeedbackBox);
+ this.on(document, events.dispatchers.rightPane.openFeedbackBox, this.openFeedbackBox);
}
});
diff --git a/web-ui/app/js/page/events.js b/web-ui/app/js/page/events.js
index c00c2848..c54cc6d6 100644
--- a/web-ui/app/js/page/events.js
+++ b/web-ui/app/js/page/events.js
@@ -69,9 +69,6 @@ define(function () {
next: 'ui:page:next',
changed: 'ui:page:changed'
},
- feedback: {
- open: 'ui:feedback:open'
- },
composeBox: {
newMessage: 'ui:composeBox:newMessage',
newReply: 'ui:composeBox:newReply',
@@ -171,6 +168,7 @@ define(function () {
dispatchers: {
rightPane: {
openComposeBox: 'dispatchers:rightPane:openComposeBox',
+ openFeedbackBox: 'dispatchers:rightPane:openFeedbackBox',
openNoMessageSelected: 'dispatchers:rightPane:openNoMessageSelected',
openNoMessageSelectedWithoutPushState: 'dispatchers:rightPane:openNoMessageSelectedWithoutPushState',
refreshMailList: 'dispatchers:rightPane:refreshMailList',
diff --git a/web-ui/app/js/page/pane_contract_expand.js b/web-ui/app/js/page/pane_contract_expand.js
index 771486ae..aee8c44f 100644
--- a/web-ui/app/js/page/pane_contract_expand.js
+++ b/web-ui/app/js/page/pane_contract_expand.js
@@ -42,7 +42,7 @@ define(['flight/lib/component', 'page/events'], function (describeComponent, eve
this.on(document, events.ui.mail.open, this.contractMiddlePaneExpandRightPane);
this.on(document, events.dispatchers.rightPane.openComposeBox, this.contractMiddlePaneExpandRightPane);
this.on(document, events.dispatchers.rightPane.openDraft, this.contractMiddlePaneExpandRightPane);
- this.on(document, events.ui.feedback.open, this.contractMiddlePaneExpandRightPane);
+ this.on(document, events.dispatchers.rightPane.openFeedbackBox, this.contractMiddlePaneExpandRightPane);
this.on(document, events.dispatchers.rightPane.openNoMessageSelected, this.expandMiddlePaneContractRightPane);
this.expandMiddlePaneContractRightPane();
});
diff --git a/web-ui/test/spec/dispatchers/right_pane_dispatcher.spec.js b/web-ui/test/spec/dispatchers/right_pane_dispatcher.spec.js
index 6622cc19..9df1d557 100644
--- a/web-ui/test/spec/dispatchers/right_pane_dispatcher.spec.js
+++ b/web-ui/test/spec/dispatchers/right_pane_dispatcher.spec.js
@@ -57,7 +57,7 @@ describeComponent('dispatchers/right_pane_dispatcher', function () {
var feedbackBox = require('mail_view/ui/feedback_box');
spyOn(feedbackBox, 'attachTo');
- this.component.trigger(document, Pixelated.events.ui.feedback.open);
+ this.component.trigger(document, Pixelated.events.dispatchers.rightPane.openFeedbackBox);
expect(feedbackBox.attachTo).toHaveBeenCalled();
});
diff --git a/web-ui/test/spec/feedback/feedback_trigger.spec.js b/web-ui/test/spec/feedback/feedback_trigger.spec.js
index 66a31781..3860fc79 100644
--- a/web-ui/test/spec/feedback/feedback_trigger.spec.js
+++ b/web-ui/test/spec/feedback/feedback_trigger.spec.js
@@ -27,7 +27,7 @@ describeComponent('feedback/feedback_trigger', function () {
it('Should trigger ui:feedback:open event on click', function () {
this.setupComponent('<nav id="feedback"></nav>', {});
- var spy = spyOnEvent(document, Pixelated.events.ui.feedback.open);
+ var spy = spyOnEvent(document, Pixelated.events.dispatchers.rightPane.openFeedbackBox);
this.$node.find('a').click();
expect(spy).toHaveBeenTriggeredOn(document);
diff --git a/web-ui/test/spec/page/pane_contract_expand.spec.js b/web-ui/test/spec/page/pane_contract_expand.spec.js
index 0320705f..6c7ebcfc 100644
--- a/web-ui/test/spec/page/pane_contract_expand.spec.js
+++ b/web-ui/test/spec/page/pane_contract_expand.spec.js
@@ -45,7 +45,7 @@ describeComponent('page/pane_contract_expand', function () {
});
it('contracts middle pane and expands right pane on open draft', function () {
- $(document).trigger(Pixelated.events.ui.feedback.open);
+ $(document).trigger(Pixelated.events.dispatchers.rightPane.openFeedbackBox);
expect($('#middle-pane-container').attr('class')).toEqual(this.component.attr.MIDDLE_PANE_CONTRACT_CLASSES);
expect($('#right-pane').attr('class')).toEqual(this.component.attr.RIGHT_PANE_EXPAND_CLASSES);