From d70d1e1293d851ca738235b14ce9922361aa0f35 Mon Sep 17 00:00:00 2001 From: Endi S. Dewata Date: Thu, 2 Dec 2010 20:46:25 -0600 Subject: [PATCH] Fixed buttons in enrollment dialog The Find, Add, and Remove buttons in the enrollment dialog have been replaced with ipa_buttons. --- install/static/widget.js | 48 +++++++++++++++++++++++++++++++++------------ 1 files changed, 35 insertions(+), 13 deletions(-) diff --git a/install/static/widget.js b/install/static/widget.js index f7b857f6bb92f8dbcadf73c2bba3710b06825564..429773ef0f9624bddefcabc919cbae98183cd15c 100755 --- a/install/static/widget.js +++ b/install/static/widget.js @@ -964,12 +964,14 @@ function ipa_adder_dialog(spec) { var search_panel = $('
').appendTo(that.container); - that.filter_field = $('', { - type: 'text' + $('', { + type: 'text', + name: 'filter' }).appendTo(search_panel); - that.find_button = $('', { + $('', { type: 'button', + name: 'find', value: 'Find' }).appendTo(search_panel); @@ -1007,14 +1009,16 @@ function ipa_adder_dialog(spec) { }).appendTo(results_panel); var p = $('

').appendTo(buttons_panel); - that.remove_button = $('', { + $('', { type: 'button', + name: 'remove', value: '<<' }).appendTo(p); p = $('

').appendTo(buttons_panel); - that.add_button = $('', { + $('', { 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); + + var button = $('input[name=find]', that.container); + that.find_button = ipa_button({ + 'label': button.val(), + 'icon': 'ui-icon-search', + 'click': function() { that.search(); } }); + button.replaceWith(that.find_button); - that.remove_button.click(function(){ - var rows = that.selected_table.remove_selected_rows(); - that.available_table.add_rows(rows); + 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); - that.find_button.click(function(){ - that.search(); + 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) { -- 1.6.6.1