diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2011-12-07 10:34:15 -0600 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2011-12-09 15:55:02 +0100 |
commit | b70ebe5c9f718d184ae6a60931fdccf0e22b9c48 (patch) | |
tree | f1c7339c3939131750d053fa6b511ec777f5a996 /install/ui/facet.js | |
parent | a1c9e3618c9d0e03fc926031f2c65d92da7a8b03 (diff) | |
download | freeipa.git-b70ebe5c9f718d184ae6a60931fdccf0e22b9c48.tar.gz freeipa.git-b70ebe5c9f718d184ae6a60931fdccf0e22b9c48.tar.xz freeipa.git-b70ebe5c9f718d184ae6a60931fdccf0e22b9c48.zip |
Fixed matched/unmatched checkboxes in HBAC Test
The checkboxes in HBAC Test run page have been fixed to show/hide
matched or unmatched rules. The New Test button has been fixed to
deselect the inputs in all facets. The test data has been updated
as well.
Ticket #388
Diffstat (limited to 'install/ui/facet.js')
-rw-r--r-- | install/ui/facet.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/install/ui/facet.js b/install/ui/facet.js index df5743b1..e16ee670 100644 --- a/install/ui/facet.js +++ b/install/ui/facet.js @@ -107,7 +107,7 @@ IPA.facet = function(spec) { that.load = function(data) { that.data = data; - that.header.load(data.result.result); + that.header.load(data); }; that.refresh = function() { @@ -367,6 +367,8 @@ IPA.facet_header = function(spec) { }; that.load = function(data) { + if (!data) return; + var result = data.result.result; if (!that.facet.disable_facet_tabs) { var pkey = that.facet.pkey; @@ -392,7 +394,7 @@ IPA.facet_header = function(spec) { var facet = facets[j]; var link = $('li[name='+facet.name+'] a', span); - var values = data ? data[facet.name] : null; + var values = result ? result[facet.name] : null; if (values) { link.text(facet.label+' ('+values.length+')'); } else { @@ -472,6 +474,13 @@ IPA.table_facet = function(spec) { that.load = function(data) { that.facet_load(data); + if (!data) { + that.table.empty(); + that.table.summary.text(''); + that.table.pagination_control.css('visibility', 'hidden'); + return; + } + that.table.current_page = 1; that.table.total_pages = 1; @@ -483,6 +492,8 @@ IPA.table_facet = function(spec) { that.table.current_page_input.val(that.table.current_page); that.table.total_pages_span.text(that.table.total_pages); + + that.table.pagination_control.css('visibility', 'visible'); }; |