Skip to content

Commit 7428d54

Browse files
committed
lint fix
1 parent b9d5137 commit 7428d54

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

src/public/js/horwood.js

+14-20
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
window.onblur= function() {window.onfocus= function () {location.reload(true)}};
1+
window.onblur = function () { window.onfocus = function () { location.reload(true); }; };
22

33
function openModal(elementID, form_elementID = false, form_hidden = false) {
4-
window.onblur='';
4+
window.onblur = '';
55
const list = document.getElementById(elementID).classList;
6-
list.add("Modal_ModalOpen__xRwYI");
7-
list.remove("Modal_ModalClose__3Cav6");
8-
document.addEventListener("keyup", (e) => {
9-
if (e.key === "Escape") {
6+
list.add('Modal_ModalOpen__xRwYI');
7+
list.remove('Modal_ModalClose__3Cav6');
8+
document.addEventListener('keyup', (e) => {
9+
if (e.key === 'Escape') {
1010
CloseModal(elementID, form_elementID, form_hidden);
1111
}
1212
});
1313
}
1414
function CloseModal(elementID, form_elementID = false, form_hidden = false) {
15-
window.onblur= function() {window.onfocus= function () {location.reload(true)}};
15+
window.onblur = function () { window.onfocus = function () { location.reload(true); }; };
1616
const list = document.getElementById(elementID).classList;
17-
list.add("Modal_ModalClose__3Cav6");
18-
list.remove("Modal_ModalOpen__xRwYI");
19-
if(form_elementID !== false && form_hidden !== false){
20-
document.getElementById( form_elementID ).reset();
21-
document.getElementById( form_hidden ).value = "none";
17+
list.add('Modal_ModalClose__3Cav6');
18+
list.remove('Modal_ModalOpen__xRwYI');
19+
if (form_elementID !== false && form_hidden !== false) {
20+
document.getElementById(form_elementID).reset();
21+
document.getElementById(form_hidden).value = 'none';
2222
}
2323
}
2424

25-
function show_file_upload(form_elementID, icon_mdi, icon_file){
25+
function show_file_upload(form_elementID, icon_mdi, icon_file) {
2626
document.getElementById(icon_mdi).style = 'display: none';
2727
document.getElementById(icon_file).style = '';
28-
document.getElementById( form_elementID ).enctype = 'multipart/form-data';
28+
document.getElementById(form_elementID).enctype = 'multipart/form-data';
2929
}
3030

3131
function sendData(data, url) {
@@ -55,12 +55,6 @@ function sendData(data, url) {
5555
// Add the required HTTP header for form data POST requests
5656
XHR.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
5757

58-
// XHR.onload = () => {
59-
// if (XHR.readyState === XHR.DONE && XHR.status === 200) {
60-
// console.log(XHR.response, XHR.responseXML);
61-
// }
62-
// };
63-
6458
// Finally, send our data.
6559
XHR.send(urlEncodedData);
6660
}

0 commit comments

Comments
 (0)