activity: Extract most js from realm_summary_table to activity.js.

This commit is contained in:
Vishnu Ks 2019-06-12 19:12:49 +05:30 committed by Tim Abbott
parent 14e582fb59
commit 44d16d76c1
3 changed files with 7 additions and 12 deletions

View File

@ -0,0 +1,5 @@
$(function () {
$('a.envelope-link').click(function () {
common.copy_data_attribute_value($(this), "admin-emails");
});
});

View File

@ -6,17 +6,6 @@
var now = moment('{{ now }}'); var now = moment('{{ now }}');
$('#utctime')[0].innerHTML = moment.utc(now).format('YYYY-MM-DD HH:mm') + 'Z'; $('#utctime')[0].innerHTML = moment.utc(now).format('YYYY-MM-DD HH:mm') + 'Z';
$('#localtime')[0].innerHTML = '(' + now.format('YYYY-MM-DD HH:mm ZZ') + ')'; $('#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);
});
});
</script> </script>
<ul> <ul>
@ -79,7 +68,7 @@
<td> <td>
{% if not loop.last %} {% if not loop.last %}
<a class="envelope-link" data-value="{{ row.realm_admin_email }}"> <a class="envelope-link" data-admin-emails="{{ row.realm_admin_email }}">
<i class="fa fa-envelope"></i> <i class="fa fa-envelope"></i>
</a> </a>
{% endif %} {% endif %}

View File

@ -1,6 +1,7 @@
{ {
"activity": [ "activity": [
"./node_modules/sorttable/sorttable.js", "./node_modules/sorttable/sorttable.js",
"./static/js/analytics/activity.js",
"./static/styles/portico/activity.scss" "./static/styles/portico/activity.scss"
], ],
"archive": [ "archive": [