diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js index 0f3e7f27b..9084ac584 100644 --- a/install/ui/src/freeipa/widget.js +++ b/install/ui/src/freeipa/widget.js @@ -988,6 +988,27 @@ IPA.multivalued_widget = function(spec) { that.initialized = true; that.updating = false; + /** + * + * CUSTOM ACTION MENU HELP: + * + * Custom actions variable sets whether each row will use custom menu + * for showing remove button or not. Default is false - button will be + * displayed classicaly as any other button. True means custom menu is + * present.. + * + * In case that the variable is set to true, the widget of each row + * has to offer following method: + * action_object get_custom_actions(); + * + * Then the action_object has to have following interface: + * Array[item] get_items(); + * set_items(Array[item]); + * enable_item(name); + * disable_item(name); + */ + that.custom_actions = !!spec.custom_actions; + that.rows = []; that.base_css_class = that.base_css_class + ' multivalued-widget'; @@ -1165,23 +1186,41 @@ IPA.multivalued_widget = function(spec) { that.emit('error-show', { source: that }); }); - var remove_link_visible = !(row.is_new || !that.is_writable()); - row.remove_link = $('