From 30a40e5500ecc488eacdad665da92fe13bcc4b27 Mon Sep 17 00:00:00 2001 From: Emrys Date: Fri, 13 Jul 2018 22:05:42 +0100 Subject: [PATCH] } // stops a part upgrade error - this change requires emoncms/emoncms repo to also be updated // keep button hidden if new version of clipboard.js is not available if (typeof copyToClipboardCustomMsg === 'function') { document.getElementById('copy-csv').classList.remove('hidden'); } else { --- group_view.php | 13 +++++++++++++ view.php | 18 +++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/group_view.php b/group_view.php index 9a39180..d26b612 100644 --- a/group_view.php +++ b/group_view.php @@ -35,6 +35,7 @@ --> + @@ -204,6 +205,10 @@ +
+ +
+ @@ -341,6 +346,14 @@ } }); + // stops a part upgrade error - this change requires emoncms/emoncms repo to also be updated + // keep button hidden if new version of clipboard.js is not available + if (typeof copyToClipboardCustomMsg === 'function') { + document.getElementById('copy-csv').classList.remove('hidden'); + } else { + copyToClipboardCustomMsg = function () {} + } + /****************************************** Functions ******************************************/ diff --git a/view.php b/view.php index 466e658..f3585ad 100644 --- a/view.php +++ b/view.php @@ -36,6 +36,7 @@ --> + @@ -204,8 +205,12 @@ - - + + +
+ +
+ @@ -235,8 +240,15 @@ }); } + // stops a part upgrade error - this change requires emoncms/emoncms repo to also be updated + // keep button hidden if new version of clipboard.js is not available + if (typeof copyToClipboardCustomMsg === 'function') { + document.getElementById('copy-csv').classList.remove('hidden'); + } else { + copyToClipboardCustomMsg = function () {} + } + // Assign active feedid from URL - console.log(window.location.pathname); var urlparts = window.location.pathname.split("graph/"); if (urlparts.length==2) { var feedids = urlparts[1].split(",");