Commit fac71442 authored by Fabien Amarger's avatar Fabien Amarger
Browse files

feat(query): Execute query only when the query button is clicked

It was launched after each query modification.
parent feb04ebd0174
......@@ -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,11 +320,11 @@
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);
$("#query-button").prop("disabled", false);
}
yasqe.query();
},
});
});
......@@ -356,6 +357,9 @@
var win = window.open(url, '_blank');
win.focus();
};
document.getElementById("query-button").onclick = () => {
yasqe.query();
};
</script>
</body>
</html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment