summaryrefslogtreecommitdiffstats
path: root/client/components/lists/events.js
blob: f636de75f73bb9550ecd455410bbeb6430a2af47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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 = '';
    }
  }
});