diff --git a/static/js/analytics/activity.js b/static/js/analytics/activity.js new file mode 100644 index 0000000000..fbc3c4e8f2 --- /dev/null +++ b/static/js/analytics/activity.js @@ -0,0 +1,5 @@ +$(function () { + $('a.envelope-link').click(function () { + common.copy_data_attribute_value($(this), "admin-emails"); + }); +}); diff --git a/templates/analytics/realm_summary_table.html b/templates/analytics/realm_summary_table.html index 67668826d6..43660e8890 100644 --- a/templates/analytics/realm_summary_table.html +++ b/templates/analytics/realm_summary_table.html @@ -6,17 +6,6 @@ var now = moment('{{ now }}'); $('#utctime')[0].innerHTML = moment.utc(now).format('YYYY-MM-DD HH:mm') + 'Z'; $('#localtime')[0].innerHTML = '(' + now.format('YYYY-MM-DD HH:mm ZZ') + ')'; - $(document).ready(function() { - $('a.envelope-link').click(function() { - var temp = $(document.createElement('input')); - $("body").append(temp); - temp.val($(this).data("value")).select(); - document.execCommand("copy"); - temp.remove(); - $(this).fadeOut(250); - $(this).fadeIn(1000); - }); - });