From 29059cd45d84b61c3b5799124ec93cee4b8ac63b Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Tue, 17 Apr 2012 16:25:20 +0200 Subject: Redefined search control buttons This patch replaces old search facet action buttons with new control_buttons_widget. https://fedorahosted.org/freeipa/ticket/2247 --- install/ui/facet.js | 58 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 24 deletions(-) (limited to 'install/ui/facet.js') diff --git a/install/ui/facet.js b/install/ui/facet.js index 80e977b4..1c220d03 100644 --- a/install/ui/facet.js +++ b/install/ui/facet.js @@ -672,11 +672,11 @@ IPA.facet_title = function(spec) { return that; }; -IPA.table_facet = function(spec) { +IPA.table_facet = function(spec, no_init) { spec = spec || {}; - var that = IPA.facet(spec); + var that = IPA.facet(spec, no_init); that.managed_entity = spec.managed_entity ? IPA.get_entity(spec.managed_entity) : that.entity; @@ -684,6 +684,7 @@ IPA.table_facet = function(spec) { that.search_all_entries = spec.search_all_entries; that.search_all_attributes = spec.search_all_attributes; that.selectable = spec.selectable === undefined ? true : spec.selectable; + that.select_changed = IPA.observer(); that.row_enabled_attribute = spec.row_enabled_attribute; that.row_disabled_attribute = spec.row_disabled_attribute; @@ -691,13 +692,6 @@ IPA.table_facet = function(spec) { that.columns = $.ordered_map(); - var init = function() { - var columns = spec.columns || []; - for (var i=0; i 0) { + that.state.push('item-selected'); + } + + that.state_changed.notify(); + }; + + return that; +}; + IPA.action_button_widget = function(spec) { spec = spec || {}; -- cgit