mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 07:50:12 +01:00
Minicard, sort number can be edited in a popup
This commit is contained in:
parent
df5b76aa87
commit
02896e669a
3 changed files with 31 additions and 1 deletions
|
|
@ -146,3 +146,8 @@ template(name="minicard")
|
|||
.badge
|
||||
span.badge-icon.fa.fa-sort
|
||||
span.badge-text {{ sort }}
|
||||
|
||||
template(name="editCardSortOrderPopup")
|
||||
input.js-edit-card-sort-popup(type='text' autofocus value=sort dir="auto")
|
||||
.edit-controls.clearfix
|
||||
button.primary.confirm.js-submit-edit-card-sort-popup(type="submit") {{_ 'save'}}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,9 @@ BlazeComponent.extendComponent({
|
|||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
'click span.badge-icon.fa.fa-sort, click span.badge-text' : Popup.open("editCardSortOrder"),
|
||||
}
|
||||
];
|
||||
},
|
||||
}).register('minicard');
|
||||
|
|
@ -93,3 +96,24 @@ Template.minicard.helpers({
|
|||
}
|
||||
},
|
||||
});
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
events() {
|
||||
return [
|
||||
{
|
||||
'click button.js-submit-edit-card-sort-popup'(event) {
|
||||
// save button pressed
|
||||
event.preventDefault();
|
||||
const sort = this.$('.js-edit-card-sort-popup')[0]
|
||||
.value
|
||||
.trim();
|
||||
if (!Number.isNaN(sort)) {
|
||||
let card = this.data();
|
||||
card.move(card.boardId, card.swimlaneId, card.listId, sort);
|
||||
Popup.close();
|
||||
}
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
}).register('editCardSortOrderPopup');
|
||||
|
|
|
|||
|
|
@ -1085,5 +1085,6 @@
|
|||
"history": "History",
|
||||
"request": "Request",
|
||||
"requests": "Requests",
|
||||
"help-request": "Help Request"
|
||||
"help-request": "Help Request",
|
||||
"editCardSortOrderPopup-title": "Change Sorting"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue