mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Allow swimlane creation from template
Mix lists with same name to avoid duplicates
This commit is contained in:
parent
f888cfd565
commit
60be4df76e
10 changed files with 100 additions and 35 deletions
|
|
@ -40,6 +40,11 @@ template(name="swimlaneAddPopup")
|
|||
autocomplete="off" autofocus)
|
||||
.edit-controls.clearfix
|
||||
button.primary.confirm(type="submit") {{_ 'add'}}
|
||||
unless currentBoard.isTemplatesBoard
|
||||
unless currentBoard.isTemplateBoard
|
||||
span.quiet
|
||||
| {{_ 'or'}}
|
||||
a.js-swimlane-template {{_ 'template'}}
|
||||
|
||||
template(name="setSwimlaneColorPopup")
|
||||
form.edit-label
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ BlazeComponent.extendComponent({
|
|||
// with a minimum of interactions
|
||||
Popup.close();
|
||||
},
|
||||
'click .js-swimlane-template': Popup.open('searchElement'),
|
||||
}];
|
||||
},
|
||||
}).register('swimlaneAddPopup');
|
||||
|
|
|
|||
|
|
@ -154,8 +154,8 @@ BlazeComponent.extendComponent({
|
|||
|
||||
BlazeComponent.extendComponent({
|
||||
onCreated() {
|
||||
currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
this.isListTemplatesSwimlane = currentBoard.isTemplatesBoard() && this.currentData().isListTemplatesSwimlane();
|
||||
this.currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
this.isListTemplatesSwimlane = this.currentBoard.isTemplatesBoard() && this.currentData().isListTemplatesSwimlane();
|
||||
this.currentSwimlane = this.currentData();
|
||||
},
|
||||
|
||||
|
|
@ -176,14 +176,14 @@ BlazeComponent.extendComponent({
|
|||
boardId: Session.get('currentBoard'),
|
||||
sort: $('.list').length,
|
||||
type: (this.isListTemplatesSwimlane)?'template-list':'list',
|
||||
swimlaneId: (this.isListTemplatesSwimlane)?this.currentSwimlane._id:'',
|
||||
swimlaneId: (this.currentBoard.isTemplatesBoard())?this.currentSwimlane._id:'',
|
||||
});
|
||||
|
||||
titleInput.value = '';
|
||||
titleInput.focus();
|
||||
}
|
||||
},
|
||||
'click .js-list-template': Popup.open('searchCard'),
|
||||
'click .js-list-template': Popup.open('searchElement'),
|
||||
}];
|
||||
},
|
||||
}).register('addListForm');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue