mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 07:20:12 +01:00
25 lines
549 B
JavaScript
25 lines
549 B
JavaScript
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');
|