diff --git a/install/ui/aci.js b/install/ui/aci.js index 959636b87..e9599d56c 100644 --- a/install/ui/aci.js +++ b/install/ui/aci.js @@ -2,6 +2,7 @@ /* Authors: * Adam Young + * Endi S. Dewata * * Copyright (C) 2010 Red Hat * see file 'COPYING' for use and warranty information @@ -23,49 +24,35 @@ /* REQUIRES: ipa.js, details.js, search.js, add.js, entity.js */ -/*TODO Merge this code into the attribtue table widget */ -IPA.populate_attribute_table = function (table, entity){ - var attr_per_col = 400; - var aciattrs = IPA.metadata[entity].aciattrs; - var col_span = aciattrs.length / attr_per_col + 1; +IPA.attribute_table_widget = function(spec) { - $('tbody tr', table).remove(); + spec = spec || {}; - var tbody = $('tbody',table); - var td; - for (var a = 0; a < aciattrs.length ; a += 1){ - var aci_tr = $('').appendTo(tbody); + var that = IPA.checkboxes_widget(spec); - td = $('').appendTo(aci_tr); - td.append($('',{ - type:"checkbox", - id:'aciattr-'+aciattrs[a].toLowerCase(), - "class":'aci-attribute' - })); - td = $('').appendTo(aci_tr); - td.append($('