From dde15772700da41ec931bb55087fbec6f30fab55 Mon Sep 17 00:00:00 2001 From: Adam Young Date: Tue, 7 Sep 2010 10:08:19 -0400 Subject: associations -Refactored the associations code into a set of objects that are configured by the entities -Added support for associations that can be done in a single rpc -hostgroup to host and group to user associations working -Restructed sampledata so that the file is matched automatically by the RPC method name -The new ipa_cmd/sampledata scheme insists on there being sample data for any commands or the ipa_command fails. -Added sampledata files for all the calls we make -renamed several of the sampledata files to match their rpc calls -Started a pattern of refactoring where all the forms for the entity fall under a single object --- install/static/details.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'install/static/details.js') diff --git a/install/static/details.js b/install/static/details.js index 40d36b6b..e291b49f 100644 --- a/install/static/details.js +++ b/install/static/details.js @@ -40,7 +40,7 @@ var _ipa_load_on_fail_callback = null; var ipa_details_cache = null; -function ipa_details_load(pkey, on_win, on_fail,sampleData) +function ipa_details_load(pkey, on_win, on_fail) { if (!pkey) return; @@ -50,7 +50,7 @@ function ipa_details_load(pkey, on_win, on_fail,sampleData) ipa_cmd( 'show', [pkey], {all: true}, _ipa_load_on_win, _ipa_load_on_fail, - _ipa_obj_name, sampleData ); + _ipa_obj_name); } function _ipa_load_on_win(data, text_status, xhr) @@ -439,12 +439,12 @@ function _h2_on_click(obj) } } -function DetailsForm(obj, details_list, pkeyCol, sampleData ){ +function DetailsForm(obj, details_list, pkeyCol, facets ){ this.obj = obj; this.details_list = details_list; - this.sampleData = sampleData; this.pkeyCol = pkeyCol; + this.facets = facets; this.setup= function(key){ //re initialize global parse of parameters @@ -452,9 +452,11 @@ function DetailsForm(obj, details_list, pkeyCol, sampleData ){ showDetails(); $('h1').text("Managing " + this.obj +": " +qs['pkey'] ); + setupFacetNavigation(this.obj,qs.pkey,qs.facet,this.facets); + ipa_details_init(this.obj); ipa_details_create(this.details_list, $('#details')); - ipa_details_load(qs.pkey, on_win, null, this.sampleData); + ipa_details_load(qs.pkey, on_win, null); } } -- cgit