diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2014-07-07 15:38:44 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2014-07-21 12:30:23 +0200 |
commit | e60cfa28626d7e224e2b4aebbe8af8e3fdf1d1c0 (patch) | |
tree | 90ad0842df0b472a53dddaa654352dad90bdf818 /install | |
parent | 1a904708cc68f742a19036224b267d92644968fc (diff) | |
download | freeipa-e60cfa28626d7e224e2b4aebbe8af8e3fdf1d1c0.tar.gz freeipa-e60cfa28626d7e224e2b4aebbe8af8e3fdf1d1c0.tar.xz freeipa-e60cfa28626d7e224e2b4aebbe8af8e3fdf1d1c0.zip |
webui: fix add of input group class
The input-group class was added based on visibility of child elements.
This failed when it had to be determined *before* displaying the widget.
Now it's added if the buttons are not hidden by `display: none` CSS rule.
Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
Diffstat (limited to 'install')
-rw-r--r-- | install/ui/src/freeipa/widget.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js index 302b466b5..c0c580062 100644 --- a/install/ui/src/freeipa/widget.js +++ b/install/ui/src/freeipa/widget.js @@ -834,7 +834,10 @@ IPA.text_widget = function(spec) { * visible content. */ that.update_input_group_state = function() { - var visible = $(':visible', that.input_group_btn).length > 0; + var children = that.input_group_btn.children(); + var visible = $.grep(children, function(el, i) { + return $(el).css('display') !== 'none'; + }).length > 0; that.input_group.toggleClass('input-group', visible); }; |