From 8df520294048f8a286fc98205c7a672b08feb04c Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Sat, 29 Jan 2011 14:25:56 -0600 Subject: Fixed permission reset and is_dirty. The reset and is_dirty functionality for permission has been fixed. New widgets have been created for select and a collection of checkboxes. New test data files have been added for each target type. --- install/ui/aci.js | 572 +++++++++----- install/ui/details.js | 40 +- install/ui/test/data/permission_find.json | 864 +-------------------- install/ui/test/data/permission_show.json | 20 +- install/ui/test/data/permission_show_filter.json | 38 + install/ui/test/data/permission_show_subtree.json | 38 + .../ui/test/data/permission_show_targetgroup.json | 38 + install/ui/test/data/permission_show_type.json | 43 + install/ui/widget.js | 182 ++++- 9 files changed, 766 insertions(+), 1069 deletions(-) create mode 100644 install/ui/test/data/permission_show_filter.json create mode 100644 install/ui/test/data/permission_show_subtree.json create mode 100644 install/ui/test/data/permission_show_targetgroup.json create mode 100644 install/ui/test/data/permission_show_type.json (limited to 'install') 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($('