summaryrefslogtreecommitdiffstats
path: root/install/ui/entity.js
diff options
context:
space:
mode:
Diffstat (limited to 'install/ui/entity.js')
-rw-r--r--install/ui/entity.js29
1 files changed, 13 insertions, 16 deletions
diff --git a/install/ui/entity.js b/install/ui/entity.js
index 599bd2eec..783cfcbda 100644
--- a/install/ui/entity.js
+++ b/install/ui/entity.js
@@ -819,32 +819,29 @@ IPA.entity_builder = function(){
return that;
};
- that.standard_association_facets = function() {
+ that.standard_association_facets = function(spec) {
+
+ spec = spec || {};
var attribute_members = entity.metadata.attribute_members;
for (var attribute_member in attribute_members) {
- that.association_facets(attribute_member);
- }
-
- return that;
- };
- that.association_facets = function(attribute_member) {
+ var other_entities = entity.metadata.attribute_members[attribute_member];
- var other_entities = entity.metadata.attribute_members[attribute_member];
+ for (var i=0; i<other_entities.length; i++) {
- for (var i=0; i<other_entities.length; i++) {
+ var other_entity = other_entities[i];
+ var association_name = attribute_member+'_'+other_entity;
- var other_entity = other_entities[i];
- var association_name = attribute_member+'_'+other_entity;
+ var facet = entity.get_facet(association_name);
+ if (facet) continue;
- var facet = entity.get_facet(association_name);
- if (facet) continue;
+ var tmp_spec = $.extend({}, spec);
+ tmp_spec.name = association_name;
- that.association_facet({
- name: association_name
- });
+ that.association_facet(tmp_spec);
+ }
}
return that;