blob: 014cfd8072639af6051bb25e7a82aae50497c1a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
BlazeComponent.extendComponent({
template: function() {
return 'listHeader';
},
editTitle: function(evt) {
evt.preventDefault();
var form = this.componentChildren('inlinedForm')[0];
var newTitle = form.getValue();
if ($.trim(newTitle)) {
Lists.update(this.currentData()._id, {
$set: {
title: newTitle
}
});
}
},
events: function() {
return [{
'click .js-open-list-menu': Popup.open('listAction'),
submit: this.editTitle
}];
}
}).register('listHeader');
|