wekan/client/components/swimlanes/swimlaneHeader.js

26 lines
589 B
JavaScript
Raw Normal View History

2018-02-01 13:10:30 -03:00
BlazeComponent.extendComponent({
editTitle(evt) {
evt.preventDefault();
const newTitle = this.childComponents('inlinedForm')[0].getValue().trim();
const swimlane = this.currentData();
if (newTitle) {
swimlane.rename(newTitle.trim());
}
},
events() {
return [{
2018-02-01 14:23:27 -03:00
'click .js-open-swimlane-menu': Popup.open('swimlaneAction'),
2018-02-01 13:10:30 -03:00
submit: this.editTitle,
}];
},
}).register('swimlaneHeader');
2018-02-01 14:23:27 -03:00
Template.swimlaneActionPopup.events({
'click .js-close-swimlane' (evt) {
evt.preventDefault();
this.archive();
Popup.close();
},
});