diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2011-01-04 13:50:40 -0500 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2011-01-05 11:33:35 -0500 |
commit | 3650df27d56a8e6a4fc7b05687d5a588062853af (patch) | |
tree | ba6b2e0b4195bb1bdf1f9a901a7343f88a29a361 /install/static/sudorule.js | |
parent | 553e08afa6c583a36ed57f9c6e8aeee301b0bf34 (diff) | |
download | freeipa-3650df27d56a8e6a4fc7b05687d5a588062853af.tar.gz freeipa-3650df27d56a8e6a4fc7b05687d5a588062853af.tar.xz freeipa-3650df27d56a8e6a4fc7b05687d5a588062853af.zip |
Fixed SUDO dialog boxes.
The dialog boxes for SUDO details page have been modified
to generate the HTML code by default.
Diffstat (limited to 'install/static/sudorule.js')
-rwxr-xr-x | install/static/sudorule.js | 96 |
1 files changed, 94 insertions, 2 deletions
diff --git a/install/static/sudorule.js b/install/static/sudorule.js index c314ccd0..3ee42c9b 100755 --- a/install/static/sudorule.js +++ b/install/static/sudorule.js @@ -750,12 +750,17 @@ function ipa_sudorule_association_table_widget(spec) { var label = IPA.metadata[that.other_entity].label; var title = 'Add '+label+' to '+that.entity_name+' '+pkey; + var template; + if (IPA.layout) { + template = 'sudorule-'+that.other_entity+'-dialog.html #contents'; + } + return ipa_sudorule_association_adder_dialog({ 'title': title, 'entity_name': that.entity_name, 'pkey': pkey, 'other_entity': that.other_entity, - 'template': 'sudorule-'+that.other_entity+'-dialog.html #contents' + 'template': template }); }; @@ -775,7 +780,8 @@ function ipa_sudorule_association_adder_dialog(spec) { that.create_column({ name: pkey_name, label: IPA.metadata[that.other_entity].label, - primary_key: true + primary_key: true, + width: '200px' }); } @@ -798,6 +804,92 @@ function ipa_sudorule_association_adder_dialog(spec) { that.association_adder_dialog_init(); }; + that.create = function() { + + // do not call that.dialog_create(); + + var search_panel = $('<div/>', { + 'class': 'adder-dialog-filter' + }).appendTo(that.container); + + $('<input/>', { + type: 'text', + name: 'filter', + style: 'width: 244px' + }).appendTo(search_panel); + + search_panel.append(' '); + + $('<input/>', { + type: 'button', + name: 'find', + value: 'Find' + }).appendTo(search_panel); + + var results_panel = $('<div/>', { + 'class': 'adder-dialog-results' + }).appendTo(that.container); + + var available_panel = $('<div/>', { + name: 'available', + 'class': 'adder-dialog-internal' + }).appendTo(results_panel); + + $('<div/>', { + html: 'Available', + 'class': 'ui-widget-header' + }).appendTo(available_panel); + + that.available_table.create(available_panel); + + var buttons_panel = $('<div/>', { + name: 'buttons', + 'class': 'adder-dialog-buttons' + }).appendTo(results_panel); + + var p = $('<p/>').appendTo(buttons_panel); + $('<input />', { + type: 'button', + name: 'remove', + value: '<<' + }).appendTo(p); + + p = $('<p/>').appendTo(buttons_panel); + $('<input />', { + type: 'button', + name: 'add', + value: '>>' + }).appendTo(p); + + var selected_panel = $('<div/>', { + name: 'selected', + 'class': 'adder-dialog-selected' + }).appendTo(results_panel); + + $('<div/>', { + html: 'Prospective', + 'class': 'ui-widget-header' + }).appendTo(selected_panel); + + that.selected_table.create(selected_panel); + + var external_panel = $('<div/>', { + name: 'external', + 'class': 'adder-dialog-external' + }).appendTo(results_panel); + + $('<div/>', { + html: 'External', + 'class': 'ui-widget-header' + }).appendTo(external_panel); + + $('<input/>', { + type: 'text', + name: 'external', + style: 'width: 244px' + }).appendTo(external_panel); + }; + that.setup = function() { that.association_adder_dialog_setup(); that.external_field = $('input[name=external]', that.container); |