mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Remove the 'Add Swimlane' entry and replace it by a plus sign
Still need to create the swimlane right after the one that has been created
This commit is contained in:
parent
dd88eb4cc1
commit
416b17062e
7 changed files with 42 additions and 43 deletions
|
|
@ -11,6 +11,7 @@ BlazeComponent.extendComponent({
|
|||
events() {
|
||||
return [{
|
||||
'click .js-open-swimlane-menu': Popup.open('swimlaneAction'),
|
||||
'click .js-open-add-swimlane-menu': Popup.open('swimlaneAdd'),
|
||||
submit: this.editTitle,
|
||||
}];
|
||||
},
|
||||
|
|
@ -23,3 +24,30 @@ Template.swimlaneActionPopup.events({
|
|||
Popup.close();
|
||||
},
|
||||
});
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
events() {
|
||||
return [{
|
||||
submit(evt) {
|
||||
evt.preventDefault();
|
||||
const titleInput = this.find('.swimlane-name-input');
|
||||
const title = titleInput.value.trim();
|
||||
if (title) {
|
||||
Swimlanes.insert({
|
||||
title,
|
||||
boardId: Session.get('currentBoard'),
|
||||
// XXX we should insert the swimlane right after the caller
|
||||
sort: $('.swimlane').length,
|
||||
});
|
||||
|
||||
titleInput.value = '';
|
||||
titleInput.focus();
|
||||
}
|
||||
// XXX ideally, we should move the popup to the newly
|
||||
// created swimlane so a user can add more than one swimlane
|
||||
// with a minimum of interactions
|
||||
Popup.close();
|
||||
},
|
||||
}];
|
||||
},
|
||||
}).register('swimlaneAddPopup');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue