diff options
author | Endi S. Dewata <edewata@redhat.com> | 2010-12-07 01:51:51 -0600 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2010-12-09 15:51:06 -0500 |
commit | db822955c2b61b31ba96213ec88c14c2b8d827bc (patch) | |
tree | e2c455e8919077468674882b8b0555b8f42b44b3 /install/static/details.js | |
parent | 5b7abefb42bb2a962caab444ff2557ca78732f63 (diff) | |
download | freeipa.git-db822955c2b61b31ba96213ec88c14c2b8d827bc.tar.gz freeipa.git-db822955c2b61b31ba96213ec88c14c2b8d827bc.tar.xz freeipa.git-db822955c2b61b31ba96213ec88c14c2b8d827bc.zip |
SUDO adjustments
The SUDO rule details facet has been updated to support the latest UI
spec. The facet consists of 5 sections: general, users, hosts, commands,
and run-as.
The general section contains the SUDO rule description and status. If
the status is changed, the sudorule-enable/disable will be invoked.
The other sections contain radio buttons for the association category
and tables for the members. When a member is added or removed, the
category will be adjusted appropriately. If the category is changed to
'all', 'allow', or 'deny', all members will be removed.
The last section is currently not working because backend support is
not yet available.
The adder dialog boxes for users, groups, and hosts has been modified
to accept external identities. The layout for the base adder dialog
was updated. The base dialog class was updated to support templates.
The SUDO dialog boxes were implemented using templates. New CSS
classes were added to ipa.css.
The HBAC rule details facet has been updated as well.
Diffstat (limited to 'install/static/details.js')
-rw-r--r-- | install/static/details.js | 62 |
1 files changed, 28 insertions, 34 deletions
diff --git a/install/static/details.js b/install/static/details.js index d9dc96bc..e3cee071 100644 --- a/install/static/details.js +++ b/install/static/details.js @@ -229,7 +229,7 @@ function ipa_details_section(spec){ } }; - that.load = function(result) { + that.load = function(record) { var fields = that.fields; @@ -242,7 +242,7 @@ function ipa_details_section(spec){ var field = fields[i]; var span = $('span[name='+field.name+']', this.container).first(); field.setup(span); - field.load(result); + field.load(record); } } ); @@ -252,7 +252,7 @@ function ipa_details_section(spec){ for (var j=0; j<fields.length; j++) { var field = fields[j]; var span = $('span[name='+field.name+']', this.container).first(); - field.load(result); + field.load(record); } }; @@ -354,12 +354,12 @@ function ipa_details_facet(spec) { var that = ipa_facet(spec); - that.is_dirty = spec.is_dirty || ipa_details_is_dirty; + that.is_dirty = spec.is_dirty || is_dirty; that.create = spec.create || ipa_details_create; that.setup = spec.setup || ipa_details_setup; - that.load = spec.load || ipa_details_load; + that.load = spec.load || load; that.update = spec.update || ipa_details_update; - that.reset = spec.reset || ipa_details_reset; + that.reset = spec.reset || reset; that.refresh = spec.refresh || ipa_details_refresh; that.sections = []; @@ -405,8 +405,30 @@ function ipa_details_facet(spec) { return that.record[pkey_name][0]; }; + function is_dirty() { + var pkey = $.bbq.getState(that.entity_name + '-pkey', true) || ''; + return pkey != that.pkey; + } + + function load(record) { + that.record = record; + + for (var i=0; i<that.sections.length; i++) { + var section = that.sections[i]; + section.load(record); + } + } + + function reset() { + for (var i=0; i<that.sections.length; i++) { + var section = that.sections[i]; + section.reset(); + } + } + that.details_facet_init = that.init; that.details_facet_create = that.create; + that.details_facet_load = that.load; return that; } @@ -428,11 +450,6 @@ function ipa_button(spec) { return button; } -function ipa_details_is_dirty() { - var pkey = $.bbq.getState(this.entity_name + '-pkey', true) || ''; - return pkey != this.pkey; -} - function ipa_details_create(container) { var that = this; @@ -629,19 +646,6 @@ var _ipa_span_hint_template = '<span class="attrhint">Hint: D</span>'; -function ipa_details_load(record) -{ - var that = this; - that.record = record; - - for (var i=0; i<that.sections.length; i++) { - var section = that.sections[i]; - section.load(record); - } -} - - - function ipa_create_first_dd(field_name, content){ var dd = $('<dd/>', { 'class': 'first', @@ -808,16 +812,6 @@ function _ipa_create_text_input(value, param_info, rights, index) return span; } -function ipa_details_reset() -{ - var that = this; - - for (var i=0; i<that.sections.length; i++) { - var section = that.sections[i]; - section.reset(); - } -} - function ipa_details_field_create_add_link(title, rights, index) { var that = this; |