summaryrefslogtreecommitdiff
path: root/web-ui/app/js/page
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/app/js/page')
-rw-r--r--web-ui/app/js/page/default.js16
-rw-r--r--web-ui/app/js/page/events.js5
-rw-r--r--web-ui/app/js/page/pane_contract_expand.js1
-rw-r--r--web-ui/app/js/page/version.js31
4 files changed, 51 insertions, 2 deletions
diff --git a/web-ui/app/js/page/default.js b/web-ui/app/js/page/default.js
index 1571202e..1189d1ad 100644
--- a/web-ui/app/js/page/default.js
+++ b/web-ui/app/js/page/default.js
@@ -42,7 +42,11 @@ define(
'views/recipientListFormatter',
'flight/lib/logger',
'page/logout',
- 'page/logout_shortcut'
+ 'page/logout_shortcut',
+ 'feedback/feedback_trigger',
+ 'mail_view/ui/feedback_box',
+ 'mail_view/data/feedback_sender',
+ 'page/version',
],
function (
@@ -72,7 +76,11 @@ define(
recipientListFormatter,
withLogging,
logout,
- logoutShortcut) {
+ logoutShortcut,
+ feedback,
+ feedbackBox,
+ feedbackSender,
+ version) {
'use strict';
function initialize(path) {
@@ -105,6 +113,10 @@ define(
offCanvas.attachTo(document);
logout.attachTo('#logout');
logoutShortcut.attachTo('#logout-shortcut');
+ version.attachTo('.version');
+
+ feedback.attachTo('#feedback');
+ feedbackSender.attachTo(document);
}
return initialize;
diff --git a/web-ui/app/js/page/events.js b/web-ui/app/js/page/events.js
index dfc2b852..cfc3d7db 100644
--- a/web-ui/app/js/page/events.js
+++ b/web-ui/app/js/page/events.js
@@ -100,6 +100,10 @@ define(function () {
highlightResults: 'search:highlightResults',
resetHighlight: 'search:resetHighlight'
},
+ feedback: {
+ submit: 'feedback:submit',
+ submitted: 'feedback:submitted'
+ },
mail: {
here: 'mail:here',
want: 'mail:want',
@@ -169,6 +173,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 153e38e5..aee8c44f 100644
--- a/web-ui/app/js/page/pane_contract_expand.js
+++ b/web-ui/app/js/page/pane_contract_expand.js
@@ -42,6 +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.dispatchers.rightPane.openFeedbackBox, this.contractMiddlePaneExpandRightPane);
this.on(document, events.dispatchers.rightPane.openNoMessageSelected, this.expandMiddlePaneContractRightPane);
this.expandMiddlePaneContractRightPane();
});
diff --git a/web-ui/app/js/page/version.js b/web-ui/app/js/page/version.js
new file mode 100644
index 00000000..e5299f52
--- /dev/null
+++ b/web-ui/app/js/page/version.js
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2015 ThoughtWorks, Inc.
+ *
+ * Pixelated is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Pixelated is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
+ */
+define(['flight/lib/component', 'views/templates'], function (defineComponent, templates) {
+ 'use strict';
+
+ return defineComponent(function () {
+
+ this.render = function () {
+ this.$node.html(templates.page.version());
+ };
+
+ this.after('initialize', function () {
+ this.render();
+ });
+
+ });
+});