diff options
author | Endi S. Dewata <edewata@redhat.com> | 2010-11-19 11:38:35 -0600 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2010-11-22 15:28:42 -0500 |
commit | 27d8529a840bb1f54e520ccd70bf7c2113d03069 (patch) | |
tree | 7f798d63d259f2b85039212917123999ad8555c3 /install/static/hbacsvc.js | |
parent | 861a0fdba9c07d612d6a220b6ec5cf5eb3c24e46 (diff) | |
download | freeipa-27d8529a840bb1f54e520ccd70bf7c2113d03069.tar.gz freeipa-27d8529a840bb1f54e520ccd70bf7c2113d03069.tar.xz freeipa-27d8529a840bb1f54e520ccd70bf7c2113d03069.zip |
Fixed action panel queries
Previously the queries for action panel were done globally. Since each
entity container has its own action panel, the queries will return multiple
results. This is fixed by qualifying the query to run within the entity
container.
The query has also been moved into ipa_facet.get_action_panel(). Entities
that do not have their own entity container (e.g. HBAC services and service
groups) will need to override this method to get the action panel from the
right entity container (e.g. HBAC rules).
The facet.setup_views() has been renamed to facet.create_action_panel().
New test data for SUDO rules have been added.
Diffstat (limited to 'install/static/hbacsvc.js')
-rwxr-xr-x | install/static/hbacsvc.js | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/install/static/hbacsvc.js b/install/static/hbacsvc.js index 012c92a3..13135da2 100755 --- a/install/static/hbacsvc.js +++ b/install/static/hbacsvc.js @@ -26,8 +26,6 @@ function ipa_hbacsvc() { 'name': 'hbacsvc' }); - that.superior_init = that.superior('init'); - that.init = function() { var dialog = ipa_hbacsvc_add_dialog({ @@ -49,7 +47,7 @@ function ipa_hbacsvc() { }); that.add_facet(facet); - that.superior_init(); + that.entity_init(); }; return that; @@ -82,22 +80,21 @@ function ipa_hbacsvc_search_facet(spec) { var that = ipa_search_facet(spec); - that.superior_init = that.superior('init'); - that.superior_create = that.superior('create'); - that.superior_setup = that.superior('setup'); + that.get_action_panel = function() { + return $('#hbac .action-panel'); + }; that.init = function() { that.create_column({name:'cn', label:'Service', primary_key: true}); that.create_column({name:'description', label:'Description'}); - that.superior_init(); + that.search_facet_init(); }; that.create = function(container) { - var entity_container = $('#' + that.entity_name); - var action_panel = $('.action-panel', entity_container); + var action_panel = that.get_action_panel(); var ul = $('ul', action_panel); @@ -123,7 +120,7 @@ function ipa_hbacsvc_search_facet(spec) { } }).appendTo(ul); - that.superior_create(container); + that.search_facet_create(container); // TODO: replace with IPA.metadata[that.entity_name].label container.children().last().prepend( @@ -149,6 +146,10 @@ function ipa_hbacsvc_details_facet(spec) { that.superior_create = that.superior('create'); that.superior_setup = that.superior('setup'); + that.get_action_panel = function() { + return $('#hbac .action-panel'); + }; + that.init = function() { var section = ipa_details_list_section({ |