mirror of
https://github.com/wekan/wekan.git
synced 2026-02-11 18:54:22 +01:00
Card Details, description edit is now saved at popup
This commit is contained in:
parent
125c84b6b5
commit
fb66b84b58
5 changed files with 36 additions and 11 deletions
|
|
@ -537,6 +537,13 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
}).register('cardDetails');
|
||||
|
||||
Template.cardDetailsPopup.helpers({
|
||||
popupCard() {
|
||||
const ret = Utils.getPopupCard();
|
||||
return ret;
|
||||
},
|
||||
});
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
template() {
|
||||
return 'exportCard';
|
||||
|
|
@ -587,16 +594,15 @@ Template.editCardSortOrderForm.onRendered(function () {
|
|||
// XXX Recovering the currentCard identifier form a session variable is
|
||||
// fragile because this variable may change for instance if the route
|
||||
// change. We should use some component props instead.
|
||||
docId: Session.get('currentCard'),
|
||||
docId: Utils.getCurrentCardId(),
|
||||
};
|
||||
}
|
||||
|
||||
close(isReset = false) {
|
||||
if (this.isOpen.get() && !isReset) {
|
||||
const draft = this.getValue().trim();
|
||||
if (
|
||||
draft !== Cards.findOne(Session.get('currentCard')).getDescription()
|
||||
) {
|
||||
let card = Utils.getCurrentCard();
|
||||
if (card && draft !== card.getDescription()) {
|
||||
UnsavedEdits.set(this._getUnsavedEditKey(), this.getValue());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue