css: remove useless styles, hide without JS

refs #1510
This commit is contained in:
Thomas Gelf 2018-06-04 08:25:40 +02:00
parent 9b982b7e01
commit a40bd6942f
2 changed files with 10 additions and 56 deletions

View File

@ -889,17 +889,18 @@ form dd.active li.active input.related-action[type='submit'] {
form {
p.description {
color: @gray;
font-style: normal;
padding: 0.5em;
font-style: italic;
padding: 0.25em 0.5em;
display: none;
}
p.description:before {
content: '\e85b';
font-family: 'ifont';
color: @icinga-blue;
position: absolute;
margin-left: -1.5em;
margin-top: -0.25em;
dd.active {
p.description {
font-style: normal;
display: block;
height: auto;
color: @text-color;
}
}
}
@ -916,43 +917,6 @@ form.db-selector {
}
}
#layout.minimal-layout {
form p.description {
margin: 0;
border-radius: 0;
bottom: 0;
left: 0;
right: 0;
max-height: 8em;
font-size: 0.835em;
max-width: unset;
width: auto;
border-left: none;
border-right: none;
border-bottom: none;
}
}
#layout.twocols {
form {
p.description {
width: 46%;
max-width: 46%;
}
}
}
#layout.twocols &#col1 {
form {
p.description {
margin-right: auto;
right: auto;
margin-left: 2%;
left: 0;
}
}
}
#layout.twocols &#col1 {
width: 50%;
}

View File

@ -600,7 +600,6 @@
}
var $dd = $input.closest('dd');
$dd.find('p.description').show();
if ($dd.attr('id') && $dd.attr('id').match(/button/)) {
return;
}
@ -612,10 +611,6 @@
$li.addClass('active');
$dt.addClass('active');
$dd.addClass('active');
$form.find('dd').not($dd)
.find('p.description')
.hide();
},
highlightFormErrors: function($container)
@ -638,10 +633,6 @@
this.openedFieldsets[$fieldset.attr('id')] = ! $fieldset.hasClass('collapsed');
},
hideInactiveFormDescriptions: function($container) {
$container.find('dd').not('.active').find('p.description').hide();
},
beforeRender: function(ev) {
var $container = $(ev.currentTarget);
var id = $container.attr('id');
@ -704,7 +695,6 @@
this.scrollHighlightIntoView($container);
this.scrollActiveRowIntoView($container);
this.highlightActiveDashlet($container);
this.hideInactiveFormDescriptions($container);
if (iid = $container.data('activeExtensibleEntry')) {
$('#' + iid).focus();
$container.removeData('activeExtensibleEntry');