mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Force checkbox table columns to narrow width
This commit is contained in:
@ -149,6 +149,9 @@ table.attr-table td:nth-child(1) {
|
|||||||
.table-headings th {
|
.table-headings th {
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
|
td.min-width {
|
||||||
|
width: 1%;
|
||||||
|
}
|
||||||
|
|
||||||
/* Paginator */
|
/* Paginator */
|
||||||
div.paginator {
|
div.paginator {
|
||||||
|
@ -26,6 +26,12 @@ class ToggleColumn(tables.CheckBoxColumn):
|
|||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
default = kwargs.pop('default', '')
|
default = kwargs.pop('default', '')
|
||||||
visible = kwargs.pop('visible', False)
|
visible = kwargs.pop('visible', False)
|
||||||
|
if 'attrs' not in kwargs:
|
||||||
|
kwargs['attrs'] = {
|
||||||
|
'td': {
|
||||||
|
'class': 'min-width'
|
||||||
|
}
|
||||||
|
}
|
||||||
super().__init__(*args, default=default, visible=visible, **kwargs)
|
super().__init__(*args, default=default, visible=visible, **kwargs)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Reference in New Issue
Block a user