diff options
author | Endi S. Dewata <edewata@redhat.com> | 2011-05-26 17:57:39 -0500 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2011-05-27 13:06:57 -0400 |
commit | aa29a8a769c62b07cc4e6d82fc79846505cc9fa3 (patch) | |
tree | 2131098b113c2bfecf1830feff0c08b3b2d1aabc /install/ui/hbac.js | |
parent | 17c3f9e84efcbeb3b5ae1de83d799974de3bb078 (diff) | |
download | freeipa-aa29a8a769c62b07cc4e6d82fc79846505cc9fa3.tar.gz freeipa-aa29a8a769c62b07cc4e6d82fc79846505cc9fa3.tar.xz freeipa-aa29a8a769c62b07cc4e6d82fc79846505cc9fa3.zip |
Added Update and Reset buttons into Dirty dialog.
The Dirty dialogs have been combined into IPA.dirty_dialog. It
provides the Update and Reset buttons with customizable callback.
Previously the widget's dirty status is computed by comparing the
old values with the new values. This method is sometimes inaccurate,
so the is_dirty() method has been modified to simply return a flag
which is set to true if the widget is changed.
Ticket #896.
Diffstat (limited to 'install/ui/hbac.js')
-rw-r--r-- | install/ui/hbac.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/install/ui/hbac.js b/install/ui/hbac.js index aa11879b8..4d46a18f5 100644 --- a/install/ui/hbac.js +++ b/install/ui/hbac.js @@ -438,7 +438,6 @@ IPA.hbacrule_details_facet = function (spec) { for (var j=0; j<section_fields.length; j++) { var field = section_fields[j]; - var span = $('span[name='+field.name+']', section.container).first(); var values = field.save(); if (!values) continue; @@ -461,7 +460,7 @@ IPA.hbacrule_details_facet = function (spec) { } // skip unchanged field - if (!field.is_dirty(span)) continue; + if (!field.is_dirty()) continue; // check enable/disable if (field.name == 'ipaenabledflag') { @@ -795,7 +794,7 @@ IPA.hbacrule_accesstime_widget = function (spec) { var input = $('input[name="'+that.name+'"]', that.container); input.change(function() { - that.show_undo(); + that.set_dirty(true); }); var undo = that.get_undo(); |