From 9637976feffe1c6cd2fac8f2dcf0fb2ae592ac94 Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Fri, 13 Nov 2020 10:21:19 +0100 Subject: [PATCH] [IMP] runbot: bring back copy bundle name button --- runbot/static/src/js/runbot.js | 8 ++++++++ runbot/templates/frontend.xml | 1 + runbot/templates/utils.xml | 6 ++++++ 3 files changed, 15 insertions(+) diff --git a/runbot/static/src/js/runbot.js b/runbot/static/src/js/runbot.js index 527fdb99..49ffee50 100644 --- a/runbot/static/src/js/runbot.js +++ b/runbot/static/src/js/runbot.js @@ -42,3 +42,11 @@ // new Clipboard('.clipbtn'); //}); })(jQuery); + +function copyToClipboard(text) { + if (!navigator.clipboard) { + console.error('Clipboard not supported'); + return; + } + navigator.clipboard.writeText(text); + } diff --git a/runbot/templates/frontend.xml b/runbot/templates/frontend.xml index 5c2b225b..d8e2ffee 100644 --- a/runbot/templates/frontend.xml +++ b/runbot/templates/frontend.xml @@ -32,6 +32,7 @@
+ diff --git a/runbot/templates/utils.xml b/runbot/templates/utils.xml index 82cdd59a..68a50dab 100644 --- a/runbot/templates/utils.xml +++ b/runbot/templates/utils.xml @@ -302,5 +302,11 @@
+ +