summaryrefslogtreecommitdiffstats
path: root/install/static/policy.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-11-18 20:17:14 -0600
committerEndi Sukma Dewata <edewata@redhat.com>2010-11-19 16:53:30 -0500
commit379a9cc41f04d36538aee11839c1222d408b4f99 (patch)
tree266b4f51f95a60921ce7b15df5698cb1bfb4f96b /install/static/policy.js
parentd4f25453e116ca132208e99d5e320500efbe5d9c (diff)
downloadfreeipa-379a9cc41f04d36538aee11839c1222d408b4f99.tar.gz
freeipa-379a9cc41f04d36538aee11839c1222d408b4f99.tar.xz
freeipa-379a9cc41f04d36538aee11839c1222d408b4f99.zip
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.
Diffstat (limited to 'install/static/policy.js')
-rw-r--r--install/static/policy.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/install/static/policy.js b/install/static/policy.js
index c56e4d512..db60e10a3 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 = $('<h2></h2>',{
text: "Records for DNS Zone:" + that.pkey
- }).appendTo(container);
+ }).appendTo(that.container);
var div = $('<div class="search-controls"></div>')
- .appendTo(container);
+ .appendTo(that.container);
var control_span =$('<span class="record-filter"></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 = $('<div/>', {
'class': 'records-results'
- }).appendTo(container);
+ }).appendTo(that.container);
var records_table = $('<table/>', {
'class': 'search-table'
@@ -338,7 +338,7 @@ function ipa_records_facet(spec){
tr.append($('<th>Record Type</th>'));
tr.append($('<th>Data</th>'));
- 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;
}