From d2be41dd1b69020b11cdd6ba66436424f3a0033a Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 19 Apr 2011 11:53:00 -0500 Subject: Standardized action panel buttons creation. Action panel buttons are now created in facet's create_action_panel(). This is to allow a subclass to override and customize the buttons. --- install/ui/search.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'install/ui/search.js') diff --git a/install/ui/search.js b/install/ui/search.js index 775ae549..9a458bfc 100644 --- a/install/ui/search.js +++ b/install/ui/search.js @@ -217,11 +217,7 @@ IPA.search_facet = function(spec) { that.facet_create_action_panel(container); - var li = $('.action-controls', container); - - var buttons = $('', { - 'class': 'search-buttons' - }).appendTo(li); + var buttons = $('.action-controls', container); $('', { 'type': 'button', @@ -251,9 +247,8 @@ IPA.search_facet = function(spec) { that.table.setup(span); var action_panel = that.get_action_panel(); - var search_buttons = $('.search-buttons', action_panel); - var button = $('input[name=remove]', search_buttons); + var button = $('input[name=remove]', action_panel); that.remove_button = IPA.action_button({ 'label': IPA.messages.buttons.remove, 'icon': 'ui-icon-trash', @@ -265,7 +260,7 @@ IPA.search_facet = function(spec) { button.replaceWith(that.remove_button); that.remove_button.addClass('input_link_disabled'); - button = $('input[name=add]', search_buttons); + button = $('input[name=add]', action_panel); that.add_button = IPA.action_button({ 'label': IPA.messages.buttons.add, 'icon': 'ui-icon-plus', -- cgit