mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
#1233 Added plus button to add card on top of the list
This commit is contained in:
parent
5f697eac05
commit
3fa969eb26
3 changed files with 15 additions and 12 deletions
|
|
@ -69,13 +69,16 @@
|
||||||
padding-left: 10px
|
padding-left: 10px
|
||||||
color: #a6a6a6
|
color: #a6a6a6
|
||||||
|
|
||||||
.list-header-menu-icon
|
.list-header-menu
|
||||||
position: absolute
|
position: absolute
|
||||||
padding: 7px
|
padding: 7px
|
||||||
margin-top: 1px
|
margin-top: 1px
|
||||||
top: -@padding
|
top: -@padding
|
||||||
right: -@padding
|
right: -@padding
|
||||||
|
|
||||||
|
.list-header-plus-icon
|
||||||
|
color: #a6a6a6
|
||||||
|
|
||||||
.list-body
|
.list-body
|
||||||
flex: 1
|
flex: 1
|
||||||
display: flex
|
display: flex
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,9 @@ template(name="listHeader")
|
||||||
if currentUser.isBoardMember
|
if currentUser.isBoardMember
|
||||||
if isWatching
|
if isWatching
|
||||||
i.list-header-watch-icon.fa.fa-eye
|
i.list-header-watch-icon.fa.fa-eye
|
||||||
a.list-header-menu-icon.fa.fa-navicon.js-open-list-menu
|
div.list-header-menu
|
||||||
|
a.js-add-card.fa.fa-plus.list-header-plus-icon
|
||||||
|
a.fa.fa-navicon.js-open-list-menu
|
||||||
|
|
||||||
template(name="editListTitleForm")
|
template(name="editListTitleForm")
|
||||||
.list-composer
|
.list-composer
|
||||||
|
|
@ -28,10 +30,9 @@ template(name="listActionPopup")
|
||||||
unless currentUser.isCommentOnly
|
unless currentUser.isCommentOnly
|
||||||
hr
|
hr
|
||||||
ul.pop-over-list
|
ul.pop-over-list
|
||||||
li: a.js-add-card {{_ 'add-card'}}
|
|
||||||
if cards.count
|
if cards.count
|
||||||
li: a.js-select-cards {{_ 'list-select-cards'}}
|
li: a.js-select-cards {{_ 'list-select-cards'}}
|
||||||
hr
|
hr
|
||||||
ul.pop-over-list
|
ul.pop-over-list
|
||||||
li: a.js-close-list {{_ 'archive-list'}}
|
li: a.js-close-list {{_ 'archive-list'}}
|
||||||
hr
|
hr
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,13 @@ BlazeComponent.extendComponent({
|
||||||
events() {
|
events() {
|
||||||
return [{
|
return [{
|
||||||
'click .js-open-list-menu': Popup.open('listAction'),
|
'click .js-open-list-menu': Popup.open('listAction'),
|
||||||
|
'click .js-add-card' () {
|
||||||
|
const listDom = document.getElementById(`js-list-${this.currentData()._id}`);
|
||||||
|
const listComponent = BlazeComponent.getComponentForElement(listDom);
|
||||||
|
listComponent.openForm({
|
||||||
|
position: 'top',
|
||||||
|
});
|
||||||
|
},
|
||||||
submit: this.editTitle,
|
submit: this.editTitle,
|
||||||
}];
|
}];
|
||||||
},
|
},
|
||||||
|
|
@ -36,14 +43,6 @@ Template.listActionPopup.helpers({
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.listActionPopup.events({
|
Template.listActionPopup.events({
|
||||||
'click .js-add-card' () {
|
|
||||||
const listDom = document.getElementById(`js-list-${this._id}`);
|
|
||||||
const listComponent = BlazeComponent.getComponentForElement(listDom);
|
|
||||||
listComponent.openForm({
|
|
||||||
position: 'top',
|
|
||||||
});
|
|
||||||
Popup.close();
|
|
||||||
},
|
|
||||||
'click .js-list-subscribe' () {},
|
'click .js-list-subscribe' () {},
|
||||||
'click .js-select-cards' () {
|
'click .js-select-cards' () {
|
||||||
const cardIds = this.allCards().map((card) => card._id);
|
const cardIds = this.allCards().map((card) => card._id);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue