diff --git a/install/static/Makefile.am b/install/static/Makefile.am index 8e4981984..40d3b521b 100644 --- a/install/static/Makefile.am +++ b/install/static/Makefile.am @@ -8,6 +8,7 @@ SUBDIRS = \ appdir = $(IPA_DATA_DIR)/static app_DATA = \ + aci.js \ add.js \ associate.js \ ipa_logo_180x50.png \ diff --git a/install/static/aci.js b/install/static/aci.js new file mode 100644 index 000000000..d536e34f7 --- /dev/null +++ b/install/static/aci.js @@ -0,0 +1,868 @@ +/* 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($('