misc: hide remove button when a block has a single line (#73137) #710
|
@ -2462,6 +2462,11 @@ div.timetable-widget {
|
||||||
content: "\f1f8"; // trash
|
content: "\f1f8"; // trash
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&-single {
|
||||||
|
.remove-button {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.pk-blocks-zebra {
|
.pk-blocks-zebra {
|
||||||
|
|
|
@ -728,6 +728,9 @@ $(function() {
|
||||||
$('.BlockSubWidget button.remove-button').each(function(i, elem) {
|
$('.BlockSubWidget button.remove-button').each(function(i, elem) {
|
||||||
if ($(this).parents('.BlockWidget').find('.BlockSubWidget').length == 1) {
|
if ($(this).parents('.BlockWidget').find('.BlockSubWidget').length == 1) {
|
||||||
$(this).prop('disabled', true);
|
$(this).prop('disabled', true);
|
||||||
|
$(this).parents('.BlockWidget').addClass('wcs-block-with-remove-button-single');
|
||||||
|
} else {
|
||||||
|
$(this).parents('.BlockWidget').removeClass('wcs-block-with-remove-button-single');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue