diff options
author | Adam Young <ayoung@redhat.com> | 2011-01-27 16:37:48 -0500 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2011-01-28 10:37:49 -0500 |
commit | ffcf10c832de5f99dd96d1c77713b875ed1e2760 (patch) | |
tree | f98debc6b47f937843fd47d93056a801e63b1d50 /install/ui/search.js | |
parent | 114c238a9b620c181a4757b35177069335e46787 (diff) | |
download | freeipa-ffcf10c832de5f99dd96d1c77713b875ed1e2760.tar.gz freeipa-ffcf10c832de5f99dd96d1c77713b875ed1e2760.tar.xz freeipa-ffcf10c832de5f99dd96d1c77713b875ed1e2760.zip |
default disable delete
Diffstat (limited to 'install/ui/search.js')
-rw-r--r-- | install/ui/search.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/install/ui/search.js b/install/ui/search.js index b88de20a7..20a6f51fc 100644 --- a/install/ui/search.js +++ b/install/ui/search.js @@ -103,10 +103,12 @@ IPA.search_widget = function (spec) { that.remove_button = IPA.action_button({ 'label': IPA.messages.button.remove, 'icon': 'ui-icon-trash', - 'click': function() { that.remove(that.container); } }); + that.remove_button.addClass('input_link_disabled'); + button.replaceWith(that.remove_button); + button = $('input[name=add]', search_buttons); that.add_button = IPA.action_button({ 'label': IPA.messages.button.add, @@ -156,6 +158,18 @@ IPA.search_widget = function (spec) { $('input', action_panel).val(null); } + + if(count === 0){ + var remove_button = $('a[title=Delete]', action_panel); + remove_button.addClass('input_link_disabled'); + remove_button.unbind('click'); + + }else{ + var remove_button = $('a[title=Delete]', action_panel); + remove_button.click(function() { that.remove(that.container); }); + remove_button.removeClass('input_link_disabled'); + } + return false; }; |