summaryrefslogtreecommitdiffstats
path: root/client/components/boards/body.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/boards/body.js')
-rw-r--r--client/components/boards/body.js24
1 files changed, 21 insertions, 3 deletions
diff --git a/client/components/boards/body.js b/client/components/boards/body.js
index 2b4baf53..78566f2e 100644
--- a/client/components/boards/body.js
+++ b/client/components/boards/body.js
@@ -4,7 +4,7 @@ BlazeComponent.extendComponent({
},
openNewListForm: function() {
- this.componentChildren('addlistForm')[0].open();
+ this.componentChildren('addListForm')[0].open();
},
scrollLeft: function() {
@@ -60,11 +60,29 @@ BlazeComponent.extendComponent({
BlazeComponent.extendComponent({
template: function() {
- return 'addlistForm';
+ return 'addListForm';
},
// Proxy
open: function() {
this.componentChildren('inlinedForm')[0].open();
+ },
+
+ events: function() {
+ return [{
+ submit: function(evt) {
+ evt.preventDefault();
+ var title = this.find('.list-name-input');
+ if ($.trim(title.value)) {
+ Lists.insert({
+ title: title.value,
+ boardId: Session.get('currentBoard'),
+ sort: $('.list').length
+ });
+
+ title.value = '';
+ }
+ }
+ }];
}
-}).register('addlistForm');
+}).register('addListForm');