mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-05-15 10:04:37 -04:00
Fix footer visibility and improve footer update selectors
Co-authored-by: connortechnology <925519+connortechnology@users.noreply.github.com>
This commit is contained in:
@@ -238,6 +238,7 @@ echo $navbar ?>
|
||||
data-remember-order="true"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
data-show-footer="true"
|
||||
data-toolbar="#toolbar"
|
||||
data-sort-name="Sequence"
|
||||
data-sort-order="asc"
|
||||
|
||||
@@ -5,21 +5,21 @@ var monitors = {}; // Store monitors by ID for function modal
|
||||
|
||||
// Update footer with dynamic totals
|
||||
function updateFooter(footer) {
|
||||
// Target the footer within the bootstrap-table wrapper
|
||||
var footerRow = $j('#consoleTable tfoot tr');
|
||||
|
||||
// Update monitor count (in Id column if shown)
|
||||
if ($j('tfoot .colId').length) {
|
||||
$j('tfoot .colId').html('Total: ' + footer.monitor_count);
|
||||
}
|
||||
footerRow.find('td.colId').html('Total: ' + footer.monitor_count);
|
||||
|
||||
// Update bandwidth/FPS (in Function column)
|
||||
if ($j('tfoot .colFunction').length) {
|
||||
$j('tfoot .colFunction').html(footer.bandwidth_fps);
|
||||
}
|
||||
footerRow.find('td.colFunction').html(footer.bandwidth_fps);
|
||||
|
||||
// Update event totals
|
||||
var eventPeriods = ['Total', 'Hour', 'Day', 'Week', 'Month', 'Archived'];
|
||||
eventPeriods.forEach(function(period) {
|
||||
var cell = $j('tfoot td.colEvents:eq(' + eventPeriods.indexOf(period) + ')');
|
||||
if (cell.length) {
|
||||
var eventCells = footerRow.find('td.colEvents');
|
||||
eventPeriods.forEach(function(period, index) {
|
||||
if (eventCells.length > index) {
|
||||
var cell = $j(eventCells[index]);
|
||||
var link = cell.find('a');
|
||||
if (link.length) {
|
||||
// Preserve the link but update the count
|
||||
@@ -34,9 +34,7 @@ function updateFooter(footer) {
|
||||
});
|
||||
|
||||
// Update zone count
|
||||
if ($j('tfoot .colZones').length) {
|
||||
$j('tfoot .colZones').text(footer.total_zones);
|
||||
}
|
||||
footerRow.find('td.colZones').text(footer.total_zones);
|
||||
}
|
||||
|
||||
// Called by bootstrap-table to retrieve monitor data
|
||||
|
||||
Reference in New Issue
Block a user