diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index c7ca1b12..476fab7e 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -113,26 +113,26 @@ function export_search_result(){ } function export_stored_query(id){ - xhttp = new XMLHttpRequest(); - xhttp.onreadystatechange = function() { - var a; - if (xhttp.readyState === 4 && xhttp.status === 200) { - // Trick for making downloadable link - a = document.createElement('a'); - a.href = window.URL.createObjectURL(xhttp.response); - // Give filename you wish to download - a.download = "advanced_search_export.adi"; - a.style.display = 'none'; - document.body.appendChild(a); - a.click(); - } - }; - // Post data to URL which handles post request - xhttp.open("POST", "", true); - xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); - // You should set responseType as blob for binary responses - xhttp.responseType = 'blob'; - xhttp.send("id=" + id); + xhttp = new XMLHttpRequest(); + xhttp.onreadystatechange = function() { + var a; + if (xhttp.readyState === 4 && xhttp.status === 200) { + // Trick for making downloadable link + a = document.createElement('a'); + a.href = window.URL.createObjectURL(xhttp.response); + // Give filename you wish to download + a.download = "advanced_search_export.adi"; + a.style.display = 'none'; + document.body.appendChild(a); + a.click(); + } + }; + // Post data to URL which handles post request + xhttp.open("POST", "", true); + xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); + // You should set responseType as blob for binary responses + xhttp.responseType = 'blob'; + xhttp.send("id=" + id); } $('#btn-save').on('click', function() { @@ -153,7 +153,8 @@ $('#btn-save').on('click', function() { if(result) { $.post( "", { search: JSON.stringify(resultquery, null, 2), description: $(".getqueryname").val() }) .done(function( data ) { - alert('Query saved!'); + $(".alert").remove(); + $(".card-body.main").append('