summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-07-07 15:38:44 +0200
committerPetr Vobornik <pvoborni@redhat.com>2014-07-21 12:30:23 +0200
commite60cfa28626d7e224e2b4aebbe8af8e3fdf1d1c0 (patch)
tree90ad0842df0b472a53dddaa654352dad90bdf818 /install
parent1a904708cc68f742a19036224b267d92644968fc (diff)
downloadfreeipa-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.js5
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);
};