From d6343f4bb079eec744553078c75205abec7e692d Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Mon, 13 Jun 2011 23:18:57 -0500 Subject: 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 --- install/ui/association.js | 79 +++++++++++++---------------------------------- 1 file changed, 22 insertions(+), 57 deletions(-) (limited to 'install/ui/association.js') diff --git a/install/ui/association.js b/install/ui/association.js index 2115e0fe..8030631b 100644 --- a/install/ui/association.js +++ b/install/ui/association.js @@ -277,25 +277,6 @@ IPA.association_config = function (spec) { return that; }; - -IPA.association_pkey_setup = function (container, record) { - var other_entity = this.entity_name; - container.empty(); - var value = record[this.name]; - value = value ? value.toString() : ''; - $('', { - 'href': '#'+value, - 'html': value, - 'click': function (value) { - return function() { - IPA.nav.show_page(other_entity, 'default', value); - return false; - }; - }(value) - }).appendTo(container); -}; - - IPA.association_table_widget = function (spec) { spec = spec || {}; @@ -325,14 +306,6 @@ IPA.association_table_widget = function (spec) { return column; }; - that.super_create_column = that.create_column; - - that.create_column = function(spec){ - if (spec.link_entity){ - spec.setup = IPA.association_pkey_setup; - } - return that.super_create_column(spec); - }; /*this is duplicated in the facet... should be unified*/ var i; if (spec.columns){ @@ -363,6 +336,13 @@ IPA.association_table_widget = function (spec) { for (var i=0; i', { - 'href': '#'+value, - 'html': value, - 'click': function (value) { - return function() { - IPA.nav.show_page(that.other_entity, 'default', value); - return false; - }; - }(value) - }).appendTo(container); - }; } + that.table.set_columns(columns); + for (i=0; i