/* Any typing in the input apart from enter key is going to invalidate
* the value that has been set by selecting a suggestion from the typeahead
*/
- newBuildProjectInput.keyup(function(event) {
+ newBuildProjectInput.on('input', function(event) {
if (event.keyCode == 13)
return;
newBuildProjectSaveBtn.attr("disabled", "disabled");
});
- newBuildTargetInput.keyup(function() {
+ newBuildTargetInput.on('input', function() {
if ($(this).val().length == 0)
newBuildTargetBuildBtn.attr("disabled", "disabled");
else
enable_import_btn(true);
}
- vcsURLInput.keyup(function() {
+ vcsURLInput.on('input', function() {
check_form();
});
- gitRefInput.keyup(function() {
+ gitRefInput.on('input', function() {
check_form();
});
- layerNameInput.keyup(function() {
+ layerNameInput.on('input', function() {
if ($(this).val() && !validLayerName.test($(this).val())){
layerNameCtrl.addClass("error")
$("#invalid-layer-name-hint").show();
});
/* Disable the change button when we have no data in the input */
- $("dl input, dl textarea").keyup(function() {
+ $("dl input, dl textarea").on("input",function() {
if ($(this).val().length == 0)
$(this).parent().children(".change-btn").attr("disabled", "disabled");
else
$('.btn-primary').attr('disabled', 'disabled');
// enable submit button when all required fields are populated
- $("input#new-project-name").keyup(function() {
+ $("input#new-project-name").on('input', function() {
if ($("input#new-project-name").val().length > 0 ){
$('.btn-primary').removeAttr('disabled');
$(".help-inline").css('visibility','hidden');
});
});
- $(".js-new-config_var").keyup(function(){
+ $(".js-new-config_var").on('input', function(){
if ($(this).val().length == 0) {
$(".js-apply-change-config_var").attr("disabled","disabled");
}
});
});
- $("#new-distro").keyup(function(){
+ $("#new-distro").on('input', function(){
if ($(this).val().length == 0) {
$("#apply-change-distro").attr("disabled","disabled");
}
});
});
- $("#new-image_install").keyup(function(){
+ $("#new-image_install").on('input', function(){
if ($(this).val().length == 0) {
$("#apply-change-image_install").attr("disabled","disabled");
}
});
//activate / deactivate save added variable button
- $("#variable, #value").keyup(function() {
+ $("#variable, #value").on('input', function() {
if ( $("#variable").val().length > 0 && $("#value").val().trim().length > 0 ) {
$(".save").removeAttr("disabled");
}