mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 00:10:13 +01:00
Prettier & eslint project style update
This commit is contained in:
parent
a0a482aa8e
commit
3eb4d2c341
116 changed files with 6216 additions and 5240 deletions
|
|
@ -48,35 +48,43 @@ InlinedForm = BlazeComponent.extendComponent({
|
|||
},
|
||||
|
||||
events() {
|
||||
return [{
|
||||
'click .js-close-inlined-form': this.close,
|
||||
'click .js-open-inlined-form': this.open,
|
||||
return [
|
||||
{
|
||||
'click .js-close-inlined-form': this.close,
|
||||
'click .js-open-inlined-form': this.open,
|
||||
|
||||
// Pressing Ctrl+Enter should submit the form
|
||||
'keydown form textarea'(evt) {
|
||||
if (evt.keyCode === 13 && (evt.metaKey || evt.ctrlKey)) {
|
||||
this.find('button[type=submit]').click();
|
||||
}
|
||||
},
|
||||
// Pressing Ctrl+Enter should submit the form
|
||||
'keydown form textarea'(evt) {
|
||||
if (evt.keyCode === 13 && (evt.metaKey || evt.ctrlKey)) {
|
||||
this.find('button[type=submit]').click();
|
||||
}
|
||||
},
|
||||
|
||||
// Close the inlined form when after its submission
|
||||
submit() {
|
||||
if (this.currentData().autoclose !== false) {
|
||||
Tracker.afterFlush(() => {
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
// Close the inlined form when after its submission
|
||||
submit() {
|
||||
if (this.currentData().autoclose !== false) {
|
||||
Tracker.afterFlush(() => {
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
}];
|
||||
];
|
||||
},
|
||||
}).register('inlinedForm');
|
||||
|
||||
// Press escape to close the currently opened inlinedForm
|
||||
EscapeActions.register('inlinedForm',
|
||||
() => { currentlyOpenedForm.get().close(); },
|
||||
() => { return currentlyOpenedForm.get() !== null; }, {
|
||||
EscapeActions.register(
|
||||
'inlinedForm',
|
||||
() => {
|
||||
currentlyOpenedForm.get().close();
|
||||
},
|
||||
() => {
|
||||
return currentlyOpenedForm.get() !== null;
|
||||
},
|
||||
{
|
||||
enabledOnClick: false,
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
// submit on click outside
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue