Fix to put lengthy descriptions to a nice details element

This commit is contained in:
Ilia Ross
2025-07-05 16:38:55 +03:00
parent 2e245a1035
commit 4d417ea4bf
2 changed files with 13 additions and 5 deletions

View File

@ -422,6 +422,10 @@ details.ui_hidden_table_start > summary::-webkit-details-marker {
color: #a1acc0;
}
details.on-hover:not(:hover) summary::after {
visibility: hidden !important;
}
details.inline {
cursor: pointer;
padding: 0;

View File

@ -336,7 +336,6 @@ elsif ($init_mode eq "systemd" && $access{'bootup'}) {
&ui_link("edit_systemd.cgi?new=1", $text{'index_sadd'}) );
print &ui_links_row(\@links);
print &ui_columns_start([ "", $text{'systemd_name'},
$text{'systemd_desc'},
$text{'systemd_type'},
$text{'systemd_status'},
$text{'systemd_boot'},
@ -357,12 +356,17 @@ elsif ($init_mode eq "systemd" && $access{'bootup'}) {
else {
$type = '';
}
my $title = ($u->{'boot'} == -1 ?
&html_escape($sname) :
&ui_link($l, &html_escape($sname)));
my $desc = &html_escape($u->{'desc'});
print &ui_columns_row([
&ui_checkbox("d", $u->{'name'}, undef),
$u->{'boot'} == -1 ?
&html_escape($sname) :
&ui_link($l, &html_escape($sname)),
&html_escape($u->{'desc'}),
!$desc ? $title : &ui_details({
class => 'inline on-hover',
html => 1,
title => $title,
content => $desc}),
$type,
$u->{'fullstatus'} || "<i>$text{'index_unknown'}</i>",
$u->{'boot'} == 1 ?