update jquery attr into prop method for checked and disabled properties

This commit is contained in:
Florian BLOUET
2015-11-25 16:40:45 +01:00
parent 454f9d4db0
commit 5d2735cd0a
18 changed files with 78 additions and 73 deletions

View File

@@ -302,7 +302,7 @@
url: form.attr('action'),
data: form.serializeArray(),
beforeSend : function() {
submitLink.attr('disabled', true).addClass('disabled');
submitLink.prop('disabled', true).addClass('disabled');
},
success: function(datas) {
if(datas.success) {
@@ -320,7 +320,7 @@
}
},
complete: function() {
submitLink.attr('disabled', false).removeClass('disabled');
submitLink.prop('disabled', false).removeClass('disabled');
}
});
}

View File

@@ -83,7 +83,7 @@
data: {order: order},
url: '{{ path('admin_database_submit_collections_order', {'databox_id': app['request'].attributes.get('databox_id')}) }}',
beforeSend : function() {
$this.attr('disabled', true);
$this.prop('disabled',true)
},
success : function(datas) {
var html = _.template($("#alert_"+ (datas.success ? "success" : "error") +"_tpl").html(), {
@@ -92,7 +92,7 @@
$('#notification').html(html);
},
complete : function() {
$this.attr('disabled', false);
$this.prop('disabled',false)
}
});
});
@@ -118,15 +118,15 @@
var selectedIndex = select.prop("selectedIndex");
if(selectedIndex !== -1 ) {
if (selectedIndex === 0) {
upButton.attr('disabled', true);
upButton.prop('disabled', true)
} else {
upButton.attr('disabled', false);
upButton.prop('disabled', false)
}
if (selectedIndex + 1 === select.find('option').length) {
downButton.attr('disabled', true);
downButton.prop('disabled', true)
} else {
downButton.attr('disabled', false);
downButton.prop('disabled', false)
}
}
}

View File

@@ -768,9 +768,9 @@ function activer_bout(idBout,val)
if( o.length > 0 ) {
if (!val) {
o.attr("disabled", true);
o.prop('disabled', true);
} else {
o.removeAttr("disabled");
o.prop('disabled', false);
}
}
}