List header contains now a button to add the card to the bottom of the list

This commit is contained in:
Martin Filser 2021-11-17 00:10:39 +01:00
parent 8bc047cec3
commit 861b98ea37
3 changed files with 14 additions and 3 deletions

View file

@ -91,7 +91,7 @@
top: -7px
right: 3px
.list-header-plus-icon
.list-header-plus-icon,.list-header-plus-square-icon
color: #a6a6a6
margin-right: 15px
@ -102,7 +102,7 @@
color: #8c8c8c
font-size: 0.8em
.list-header .list-header-plus-icon, .js-open-list-menu, .list-header-menu a
.list-header .list-header-plus-icon, .list-header .list-header-plus-square-icon, .js-open-list-menu, .list-header-menu a
color #4d4d4d
padding-left 4px

View file

@ -28,6 +28,7 @@ template(name="listHeader")
div.list-header-menu
unless currentUser.isCommentOnly
if canSeeAddCard
a.js-add-card.fa.fa-plus-square.list-header-plus-square-icon(title="{{_ 'add-card-to-bottom-of-list'}}")
a.js-add-card.fa.fa-plus.list-header-plus-icon(title="{{_ 'add-card-to-top-of-list'}}")
a.fa.fa-navicon.js-open-list-menu(title="{{_ 'listActionPopup-title'}}")
else
@ -41,6 +42,7 @@ template(name="listHeader")
//if isBoardAdmin
// a.fa.js-list-star.list-header-plus-icon(class="fa-star{{#unless starred}}-o{{/unless}}")
if canSeeAddCard
a.js-add-card.fa.fa-plus-square.list-header-plus-square-icon(title="{{_ 'add-card-to-bottom-of-list'}}")
a.js-add-card.fa.fa-plus.list-header-plus-icon(title="{{_ 'add-card-to-top-of-list'}}")
a.fa.fa-navicon.js-open-list-menu(title="{{_ 'listActionPopup-title'}}")
if currentUser.isBoardAdmin

View file

@ -101,7 +101,7 @@ BlazeComponent.extendComponent({
this.starred(!this.starred());
},
'click .js-open-list-menu': Popup.open('listAction'),
'click .js-add-card'(event) {
'click .js-add-card.fa-plus'(event) {
const listDom = $(event.target).parents(
`#js-list-${this.currentData()._id}`,
)[0];
@ -110,6 +110,15 @@ BlazeComponent.extendComponent({
position: 'top',
});
},
'click .js-add-card.fa-plus-square'(event) {
const listDom = $(event.target).parents(
`#js-list-${this.currentData()._id}`,
)[0];
const listComponent = BlazeComponent.getComponentForElement(listDom);
listComponent.openForm({
position: 'bottom',
});
},
'click .js-unselect-list'() {
Session.set('currentList', null);
},