From b9ad279ad2d8d93dd501115a028783cf8fe7fcbd Mon Sep 17 00:00:00 2001 From: Adam Young Date: Wed, 19 Jan 2011 12:26:14 -0500 Subject: rename static to ui Directory rename --- install/ui/aci.js | 876 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 876 insertions(+) create mode 100644 install/ui/aci.js (limited to 'install/ui/aci.js') diff --git a/install/ui/aci.js b/install/ui/aci.js new file mode 100644 index 00000000..85cfcaa8 --- /dev/null +++ b/install/ui/aci.js @@ -0,0 +1,876 @@ +/*jsl:import ipa.js */ + +/* 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($('