// JavaScript Document C:\iC\v0\include\pages\list-quote.php C:\iC\v0\include\pages\ajax\ajax-list-quote.js.php //===== function selection(id){ if(jQuery('#'+id).hasClass('selected')){ document.location.href="edit-quote.php?id_quote="+id; }else{ jQuery('tr').removeClass('selected'); jQuery('#'+id).addClass('selected'); jQuery('.newquote').css('opacity','1').attr('href','new-quote.php?id_customer='+id); jQuery('.archive').css('opacity','1').attr('href','quotes.php?archive='+id); jQuery('.duplicate').css('opacity','1').attr('href','new-quote.php?duplicate_quote='+id); jQuery('.newinvoice').css('opacity','1').attr('href','new-invoice.php?convert_quote='+id); jQuery('.print').css('opacity','1').attr('href','print-docs.php?id_quote='+id); jQuery('.export').css('opacity','1').attr('href','export-docs.php?id_quote='+id); } } //===== function refresh_quote(){ var statut = $('.get_archived').val(); var search_what = $('.search_what').val(); var search_where = $('.search_where').val(); // \iC\v0\include\pages\ajax\ajax-list-quote.js.php $.get('ajax.php', /// $.get('ajax.php', { get_quote: statut, search_what: search_what, search_where: search_where }, function(data){ $('.alert').hide(); $('.quote_list tbody').html(''); $(data).appendTo('.quote_list tbody'); }); } //===== (function($){ $('.get_archived').change(function(){ refresh_quote(); }); $('.search_what').change(function(){ refresh_quote(); }); $('.search_where').change(function(){ refresh_quote(); }); })(jQuery);