diff options
author | Justin Reynolds <justinr1234@gmail.com> | 2019-06-28 12:52:09 -0500 |
---|---|---|
committer | Justin Reynolds <justinr1234@gmail.com> | 2019-06-28 12:56:51 -0500 |
commit | 3eb4d2c341b712268bd321173909e0a7b19a88c9 (patch) | |
tree | 25a8fcb088f3984e72a5bd3ded9e6a45376e0693 /client/lib/inlinedform.js | |
parent | a0a482aa8efb3255a523de4524c8e09453d5571f (diff) | |
download | wekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.tar.gz wekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.tar.bz2 wekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.zip |
Prettier & eslint project style update
Diffstat (limited to 'client/lib/inlinedform.js')
-rw-r--r-- | client/lib/inlinedform.js | 50 |
1 files changed, 29 insertions, 21 deletions
diff --git a/client/lib/inlinedform.js b/client/lib/inlinedform.js index d33786ae..f2ebe31e 100644 --- a/client/lib/inlinedform.js +++ b/client/lib/inlinedform.js @@ -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 |