diff options
author | Endi S. Dewata <edewata@redhat.com> | 2011-04-19 11:53:00 -0500 |
---|---|---|
committer | Endi Sukma Dewata <edewata@people01.fedoraproject.org> | 2011-04-21 19:44:06 +0000 |
commit | d2be41dd1b69020b11cdd6ba66436424f3a0033a (patch) | |
tree | d88c09f5a0ef620df4319f2e564689f585299eb6 /install/ui/associate.js | |
parent | 3528b4eca3cf2519a6af5a43f6b321cbd8eea138 (diff) | |
download | freeipa.git-d2be41dd1b69020b11cdd6ba66436424f3a0033a.tar.gz freeipa.git-d2be41dd1b69020b11cdd6ba66436424f3a0033a.tar.xz freeipa.git-d2be41dd1b69020b11cdd6ba66436424f3a0033a.zip |
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.
Diffstat (limited to 'install/ui/associate.js')
-rw-r--r-- | install/ui/associate.js | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/install/ui/associate.js b/install/ui/associate.js index f4ebb1ef..ca912e3f 100644 --- a/install/ui/associate.js +++ b/install/ui/associate.js @@ -799,6 +799,25 @@ IPA.association_facet = function (spec) { return pkey != that.pkey; }; + that.create_action_panel = function(container) { + + that.facet_create_action_panel(container); + + var buttons = $('.action-controls', container); + + $('<input/>', { + 'type': 'button', + 'name': 'remove', + 'value': IPA.messages.buttons.remove + }).appendTo(buttons); + + $('<input/>', { + 'type': 'button', + 'name': 'add', + 'value': IPA.messages.buttons.enroll + }).appendTo(buttons); + }; + that.create_content = function(container) { that.pkey = $.bbq.getState(that.entity_name + '-pkey', true) || ''; @@ -832,22 +851,6 @@ IPA.association_facet = function (spec) { var span = $('<span/>', { 'name': 'association' }).appendTo(container); that.table.create(span); - - var action_panel = that.get_action_panel(); - var li = $('.action-controls', action_panel); - - // creating generic buttons for layout - $('<input/>', { - 'type': 'button', - 'name': 'remove', - 'value': IPA.messages.buttons.remove - }).appendTo(li); - - $('<input/>', { - 'type': 'button', - 'name': 'add', - 'value': IPA.messages.buttons.enroll - }).appendTo(li); }; that.setup = function(container) { |