Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autofocus input field after submitting new item #2310

Merged
merged 3 commits into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/pi-hole/js/customcname.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ function addCustomCNAME() {
$("#domain").val("");
$("#target").val("");
table.ajax.reload();
$("#domain").focus();
} else {
utils.showAlert("error", "fas fa-times", "Failure! Something went wrong", response.message);
}
Expand Down
1 change: 1 addition & 0 deletions scripts/pi-hole/js/customdns.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ function addCustomDNS() {
$("#domain").val("");
$("#ip").val("");
table.ajax.reload();
$("#domain").focus();
} else {
utils.showAlert("error", "fas fa-times", "Failure! Something went wrong", response.message);
}
Expand Down
1 change: 1 addition & 0 deletions scripts/pi-hole/js/groups-adlists.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ function addAdlist() {
$("#new_comment").val("");
table.ajax.reload();
table.rows().deselect();
$("#new_address").focus();
} else {
utils.showAlert("error", "", "Error while adding new adlist: ", response.message);
}
Expand Down
1 change: 1 addition & 0 deletions scripts/pi-hole/js/groups-domains.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ function addDomain() {
wildcardEl.prop("checked", false);
table.ajax.reload(null, false);
table.rows().deselect();
domainEl.focus();
} else {
utils.showAlert("error", "", "Error while adding new " + domainRegex, response.message);
}
Expand Down
1 change: 1 addition & 0 deletions scripts/pi-hole/js/groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ function addGroup() {
$("#new_desc").val("");
table.ajax.reload();
table.rows().deselect();
$("#new_name").focus();
} else {
utils.showAlert("error", "", "Error while adding new group", response.message);
}
Expand Down