aboutsummaryrefslogtreecommitdiffstats
path: root/server/templates/server/data_request.html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--server/templates/server/data_request.html10
1 files changed, 9 insertions, 1 deletions
diff --git a/server/templates/server/data_request.html b/server/templates/server/data_request.html
index fbbcbc0..7728cd9 100644
--- a/server/templates/server/data_request.html
+++ b/server/templates/server/data_request.html
@@ -29,7 +29,7 @@
</div>
<div class="card-action">
<a class="waves-effect waves-light btn {{color}}" href="#" onclick="document.getElementById('form').submit()">Invia</a>
- <a class="waves-effect waves-light btn {{color}}" onclick="copy()">Copia risultato</a>
+ <a class="waves-effect waves-light btn {{color}}" onclick="copy()" id="copy_btn">Copia risultato</a>
</div>
</form>
</div>
@@ -38,6 +38,12 @@
{% endblock %}
{% block script %}
+$(document).ready(function(){
+ {% if error %}
+ M.toast({html: '{{ error }}', classes: 'orange'})
+ {% endif %}
+});
+
document.addEventListener('DOMContentLoaded', function() {
var elems = document.querySelectorAll('select');
var options = {};
@@ -45,6 +51,8 @@ document.addEventListener('DOMContentLoaded', function() {
});
function copy() {
+ M.toast({html: 'Valore copiato!', classes: 'green'})
+
var copyText = document.getElementById("data");
copyText.select();
copyText.setSelectionRange(0, 99999); /*For mobile devices*/