From 379a9cc41f04d36538aee11839c1222d408b4f99 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 18 Nov 2010 20:17:14 -0600 Subject: SUDO Rule Search and Details Pages The search and details pages for SUDO Rule have been added. Codes that are shared with HBAC have been moved to rule.js. The following methods were renamed for consistency: - ipa_details_load() -> ipa_details_refresh() - ipa_details_display() -> ipa_details_load() The ipa_details_cache has been removed because the cache is now stored in each widget. The index.xhtml has been removed. All references to it has been changed to index.html. The Unselect All checkbox has been fixed. Unnecessary parameter 'container' has been removed. The unit test has been updated and new test data has been added. --- install/static/policy.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'install/static/policy.js') diff --git a/install/static/policy.js b/install/static/policy.js index c56e4d51..db60e10a 100644 --- a/install/static/policy.js +++ b/install/static/policy.js @@ -254,20 +254,20 @@ function ipa_records_facet(spec){ function setup(container){ + that.facet_setup(container); + that.pkey = $.bbq.getState(that.entity_name + '-pkey', true) || ''; that.record = $.bbq.getState(that.entity_name + '-record', true) || ''; - that.container = container; - - container.attr('title', that.entity_name); + that.container.attr('title', that.entity_name); var h2 = $('

',{ text: "Records for DNS Zone:" + that.pkey - }).appendTo(container); + }).appendTo(that.container); var div = $('
') - .appendTo(container); + .appendTo(that.container); var control_span =$('').appendTo(div); @@ -294,7 +294,7 @@ function ipa_records_facet(spec){ ipa_button({ 'label': IPA.messages.button.find, 'icon': 'ui-icon-search', - 'click': function(){load(container)} + 'click': function(){refresh()} }).appendTo(control_span); ipa_button({ @@ -314,7 +314,7 @@ function ipa_records_facet(spec){ var records_results = $('
', { 'class': 'records-results' - }).appendTo(container); + }).appendTo(that.container); var records_table = $('', { 'class': 'search-table' @@ -338,7 +338,7 @@ function ipa_records_facet(spec){ tr.append($('')); tr.append($('')); - load(container); + refresh(); } @@ -351,26 +351,26 @@ function ipa_records_facet(spec){ } function reload(){ - load(that.container); + refresh(); } - function load(container){ + function refresh(){ var options = {}; - var resource_filter = container.find("#dns-record-resource-filter") + var resource_filter = that.container.find("#dns-record-resource-filter") .val(); if (resource_filter){ options.idnsname = resource_filter; } - var type_filter = container.find("#dns-record-type-filter").val(); + var type_filter = that.container.find("#dns-record-type-filter").val(); if (type_filter){ options.type = type_filter; } - var data_filter = container.find("#dns-record-data-filter").val(); + var data_filter = that.container.find("#dns-record-data-filter").val(); if (data_filter){ options.data = data_filter; } @@ -449,7 +449,7 @@ function ipa_records_facet(spec){ that.create = create; that.setup = setup; - that.load = load; + that.refresh = refresh; return that; } -- cgit
Record TypeData