From 00eb6f39022d3a3ffdb5e7e42105832a2da8a1f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Val=C3=A9rio?= Date: Sat, 13 Apr 2019 21:07:34 +0100 Subject: [PATCH] removed alert and added a less intrusive notification --- callbacks/static/js/viewer.js | 9 +++++++-- callbacks/templates/callbacks/check.html | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/callbacks/static/js/viewer.js b/callbacks/static/js/viewer.js index 1cad4b1..d3549fb 100644 --- a/callbacks/static/js/viewer.js +++ b/callbacks/static/js/viewer.js @@ -88,14 +88,19 @@ var callbackDetails = new Vue({ el: "#callback-details", delimiters: ["[[", "]]"], data: { - callback_url: "" + callback_url: "", + show_copy_notification: false }, methods: { copytoclipboard: function() { var url = document.getElementById("callback-uuid-field"); url.select(); document.execCommand("copy"); - alert("The callback url was copied to your clipboard."); + this.show_copy_notification = true; + let self = this; + setTimeout(function() { + self.show_copy_notification = false; + }, 2000); } }, mounted: function() { diff --git a/callbacks/templates/callbacks/check.html b/callbacks/templates/callbacks/check.html index 2c23313..e699e6b 100644 --- a/callbacks/templates/callbacks/check.html +++ b/callbacks/templates/callbacks/check.html @@ -47,6 +47,9 @@ +
+ The callback url was copied to your clipboard. +