mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-28 01:41:14 -06:00
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>
This commit is contained in:
parent
1a904708cc
commit
e60cfa2862
@ -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);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user