diff options
author | Endi S. Dewata <edewata@redhat.com> | 2010-11-15 11:10:55 -0600 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2010-11-15 12:48:45 -0500 |
commit | 9c502641b5f7bf613eb9dbd4be21fbaf92312267 (patch) | |
tree | 9421ac0faa0dd3bbd2dac71c6b0a4a94ec3fd6b1 /install/static/entity.js | |
parent | 629e9520e0b5ce1ae6138d4e2c69ac52927c044a (diff) | |
download | freeipa-9c502641b5f7bf613eb9dbd4be21fbaf92312267.tar.gz freeipa-9c502641b5f7bf613eb9dbd4be21fbaf92312267.tar.xz freeipa-9c502641b5f7bf613eb9dbd4be21fbaf92312267.zip |
HBAC details page enhancement
The HBAC details page has been enhanced to support Undo and Reset operations.
The functionality is implemented in the base widget class so the behavior
will be more consistent across widgets. A <span> tag now used to define the
field boundary in the HTML doc. The tag contains the visual representation
of the field which include the input tag and optionally the undo link.
The Update method on HBAC details page has been modified so that it executes
several operations using a batch command. The operations being executed
depends on the changes made to the fields. These operations may include:
- removing access time if access time is changed to any time
- removing memberships if member category is changed to all
- modifying rule attributes if description or rule type is changed
- enabling/disabling the rule if rule status is changed
The behavior of the Add & Remove buttons also has been changed such that
it adjust the category attribute properly in addition to adding the
memberships using batch command. For example, if category is initially
set to all, adding a new member will also change the category to empty.
The ipa_command have been modified to store the on_success and on_error
handlers as properties. When the command is executed as a part of batch
operation, the result of each command will be passed to the appropriate
handler.
The unit tests and test data have been updated as well.
Diffstat (limited to 'install/static/entity.js')
-rw-r--r-- | install/static/entity.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/install/static/entity.js b/install/static/entity.js index 3eafedc0a..74a07d009 100644 --- a/install/static/entity.js +++ b/install/static/entity.js @@ -206,7 +206,8 @@ function ipa_entity_set_add_definition(entity_name, data) { dialog.add_field(ipa_text_widget({ name: field[0], label: field[1], - setup: field[2] + setup: field[2], + undo: false })); } } @@ -289,11 +290,11 @@ function ipa_details_only_setup(container){ ipa_entity_setup.call(this, container, 'details'); } -function ipa_entity_setup(container, unspecified) { +function ipa_entity_setup(container) { var entity = this; - var facet_name = $.bbq.getState(entity.name + '-facet', true) || unspecified || 'search'; + var facet_name = $.bbq.getState(entity.name + '-facet', true) || entity.default_facet || 'search'; var facet = entity.get_facet(facet_name); if (!facet) return; @@ -314,15 +315,15 @@ function ipa_entity_setup(container, unspecified) { facet.setup_views(container); facet.create(container); container.children().last().addClass('client'); - facet.setup(container, unspecified); - facet.load(container, unspecified); + facet.setup(container); + facet.load(container); } function action_panel(entity_name){ var div = $('<div/>', { "class":"action-panel", - html: $('<h3>Actions</h3>'), + html: $('<h3>Actions</h3>') }); var ul = $('<ul/>', {'class': 'action'}).appendTo(div); |