Merge pull request #4195 from mfilser/list_header_add_card_to_bottom_of_the_list

List header contains now a button to add the card to the bottom of the list
This commit is contained in:
Lauri Ojansivu 2021-11-29 21:43:53 +02:00 committed by GitHub
commit b8a976d4ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 7 deletions

View file

@ -876,7 +876,7 @@ setBoardClear(color1,color2)
padding: 10px
top: 0
.list-header .list-header-plus-icon
.list-header .list-header-plus-top
color: #a6a6a6
.list-body

View file

@ -91,7 +91,7 @@
top: -7px
right: 3px
.list-header-plus-icon
.list-header-plus-top
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-top, .js-open-list-menu, .list-header-menu a
color #4d4d4d
padding-left 4px

View file

@ -28,7 +28,7 @@ template(name="listHeader")
div.list-header-menu
unless currentUser.isCommentOnly
if canSeeAddCard
a.js-add-card.fa.fa-plus.list-header-plus-icon(title="{{_ 'add-card-to-top-of-list'}}")
a.js-add-card.fa.fa-plus.list-header-plus-top(title="{{_ 'add-card-to-top-of-list'}}")
a.fa.fa-navicon.js-open-list-menu(title="{{_ 'listActionPopup-title'}}")
else
a.list-header-menu-icon.fa.fa-angle-right.js-select-list
@ -39,9 +39,9 @@ template(name="listHeader")
div.list-header-menu
unless currentUser.isCommentOnly
//if isBoardAdmin
// a.fa.js-list-star.list-header-plus-icon(class="fa-star{{#unless starred}}-o{{/unless}}")
// a.fa.js-list-star.list-header-plus-top(class="fa-star{{#unless starred}}-o{{/unless}}")
if canSeeAddCard
a.js-add-card.fa.fa-plus.list-header-plus-icon(title="{{_ 'add-card-to-top-of-list'}}")
a.js-add-card.fa.fa-plus.list-header-plus-top(title="{{_ 'add-card-to-top-of-list'}}")
a.fa.fa-navicon.js-open-list-menu(title="{{_ 'listActionPopup-title'}}")
if currentUser.isBoardAdmin
if isShowDesktopDragHandles
@ -55,6 +55,13 @@ template(name="editListTitleForm")
a.fa.fa-times-thin.js-close-inlined-form
template(name="listActionPopup")
ul.pop-over-list
li
a.js-add-card.list-header-plus-bottom
i.fa.fa-plus
i.fa.fa-arrow-down
| {{_ 'add-card-to-bottom-of-list'}}
hr
ul.pop-over-list
li
a.js-toggle-watch-list

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.list-header-plus-top'(event) {
const listDom = $(event.target).parents(
`#js-list-${this.currentData()._id}`,
)[0];
@ -141,6 +141,14 @@ Template.listActionPopup.helpers({
Template.listActionPopup.events({
'click .js-list-subscribe'() {},
'click .js-add-card.list-header-plus-bottom'(event) {
const listDom = $(`#js-list-${this._id}`)[0];
const listComponent = BlazeComponent.getComponentForElement(listDom);
listComponent.openForm({
position: 'bottom',
});
Popup.back();
},
'click .js-set-color-list': Popup.open('setListColor'),
'click .js-select-cards'() {
const cardIds = this.allCards().map(card => card._id);