mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
parent
22b8b6ab20
commit
018bb343b5
6 changed files with 65 additions and 62 deletions
|
|
@ -12,18 +12,18 @@ template(name="boardComponent")
|
|||
each lists
|
||||
+list(this)
|
||||
if currentUser.isBoardMember
|
||||
+addlistForm
|
||||
+addListForm
|
||||
+boardSidebar
|
||||
if currentCard
|
||||
+cardSidebar(currentCard)
|
||||
else
|
||||
+message(label="board-no-found")
|
||||
|
||||
template(name="addlistForm")
|
||||
template(name="addListForm")
|
||||
.list.js-list.add-list.js-add-list
|
||||
+inlinedForm(autoclose=false)
|
||||
input.list-name-input(type="text" placeholder="{{_ 'add-list'}}"
|
||||
autocomplete="off" autofocus)
|
||||
autocomplete="off" autofocus value=getCache)
|
||||
div.edit-controls.clearfix
|
||||
button.primary.confirm.js-save-edit(type="submit") {{_ 'save'}}
|
||||
a.fa.fa-times.dark-hover.cancel.js-close-inlined-form
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
|
||||
openNewListForm: function() {
|
||||
this.componentChildren('addlistForm')[0].open();
|
||||
this.componentChildren('addListForm')[0].open();
|
||||
},
|
||||
|
||||
scrollLeft: function() {
|
||||
|
|
@ -60,11 +60,29 @@ BlazeComponent.extendComponent({
|
|||
|
||||
BlazeComponent.extendComponent({
|
||||
template: function() {
|
||||
return 'addlistForm';
|
||||
return 'addListForm';
|
||||
},
|
||||
|
||||
// Proxy
|
||||
open: function() {
|
||||
this.componentChildren('inlinedForm')[0].open();
|
||||
},
|
||||
|
||||
events: function() {
|
||||
return [{
|
||||
submit: function(evt) {
|
||||
evt.preventDefault();
|
||||
var title = this.find('.list-name-input');
|
||||
if ($.trim(title.value)) {
|
||||
Lists.insert({
|
||||
title: title.value,
|
||||
boardId: Session.get('currentBoard'),
|
||||
sort: $('.list').length
|
||||
});
|
||||
|
||||
title.value = '';
|
||||
}
|
||||
}
|
||||
}];
|
||||
}
|
||||
}).register('addlistForm');
|
||||
}).register('addListForm');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue