From 078d6dfb1c8ebbf0e4b8968e3cd7f802e44d212f Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 7 Jul 2011 15:42:57 -0400 Subject: Fixed dirty dialog problems in HBAC/Sudo rules. The update() in HBAC/Sudo details facet has been fixed to call the callback function which will show the dirty dialog properly. Ticket #1439 --- install/ui/rule.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'install/ui/rule.js') diff --git a/install/ui/rule.js b/install/ui/rule.js index 4969ffb5..106b870b 100644 --- a/install/ui/rule.js +++ b/install/ui/rule.js @@ -22,7 +22,7 @@ /* REQUIRES: ipa.js, details.js, search.js, add.js, entity.js */ -IPA.rule_details_section = function (spec){ +IPA.rule_details_section = function(spec) { spec = spec || {}; @@ -124,7 +124,7 @@ IPA.rule_details_section = function (spec){ }; -IPA.rule_association_table_widget = function (spec) { +IPA.rule_association_table_widget = function(spec) { spec = spec || {}; @@ -132,6 +132,22 @@ IPA.rule_association_table_widget = function (spec) { that.category = spec.category; + that.show_add_dialog = function() { + if (that.category) { + var values = that.category.save(); + if (values[0] !== '') return; + } + that.association_table_widget_show_add_dialog(); + }; + + that.show_remove_dialog = function() { + if (that.category) { + var values = that.category.save(); + if (values[0] !== '') return; + } + that.association_table_widget_show_remove_dialog(); + }; + that.add = function(values, on_success, on_error) { var pkey = IPA.nav.get_state(that.entity_name+'-pkey'); -- cgit