/* Authors: * Adam Young * * Copyright (C) 2010 Red Hat * see file 'COPYING' for use and warranty information * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; version 2 only * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* 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; $('tbody tr', table).remove(); var tbody = $('tbody',table); var td; for (var a = 0; a < aciattrs.length ; a += 1){ var aci_tr = $('').appendTo(tbody); td = $('').appendTo(aci_tr); td.append($('',{ type:"checkbox", id:'aciattr-'+aciattrs[a].toLowerCase(), "class":'aci-attribute' })); td.append($('