diff options
Diffstat (limited to 'install/ui/rule.js')
-rw-r--r-- | install/ui/rule.js | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/install/ui/rule.js b/install/ui/rule.js index 4969ffb5d..106b870bb 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'); |