diff options
author | Endi S. Dewata <edewata@redhat.com> | 2010-12-02 20:46:25 -0600 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2010-12-02 22:06:08 -0500 |
commit | fabc522f64f68703f1e39ac0a8cf9580c411ef3a (patch) | |
tree | e6f71e8e8d957ef3f74314ae037c5b11df6f4eee /install/static | |
parent | e382472fce9161769259a492d220520627e7225d (diff) | |
download | freeipa-fabc522f64f68703f1e39ac0a8cf9580c411ef3a.tar.gz freeipa-fabc522f64f68703f1e39ac0a8cf9580c411ef3a.tar.xz freeipa-fabc522f64f68703f1e39ac0a8cf9580c411ef3a.zip |
Fixed buttons in enrollment dialog
The Find, Add, and Remove buttons in the enrollment dialog have
been replaced with ipa_buttons.
Diffstat (limited to 'install/static')
-rwxr-xr-x | install/static/widget.js | 52 |
1 files changed, 37 insertions, 15 deletions
diff --git a/install/static/widget.js b/install/static/widget.js index f7b857f6b..429773ef0 100755 --- a/install/static/widget.js +++ b/install/static/widget.js @@ -964,12 +964,14 @@ function ipa_adder_dialog(spec) { var search_panel = $('<div/>').appendTo(that.container); - that.filter_field = $('<input/>', { - type: 'text' + $('<input/>', { + type: 'text', + name: 'filter' }).appendTo(search_panel); - that.find_button = $('<input/>', { + $('<input/>', { type: 'button', + name: 'find', value: 'Find' }).appendTo(search_panel); @@ -1007,14 +1009,16 @@ function ipa_adder_dialog(spec) { }).appendTo(results_panel); var p = $('<p/>').appendTo(buttons_panel); - that.remove_button = $('<input />', { + $('<input />', { type: 'button', + name: 'remove', value: '<<' }).appendTo(p); p = $('<p/>').appendTo(buttons_panel); - that.add_button = $('<input />', { + $('<input />', { type: 'button', + name: 'add', value: '>>' }).appendTo(p); @@ -1036,19 +1040,37 @@ function ipa_adder_dialog(spec) { var selected_panel = $('div[name=selected]', that.container); that.selected_table.setup(selected_panel); - that.add_button.click(function(){ - var rows = that.available_table.remove_selected_rows(); - that.selected_table.add_rows(rows); - }); + that.filter_field = $('input[name=filter]', that.container); - that.remove_button.click(function(){ - var rows = that.selected_table.remove_selected_rows(); - that.available_table.add_rows(rows); + var button = $('input[name=find]', that.container); + that.find_button = ipa_button({ + 'label': button.val(), + 'icon': 'ui-icon-search', + 'click': function() { that.search(); } }); - - that.find_button.click(function(){ - that.search(); + button.replaceWith(that.find_button); + + button = $('input[name=remove]', that.container); + that.remove_button = ipa_button({ + 'label': button.val(), + 'icon': 'ui-icon-trash', + 'click': function() { + var rows = that.selected_table.remove_selected_rows(); + that.available_table.add_rows(rows); + } + }); + button.replaceWith(that.remove_button); + + button = $('input[name=add]', that.container); + that.add_button = ipa_button({ + 'label': button.val(), + 'icon': 'ui-icon-plus', + 'click': function() { + var rows = that.available_table.remove_selected_rows(); + that.selected_table.add_rows(rows); + } }); + button.replaceWith(that.add_button); }; that.open = function(container) { |