to table filter dropdownspull/4864/head
@@ -311,6 +311,10 @@ table#symbolsTable input[type="number"] { | |||
.footable tr:not(.footable-detail-row) > td { | |||
font-size: 11px; | |||
} | |||
.footable-dropdown-btn-group { | |||
padding: 0 20px; | |||
margin: 7px 0; | |||
} | |||
.status-table tr:last-child td:last-child { | |||
border-radius: 0 0 calc(var(--bs-border-radius) + 1px) 0; |
@@ -234,5 +234,24 @@ define(["jquery", "nprogress"], | |||
return String(string).replace(htmlEscaper, (match) => htmlEscapes[match]); | |||
}; | |||
ui.appendButtonsToFtFilterDropdown = (ftFilter) => { | |||
function button(text, classes, check) { | |||
return $("<button/>", { | |||
type: "button", | |||
class: "btn btn-xs " + classes, | |||
text: text, | |||
click: () => { | |||
const checkboxes = ftFilter.$dropdown.find(".checkbox input"); | |||
return (check) ? checkboxes.attr("checked", "checked") : checkboxes.removeAttr("checked"); | |||
} | |||
}); | |||
} | |||
$("<div/>", {class: "d-flex justify-content-between footable-dropdown-btn-group"}).append( | |||
button("Check all", "btn-secondary", true), | |||
button("Uncheck all", "btn-outline-secondary ms-1") | |||
).appendTo(ftFilter.$dropdown); | |||
}; | |||
return ui; | |||
}); |
@@ -293,6 +293,8 @@ define(["jquery", "app/common", "footable"], | |||
$.each(self.actions, (i, action) => { | |||
self.$action.append($("<option/>").text(action)); | |||
}); | |||
common.appendButtonsToFtFilterDropdown(self); | |||
}, | |||
_onStatusDropdownChanged: function (e) { | |||
const {self} = e.data; |
@@ -160,6 +160,8 @@ define(["jquery", "app/common", "footable"], | |||
$.each(self.groups, (i, group) => { | |||
self.$group.append($("<option/>").text(group)); | |||
}); | |||
common.appendButtonsToFtFilterDropdown(self); | |||
}, | |||
_onStatusDropdownChanged: function (e) { | |||
const {self} = e.data; |