diff --git a/src/index.html b/src/index.html index feb04ebd0174ca125b0293b80413c5356408ec5e_c3JjL2luZGV4Lmh0bWw=..512832e3566fe42dff69814883ffe172c9bce7da_c3JjL2luZGV4Lmh0bWw= 100644 --- a/src/index.html +++ b/src/index.html @@ -92,7 +92,8 @@ </div> </div> <div class="row justify-content-center"> - <button class="btn btn-primary" id="csv-export-button" disabled>Télécharger en CSV</button> + <button class="btn btn-primary" id="query-button" disabled>Exécuter la requête</button> + <button class="btn btn-secondary" id="csv-export-button" disabled>Télécharger en CSV</button> <div class="col-md-11"> <div id="yasr"></div> </div> @@ -319,5 +320,6 @@ yasqe.setValue(queryString); if(queryString.length === 0) { $("#csv-export-button").prop("disabled", true); + $("#query-button").prop("disabled", true); } else { $("#csv-export-button").prop("disabled", false); @@ -322,3 +324,4 @@ } else { $("#csv-export-button").prop("disabled", false); + $("#query-button").prop("disabled", false); } @@ -324,6 +327,4 @@ } - - yasqe.query(); }, }); }); @@ -356,6 +357,9 @@ var win = window.open(url, '_blank'); win.focus(); }; + document.getElementById("query-button").onclick = () => { + yasqe.query(); + }; </script> </body> </html>