style(js): break long lines
This commit is contained in:
parent
f54337f43e
commit
0916b3fa7c
@ -27,7 +27,9 @@ MODAL_STATES = {
|
||||
},
|
||||
"FetchError" : {
|
||||
button_disabled : false,
|
||||
message : function(parameters) { `An error occurred while contacting the server ({parameters.statusCode})` },
|
||||
message : function(parameters) {
|
||||
`An error occurred while contacting the server (${parameters.statusCode})`
|
||||
},
|
||||
},
|
||||
"ServerError" : {
|
||||
button_disabled : false,
|
||||
@ -50,7 +52,9 @@ function showModal(state_name, parameters) {
|
||||
img.src = state.icon_url;
|
||||
|
||||
let text = message.childNodes[1];
|
||||
text.textContent = " " + (state.message instanceof Function ? state.message(parameters) : state.message);
|
||||
text.textContent = " " + (state.message instanceof Function
|
||||
? state.message(parameters)
|
||||
: state.message);
|
||||
|
||||
let button = document.getElementById("close_button");
|
||||
button.disabled = state.button_disabled;
|
||||
@ -70,7 +74,8 @@ function changePasswords() {
|
||||
let query = {};
|
||||
|
||||
for (field in FIELDS) {
|
||||
query[FIELDS[field]] = document.querySelectorAll('input[name=' + FIELDS[field] + ']')[0].value;
|
||||
let selector = `input[name=${FIELDS[field]}]`;
|
||||
query[FIELDS[field]] = document.querySelectorAll(selector)[0].value;
|
||||
}
|
||||
|
||||
showModal("Wait");
|
||||
|
Loading…
Reference in New Issue
Block a user