hideMask only modify input-group on first parent

Otherwise when unhiding (e.g. for Network type alias), input-group gets
added to every div up the DM hierarchy and the layout gets messed up.
This commit is contained in:
Phil Davis 2016-05-11 13:44:45 +09:30 committed by Chris Buechler
parent 60ec2d7a6f
commit f212adc8f4

View File

@ -143,11 +143,11 @@ function hideMask(name, hide) {
if(hide) {
$('[id^=' + name + ']').hide();
$('[id^=' + name + ']').prev('span').hide();
$('[id^=' + name + ']').parents('div').removeClass('input-group');
$('[id^=' + name + ']').parent('div').removeClass('input-group');
} else {
$('[id^=' + name + ']').show();
$('[id^=' + name + ']').prev('span').show();
$('[id^=' + name + ']').parents('div').addClass('input-group');
$('[id^=' + name + ']').parent('div').addClass('input-group');
}
}