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

Bootstrap 5 #242

Merged
merged 5 commits into from
Feb 14, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Modernises Javascript 🌟
  • Loading branch information
jakobvogel committed Feb 13, 2024
commit 8c14c55af559c39393458b9a2bda46da8faa599b
10 changes: 5 additions & 5 deletions src/main/resources/templates/index.html.pasta
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}

function checkBucketName() {
return new Promise(function (resolve, reject) {
return new Promise((resolve, reject) => {
// make sure we have the text field
const textfield = resolveTextfield();
if (!textfield) {
Expand All @@ -45,13 +45,13 @@
* Checks the form for errors and styles the input accordingly.
*/
function checkForm() {
checkBucketName().then(function (name) {
checkBucketName().then(name => {
// remove style class `error`
const textfield = resolveTextfield();
if (textfield) {
textfield.classList.remove('sci-border-red');
}
}).catch(function (name) {
}).catch(name => {
// add style class `error` unless empty
const textfield = resolveTextfield();
if (textfield) {
Expand All @@ -67,9 +67,9 @@
* Checks the form for errors and submits the form if everything is fine.
*/
function submitForm() {
checkBucketName().then(function (name) {
checkBucketName().then(name => {
location.href = '/ui/' + encodeURIComponent(name) + '?create'
}).catch(function () {
}).catch(() => {
// ignore, error has already been indicated while typing
});
}
Expand Down