events.js 389 B

12345678910111213141516
  1. Template.addlistForm.events({
  2. submit: function(event, t) {
  3. event.preventDefault();
  4. var title = t.find('.list-name-input');
  5. if ($.trim(title.value)) {
  6. Lists.insert({
  7. title: title.value,
  8. boardId: Session.get('currentBoard'),
  9. sort: $('.list').length
  10. });
  11. Utils.Scroll('.js-lists').left(270, true);
  12. title.value = '';
  13. }
  14. }
  15. });