Skip to content

Commit

Permalink
Merge branch 'master' into fix-radio-validation
Browse files Browse the repository at this point in the history
  • Loading branch information
timja authored Jan 12, 2024
2 parents 0fd7d3a + dd7488b commit e7b0e1f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-Xmx1100m
-Xmx1400m
10 changes: 9 additions & 1 deletion war/src/main/js/add-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,15 @@ $.when(getItems()).done(function (data) {
if (!getFieldValidationStatus("name")) {
activateValidationMessage("#itemname-required", ".add-item-name");
setTimeout(function () {
$('input[name="name"][type="text"]', "#createItem").focus();
var parentName = $('input[name="from"]', "#createItem").val();
$.get("job/" + parentName + "/api/json?tree=name").done(
function (data) {
if (data.name === parentName) {
//if "name" is invalid, but "from" is a valid job, then switch focus to "name"
$('input[name="name"][type="text"]', "#createItem").focus();
}
},
);
}, 400);
} else {
if (getFormValidationStatus()) {
Expand Down

0 comments on commit e7b0e1f

Please sign in to comment.