summaryrefslogtreecommitdiffstats
path: root/client/components/lists/events.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/lists/events.js')
-rw-r--r--client/components/lists/events.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/client/components/lists/events.js b/client/components/lists/events.js
new file mode 100644
index 00000000..f636de75
--- /dev/null
+++ b/client/components/lists/events.js
@@ -0,0 +1,16 @@
+Template.addlistForm.events({
+ submit: function(event, t) {
+ event.preventDefault();
+ var title = t.find('.list-name-input');
+ if ($.trim(title.value)) {
+ Lists.insert({
+ title: title.value,
+ boardId: Session.get('currentBoard'),
+ sort: $('.list').length
+ });
+
+ Utils.Scroll('.js-lists').left(270, true);
+ title.value = '';
+ }
+ }
+});