diff options
author | Adam Young <ayoung@redhat.com> | 2010-10-25 19:55:57 -0400 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2010-12-20 23:32:06 -0500 |
commit | 07ace112afeaadade0ca372fe23a9432c2c9780f (patch) | |
tree | 6442a26960fd1d07087a90f28292f419cc3dbd71 /install/static/details.js | |
parent | fc4ce7dc8c2102561396e4987ff6357bb79bf524 (diff) | |
download | freeipa.git-07ace112afeaadade0ca372fe23a9432c2c9780f.tar.gz freeipa.git-07ace112afeaadade0ca372fe23a9432c2c9780f.tar.xz freeipa.git-07ace112afeaadade0ca372fe23a9432c2c9780f.zip |
aci ui
Implements the role, privilege, permission, delegation and selfservice entities ui.
Targetgroup has been added to the object types.
The groups lists need to be filter. The filter is currently hidden, with a
hyperlink that reads 'filter' to unhide it. Each keystroke in this filter
performs an AJAX request to the server.
There are bugs on the server side that block some of the functionality from
completing
Creating a Permission requires one of 4 target types. The add dialog in this
version assumes the user will want to create a filter type. They can change
this on the edit page.
Most search results come back with the values as arrays, but ACIs seem not to.
Search and details both required special code to handle non-arrays.
The unit tests now make use of the 'module' aspect of QUnit. This means that
future unit test will also need to specify the module. The advantage is that
multiple tests can share a common setup and teardown.
Bugs that need to be fixed before this works 100% are
https://fedorahosted.org/freeipa/ticket/634
https://fedorahosted.org/freeipa/ticket/633
Diffstat (limited to 'install/static/details.js')
-rw-r--r-- | install/static/details.js | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/install/static/details.js b/install/static/details.js index 28de8975..1aeffb1d 100644 --- a/install/static/details.js +++ b/install/static/details.js @@ -79,6 +79,15 @@ function ipa_details_field(spec) { } if (that.values) { + /* + Too much logic currently assumes an array. + This is true everywhere but ACIs. */ + + if (!(that.values instanceof Array)){ + that.values = [that.values]; + } + + dd = ipa_create_first_dd(that.name); dd.append(ipa_details_field_create_input.call(that, that.values[0], hint_span, rights, 0)); dd.appendTo(that.container); @@ -165,6 +174,7 @@ function ipa_details_section(spec){ field.entity_name = that.entity_name; that.fields.push(field); that.fields_by_name[field.name] = field; + return field; }; that.create_field = function(spec) { @@ -396,6 +406,7 @@ function ipa_details_facet(spec) { section.entity_name = that.entity_name; that.sections.push(section); that.sections_by_name[section.name] = section; + return section; }; that.create_section = function(spec) { @@ -413,7 +424,11 @@ function ipa_details_facet(spec) { that.get_primary_key = function() { var pkey_name = IPA.metadata[that.entity_name].primary_key; - return that.record[pkey_name][0]; + if (that.record[pkey_name] instanceof Array){ + return that.record[pkey_name][0]; + }else{ + return that.record[pkey_name]; + } }; that.get_section_header_prefix = function(visible) { @@ -631,6 +646,11 @@ function ipa_details_update(on_win, on_fail) for (var i=0; i<that.sections.length; i++) { var section = that.sections[i]; + if (section.save){ + section.save(modlist); + continue; + } + var div = $('#'+that.entity_name+'-'+that.name+'-'+section.name, that.container); for (var j=0; j<section.fields.length; j++) { |