[fix] [minor] use prop instead of attr to disable a field

This commit is contained in:
Anand Doshi
2013-08-30 18:22:58 +05:30
parent f7e5648365
commit c8e39b0965
5 changed files with 10 additions and 10 deletions

View File

@@ -100,11 +100,11 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({
toggle_enable_brand: function() {
if(!this.filter_inputs.item_code.val()) {
this.filter_inputs.brand.removeAttr("disabled");
this.filter_inputs.brand.prop("disabled", false);
} else {
this.filter_inputs.brand
.val(this.filter_inputs.brand.get(0).opts.default_value)
.attr("disabled", "disabled");
.prop("disabled", true);
}
},

View File

@@ -115,11 +115,11 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({
toggle_enable_brand: function() {
if(!this.filter_inputs.item_code.val()) {
this.filter_inputs.brand.removeAttr("disabled");
this.filter_inputs.brand.prop("disabled", false);
} else {
this.filter_inputs.brand
.val(this.filter_inputs.brand.get(0).opts.default_value)
.attr("disabled", "disabled");
.prop("disabled", true);
}
},