Bug 16238 [Follow-up] Upgrade jQuery in staff client: use .prop() instead of .attr()
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / js / item_search_fields.js
1 $(document).ready(function(){
2     $("#add_field_form").hide();
3     $("#new_search_field").on("click",function(e){
4         e.preventDefault();
5         $("#add_field_form").show();
6         $(".dialog").hide();
7         $("#search_fields_list,#toolbar").hide();
8     });
9     $(".cancel").on("click",function(e){
10         e.preventDefault();
11         $("#add_field_form").hide();
12         $(".dialog").show();
13         $("#search_fields_list,#toolbar").show();
14     });
15     $(".field-delete").on("click",function(){
16         $(this).parent().parent().addClass("highlighted-row");
17         if( confirm( MSG_ITEM_SEARCH_DELETE_CONFIRM )){
18             return true;
19         } else {
20             $(this).parent().parent().removeClass("highlighted-row");
21             return false;
22         }
23     });
24 });