From ffeafa6ec2974de5e3f2303fa8ffccf1638e9254 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Fri, 12 Apr 2013 17:29:29 +0200 Subject: Replace IPA.facet_builder with facets.builder https://fedorahosted.org/freeipa/ticket/3235 --- install/ui/src/freeipa/entity.js | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) (limited to 'install/ui/src/freeipa/entity.js') diff --git a/install/ui/src/freeipa/entity.js b/install/ui/src/freeipa/entity.js index 2d0e97f8..e20efc0f 100644 --- a/install/ui/src/freeipa/entity.js +++ b/install/ui/src/freeipa/entity.js @@ -21,7 +21,8 @@ * along with this program. If not, see . */ -define(['./ipa', './jquery', './text', './facet'], function(IPA, $, text) { +define(['./ipa', './jquery', './text', './facets', './facet'], + function(IPA, $, text, facet_reg) { IPA.entity = function(spec) { @@ -117,12 +118,26 @@ IPA.entity = function(spec) { that.facet_groups.empty(); }; + that.add_redirect_info = function(facet_name) { + if (!that.redirect_facet && facet_name){ + that.redirect_facet = facet_name; + } + }; + that.get_facet = function(name) { + var i, facets; + //build all facets on the first time if(!that.facets_created) { - var builder = IPA.facet_builder(that); - builder.build_facets(); + facets = facet_reg.builder.build(that.facet_specs, { entity: that }); + for (i=0; i