summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeiichi Hikita <keiichi.hikita@ntt.com>2017-05-31 09:18:04 +0900
committerRob Cresswell <robert.cresswell@outlook.com>2017-07-15 19:05:33 +0000
commit352be501fc6ea0b71710a77e77e92d8ff4aaa2f0 (patch)
tree4ea4041783b5f805bcf7b394b7052d17d31244d4
parent56810d347f29815db09dac50f82193c20b659541 (diff)
downloadhorizon-352be501fc6ea0b71710a77e77e92d8ff4aaa2f0.tar.gz
There is problem in UpdateRow of Horizon page.
If we do some resource action(e.g. create/update/delete ...), UpdateRow will be started. And then resource status will be updated automatically in front-end. But in case removing resource, number of resource that displayed on both above and bottom of table will not be updated correctly. I fixed update_footer_count function in horizon.tables.js. This function only updates number of resource in footer field. (tfoot span.table_count) But we also need to update header field. (thead span.table_count) So I add header update logic into this file. Change-Id: Idc4330fe779b62607ada39a9db3637de82d014f7 Closes-Bug: #1694207 (cherry picked from commit 5b2fe409edb6ffc3b03f28eab71aa6cb141a33d6)
-rw-r--r--horizon/static/horizon/js/horizon.tables.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/horizon/static/horizon/js/horizon.tables.js b/horizon/static/horizon/js/horizon.tables.js
index 611acb37e..dfea1529b 100644
--- a/horizon/static/horizon/js/horizon.tables.js
+++ b/horizon/static/horizon/js/horizon.tables.js
@@ -459,7 +459,7 @@ $.tablesorter.addParser({
horizon.datatables.update_footer_count = function (el, modifier) {
var $el = $(el),
- $browser, $footer, row_count, footer_text_template, footer_text;
+ $browser, $header, $footer, row_count, footer_text_template, footer_text;
if (!modifier) {
modifier = 0;
}
@@ -469,6 +469,7 @@ horizon.datatables.update_footer_count = function (el, modifier) {
$footer = $browser.find('.tfoot span.content_table_count');
}
else {
+ $header = $el.find('thead span.table_count');
$footer = $el.find('tfoot span.table_count');
}
row_count = $el.find('tbody tr:visible').length + modifier - $el.find('.empty').length;
@@ -478,6 +479,7 @@ horizon.datatables.update_footer_count = function (el, modifier) {
} else {
footer_text = '';
}
+ $header.text(footer_text);
$footer.text(footer_text);
return row_count;
};