summaryrefslogtreecommitdiffstats
path: root/client/lib/inlinedform.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-06-29 07:47:57 -0400
committerLauri Ojansivu <x@xet7.org>2019-06-29 07:47:57 -0400
commitb84dc20ded0375d9ab14ec05c78b737398d76b83 (patch)
treec3b91b3657299c779e941a1257df17bb0eade866 /client/lib/inlinedform.js
parent100288b3e1bce882ab9923a5bff7b5f620f33ee8 (diff)
parent3eb4d2c341b712268bd321173909e0a7b19a88c9 (diff)
downloadwekan-b84dc20ded0375d9ab14ec05c78b737398d76b83.tar.gz
wekan-b84dc20ded0375d9ab14ec05c78b737398d76b83.tar.bz2
wekan-b84dc20ded0375d9ab14ec05c78b737398d76b83.zip
Merge branch 'linting' of https://github.com/justinr1234/wekan into justinr1234-linting
Diffstat (limited to 'client/lib/inlinedform.js')
-rw-r--r--client/lib/inlinedform.js50
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