mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 13:37:09 -04:00
Fix the draft saving feature on card switching
This commit is contained in:
parent
6dbd6d0010
commit
cad7741b54
3 changed files with 6 additions and 2 deletions
|
@ -13,6 +13,7 @@ security. It also features the following improvements:
|
|||
by Sandstorm);
|
||||
* Cards multi-selection to facilitate batch actions such as moving all the cards
|
||||
of selection, or attaching a label or a member to them;
|
||||
* Automatic drafts saving synced with the server;
|
||||
* Keyboard navigation, press `?` to read the list of available shortcuts;
|
||||
* The possibility to restore archived boards, lists, and cards.
|
||||
|
||||
|
|
|
@ -102,6 +102,9 @@ BlazeComponent.extendComponent({
|
|||
_getUnsavedEditKey() {
|
||||
return {
|
||||
fieldName: 'cardDescription',
|
||||
// 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'),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -40,11 +40,11 @@ FlowRouter.route('/b/:id/:slug', {
|
|||
FlowRouter.route('/b/:boardId/:slug/:cardId', {
|
||||
name: 'card',
|
||||
action(params) {
|
||||
EscapeActions.executeUpTo('inlinedForm');
|
||||
|
||||
Session.set('currentBoard', params.boardId);
|
||||
Session.set('currentCard', params.cardId);
|
||||
|
||||
EscapeActions.executeUpTo('inlinedForm');
|
||||
|
||||
BlazeLayout.render('defaultLayout', { content: 'board' });
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue