Skip to content
Permalink
Browse files
[JENKINS-33755] Better usage of focus behavior
  • Loading branch information
recena committed Apr 1, 2016
1 parent ef08dc1 commit 9f2f827023c4074875ce2fb28d2313b54861c764
Showing 1 changed file with 0 additions and 3 deletions.
@@ -121,7 +121,6 @@ $.when(getItems()).done(function(data){
cleanValidationMessages('.add-item-copy');
if (isItemNameEmpty()) {
activateValidationMessage('#itemname-required', '.add-item-name');
$('input[name="name"][type="text"]', '#createItem').focus();
}
}
$item.click(setSelectState);
@@ -170,15 +169,13 @@ $.when(getItems()).done(function(data){
var message = parseResponseFromCheckJobName(data);
if (message !== '') {
activateValidationMessage('#itemname-invalid', '.add-item-name', message);
$('input[name="name"][type="text"]', '#createItem').focus();
} else {
cleanValidationMessages('.add-item-name');
showInputHelp('.add-item-name');
}
});
} else {
activateValidationMessage('#itemname-required', '.add-item-name');
$('input[name="name"][type="text"]', '#createItem').focus();
}
});

0 comments on commit 9f2f827

Please sign in to comment.