diff options
author | Bryan Drewery <bryan@shatow.net> | 2017-07-06 21:35:33 +0300 |
---|---|---|
committer | Bryan Drewery <bryan@shatow.net> | 2017-07-06 21:35:33 +0300 |
commit | 76709b8575cf79cf0b6a3a0acc13fe797dcc8039 (patch) | |
tree | 2c6ce5a3718519193a712b7a525b8179436cc18a /src/share/poudriere/html | |
parent | c298c10cf57c6780f79210c1b0ca54686af0dffc (diff) |
HTML Remaining: Hide table if there's no [more] data.
Fixes #511
Issue #386
Diffstat (limited to 'src/share/poudriere/html')
-rw-r--r-- | src/share/poudriere/html/assets/poudriere.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/share/poudriere/html/assets/poudriere.js b/src/share/poudriere/html/assets/poudriere.js index d18ffe76..45a832a7 100644 --- a/src/share/poudriere/html/assets/poudriere.js +++ b/src/share/poudriere/html/assets/poudriere.js @@ -656,8 +656,6 @@ function process_data_build(data) { return; } } else { - $('#' + status + '_div').show(); - $('#nav_' + status).removeClass('disabled'); n = 0; } for (; n < data.ports[status].length; n++) { @@ -679,6 +677,13 @@ function process_data_build(data) { $('#' + status + '_table').DataTable().clear().draw(); $('#' + status + '_table').DataTable().rows.add(table_rows) .draw(false); + if (table_rows.length > 0) { + $('#' + status + '_div').show(); + $('#nav_' + status).removeClass('disabled'); + } else { + $('#' + status + '_div').hide(); + $('#nav_' + status).addClass('disabled'); + } } } }); |