mirror of
https://github.com/wekan/wekan.git
synced 2026-02-23 16:34:06 +01:00
wip card description save
This commit is contained in:
parent
84d51393e4
commit
0f65e06338
6 changed files with 2380 additions and 4 deletions
|
|
@ -23,7 +23,11 @@ BlazeComponent.extendComponent({
|
|||
this.data().setDescription(description);
|
||||
},
|
||||
// Pressing Ctrl+Enter should submit the form
|
||||
'keydown form textarea'(evt) {
|
||||
// was keydown
|
||||
// extraevent for saving input. buffer of keydown vs buffer time
|
||||
'keyup form textarea'(evt) {
|
||||
const description = this.getInput()[0].value;
|
||||
this.data().setDescription(description);
|
||||
if (evt.keyCode === 13 && (evt.metaKey || evt.ctrlKey)) {
|
||||
const submitButton = this.find('button[type=submit]');
|
||||
if (submitButton) {
|
||||
|
|
|
|||
|
|
@ -1710,10 +1710,16 @@ BlazeComponent.extendComponent({
|
|||
EscapeActions.register(
|
||||
'detailsPane',
|
||||
() => {
|
||||
//save description editing on EscapeAction
|
||||
if (document.getElementsByClassName("editor js-new-description-input").item(0))
|
||||
{
|
||||
Utils.getCurrentCard().setDescription(document.getElementsByClassName("editor js-new-description-input").item(0).value);
|
||||
}
|
||||
if (Session.get('cardDetailsIsDragging')) {
|
||||
// Reset dragging status as the mouse landed outside the cardDetails template area and this will prevent a mousedown event from firing
|
||||
Session.set('cardDetailsIsDragging', false);
|
||||
Session.set('cardDetailsIsMouseDown', false);
|
||||
|
||||
} else {
|
||||
// Prevent close card when the user is selecting text and moves the mouse cursor outside the card detail area
|
||||
Utils.goBoardId(Session.get('currentBoard'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue