diff --git a/data/web/js/site/mailbox.js b/data/web/js/site/mailbox.js index 684fb8fd..bd0878aa 100644 --- a/data/web/js/site/mailbox.js +++ b/data/web/js/site/mailbox.js @@ -1179,10 +1179,6 @@ jQuery(function($){ }); }; - $('body').on('click', 'span.footable-toggle', function () { - event.stopPropagation(); - }) - // detect element visibility changes function onVisible(element, callback) { $(element).ready(function() { diff --git a/data/web/js/site/user.js b/data/web/js/site/user.js index f601d61c..2375a25c 100644 --- a/data/web/js/site/user.js +++ b/data/web/js/site/user.js @@ -128,23 +128,15 @@ jQuery(function($){ } function draw_tla_table() { - ft_tla_table = FooTable.init('#tla_table', { - "columns": [ - {"name":"chkbox","title":"","style":{"min-width":"60px","width":"60px","text-align":"center"},"filterable": false,"sortable": false,"type":"html"}, - {"name":"address","title":lang.alias}, - {"name":"validity","formatter":function unix_time_format(tm) { var date = new Date(tm ? tm * 1000 : 0); return date.toLocaleDateString(undefined, {year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit"});},"title":lang.alias_valid_until,"style":{"width":"170px"}}, - {"sorted": true,"sortValue": function(value){res = new Date(value);return res.getTime();},"direction":"DESC","name":"created","formatter":function date_format(datetime) { var date = new Date(datetime.replace(/-/g, "/")); return date.toLocaleDateString(undefined, {year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit"});},"title":lang.created_on,"style":{"width":"170px"}}, - {"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","min-width":"220px","width":"220px"},"type":"html","title":lang.action,"breakpoints":"xs sm"} - ], - "empty": lang.empty, - "rows": $.ajax({ - dataType: 'json', - url: '/api/v1/get/time_limited_aliases', - jsonp: false, - error: function () { - console.log('Cannot draw tla table'); - }, - success: function (data) { + $('#tla_table').DataTable({ + processing: true, + serverSide: false, + language: lang_datatables, + ajax: { + type: "GET", + url: "/api/v1/get/time_limited_aliases", + dataSrc: function(data){ + console.log(data); $.each(data, function (i, item) { if (acl_data.spam_alias === 1) { item.action = '
{{ lang.user.app_hint|raw }}
-{{ lang.user.app_hint|raw }}
+