diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2012-07-26 11:17:28 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2012-08-02 10:27:17 +0200 |
commit | c2783b9b54ecae8299da0dc593c3813c2bd26fe2 (patch) | |
tree | 8d43ff1b23545ea58a20bbc911f82f23a455acd2 /install/ui/hbactest.js | |
parent | 1a94109f4ad5bcb304c4c23af868c3cf07ce92ec (diff) | |
download | freeipa.git-c2783b9b54ecae8299da0dc593c3813c2bd26fe2.tar.gz freeipa.git-c2783b9b54ecae8299da0dc593c3813c2bd26fe2.tar.xz freeipa.git-c2783b9b54ecae8299da0dc593c3813c2bd26fe2.zip |
Replace use of attr with prop for booleans
Recommened way of setting boolean HTML attributes is by $.prop(boolean) method not $.attr(boolean) because it sets DOM object property not an attribute. Latter works because of jquery's backward compatibility. This patch makes things clearer.
Some info about prop and attr: http://stackoverflow.com/a/5876747
https://fedorahosted.org/freeipa/ticket/2817
Diffstat (limited to 'install/ui/hbactest.js')
-rw-r--r-- | install/ui/hbactest.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/install/ui/hbactest.js b/install/ui/hbactest.js index 373ff39b..4b666ef2 100644 --- a/install/ui/hbactest.js +++ b/install/ui/hbactest.js @@ -279,7 +279,7 @@ IPA.hbac.test_select_facet = function(spec) { that.table.set_values = function(values) { if (values && values.length && values[0] === '__external__') { - if (that.external_radio) that.external_radio.attr('checked', true); + if (that.external_radio) that.external_radio.prop('checked', true); } else { that.table.table_set_values(values); } @@ -393,7 +393,7 @@ IPA.hbac.test_select_facet = function(spec) { that.reset = function() { delete that.selected_values; - if (that.external_radio) that.external_radio.attr('checked', false); + if (that.external_radio) that.external_radio.prop('checked', false); if (that.external_text) that.external_text.val(''); }; @@ -482,8 +482,8 @@ IPA.hbac.test_rules_facet = function(spec) { that.reset = function() { delete that.selected_values; - if (that.enabled) that.enabled.attr('checked', false); - if (that.disabled) that.disabled.attr('checked', false); + if (that.enabled) that.enabled.prop('checked', false); + if (that.disabled) that.disabled.prop('checked', false); }; that.save = function(record) { @@ -655,8 +655,8 @@ IPA.hbac.test_run_facet = function(spec) { delete that.data; that.show_matched = true; that.show_unmatched = true; - if (that.matched_checkbox) that.matched_checkbox.attr('checked', true); - if (that.unmatched_checkbox) that.unmatched_checkbox.attr('checked', true); + if (that.matched_checkbox) that.matched_checkbox.prop('checked', true); + if (that.unmatched_checkbox) that.unmatched_checkbox.prop('checked', true); that.refresh(); }; |