diff options
author | Endi S. Dewata <edewata@redhat.com> | 2011-06-13 23:18:57 -0500 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2011-06-16 11:51:25 -0400 |
commit | d6343f4bb079eec744553078c75205abec7e692d (patch) | |
tree | ef49a79fbfff427da1e086da15f59cd75f6f9b83 /install/ui/entity.js | |
parent | 724dd997447c84c6eb3893fe40fb2c5a78d4efd7 (diff) | |
download | freeipa-d6343f4bb079eec744553078c75205abec7e692d.tar.gz freeipa-d6343f4bb079eec744553078c75205abec7e692d.tar.xz freeipa-d6343f4bb079eec744553078c75205abec7e692d.zip |
Fixed self-service links.
In self-service mode the user's association facets have been modified
such that the entries are not linked since the only available entity
is the user entity.
A 'link' parameter has been added to IPA.association_facet and
IPA.column to control whether to link the entries. The link_handler()
method can be used to define how to handle the link.
Ticket #1072
Diffstat (limited to 'install/ui/entity.js')
-rw-r--r-- | install/ui/entity.js | 29 |
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; |