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/details.js | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'install/ui/details.js') diff --git a/install/ui/details.js b/install/ui/details.js index 0a22c177..590d775a 100644 --- a/install/ui/details.js +++ b/install/ui/details.js @@ -323,6 +323,23 @@ IPA.details_facet = function(spec) { } }; + that.create_action_panel = function(container) { + + that.facet_create_action_panel(container); + + var buttons = $('.action-controls', container); + + $('', { + 'type': 'text', + 'name': 'reset' + }).appendTo(buttons); + + $('', { + 'type': 'text', + 'name': 'update' + }).appendTo(buttons); + }; + function create_content(container) { var label = IPA.metadata.objects[that.entity_name].label; @@ -356,22 +373,6 @@ IPA.details_facet = function(spec) { details.append('
'); - var action_panel = that.get_action_panel(); - - var ul = $('ul', action_panel); - var buttons = $('.action-controls',action_panel); - - $('', { - 'type': 'text', - 'name': 'reset' - }).appendTo(buttons); - - $('', { - 'type': 'text', - 'name': 'update' - }).appendTo(buttons); - - for (var i = 0; i < that.sections.length; ++i) { var section = that.sections[i]; -- cgit