mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Minicard sort popup, Enter button saves the new sort number
This commit is contained in:
parent
02896e669a
commit
b1b2d87045
2 changed files with 8 additions and 2 deletions
|
@ -145,7 +145,7 @@ template(name="minicard")
|
|||
if currentBoard.allowsCardSortingByNumber
|
||||
.badge
|
||||
span.badge-icon.fa.fa-sort
|
||||
span.badge-text {{ sort }}
|
||||
span.badge-text.check-list-sort {{ sort }}
|
||||
|
||||
template(name="editCardSortOrderPopup")
|
||||
input.js-edit-card-sort-popup(type='text' autofocus value=sort dir="auto")
|
||||
|
|
|
@ -68,7 +68,7 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
},
|
||||
{
|
||||
'click span.badge-icon.fa.fa-sort, click span.badge-text' : Popup.open("editCardSortOrder"),
|
||||
'click span.badge-icon.fa.fa-sort, click span.badge-text.check-list-sort' : Popup.open("editCardSortOrder"),
|
||||
}
|
||||
];
|
||||
},
|
||||
|
@ -101,6 +101,12 @@ BlazeComponent.extendComponent({
|
|||
events() {
|
||||
return [
|
||||
{
|
||||
'keydown input.js-edit-card-sort-popup'(evt) {
|
||||
// enter = save
|
||||
if (evt.keyCode === 13) {
|
||||
this.find('button[type=submit]').click();
|
||||
}
|
||||
},
|
||||
'click button.js-submit-edit-card-sort-popup'(event) {
|
||||
// save button pressed
|
||||
event.preventDefault();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue