1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-06-13 00:41:59 +03:00

Ran eslint fix on existing codebase

Had to do some manual fixing of the app.js file due to misplaced
comments
This commit is contained in:
Dan Brown
2023-04-18 22:20:02 +01:00
parent 752ee664c2
commit e711290d8b
106 changed files with 905 additions and 869 deletions

View File

@ -1,5 +1,5 @@
import {onEnterPress, onSelect} from "../services/dom";
import {Component} from "./component";
import {onEnterPress, onSelect} from '../services/dom';
import {Component} from './component';
/**
* Ajax Form
@ -11,6 +11,7 @@ import {Component} from "./component";
* otherwise will act as a fake form element.
*/
export class AjaxForm extends Component {
setup() {
this.container = this.$el;
this.responseContainer = this.container;
@ -27,7 +28,6 @@ export class AjaxForm extends Component {
}
setupListeners() {
if (this.container.tagName === 'FORM') {
this.container.addEventListener('submit', this.submitRealForm.bind(this));
return;
@ -43,7 +43,7 @@ export class AjaxForm extends Component {
submitFakeForm() {
const fd = new FormData();
const inputs = this.container.querySelectorAll(`[name]`);
const inputs = this.container.querySelectorAll('[name]');
for (const input of inputs) {
fd.append(input.getAttribute('name'), input.value);
}
@ -76,4 +76,4 @@ export class AjaxForm extends Component {
this.responseContainer.style.pointerEvents = null;
}
}
}