From 1717d638fc69d38ac5ed848847c7b01601c910dc Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 23 Jun 2011 11:44:44 -0500 Subject: Added record count into association facet tabs. The details and association facets have been modified to show the number of records in each association in the corresponding facet tab. Ticket #1386 --- install/ui/details.js | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'install/ui/details.js') diff --git a/install/ui/details.js b/install/ui/details.js index 2db80fba..3b73e5b4 100644 --- a/install/ui/details.js +++ b/install/ui/details.js @@ -321,14 +321,14 @@ IPA.details_facet = function(spec) { var pkey = IPA.get_entity(that.entity_name).get_primary_key_prefix(); - if (from_url){ + if (from_url) { pkey.push(that.pkey); - }else{ + } else { var pkey_name = IPA.metadata.objects[that.entity_name].primary_key; - var pkey_val = that.record[pkey_name]; - if (pkey_val instanceof Array){ - pkey.push( pkey_val[0]); - }else{ + var pkey_val = that.data[pkey_name]; + if (pkey_val instanceof Array) { + pkey.push(pkey_val[0]); + } else { pkey.push(pkey_val); } } @@ -528,12 +528,13 @@ IPA.details_facet = function(spec) { return false; }; - that.load = function(record) { - that.record = record; + that.load = function(data) { + that.facet_load(data); + var sections = that.sections.values; for (var i=0; i