[Web] Remove old transport-map from mailbox.js

master
andryyy 2019-10-04 08:44:31 +02:00
parent 8f7693ccdb
commit 4c952dda3b
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
1 changed files with 1 additions and 70 deletions

View File

@ -703,74 +703,6 @@ jQuery(function($){
"toggleSelector": "table tbody span.footable-toggle"
});
}
function draw_transport_maps_table() {
ft_transport_maps_table = FooTable.init('#transport_maps_table', {
"columns": [
{"name":"chkbox","title":"","style":{"maxWidth":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"},
{"sorted": true,"name":"id","title":"ID","style":{"maxWidth":"60px","width":"60px","text-align":"center"}},
{"name":"dest","title":lang.tls_map_dest},
{"name":"parameters","title":lang.tls_map_parameters},
{"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active},
{"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","maxWidth":"180px","width":"180px"},"type":"html","title":(role == "admin" ? lang.action : ""),"breakpoints":"xs sm"}
],
"empty": lang.empty,
"rows": $.ajax({
dataType: 'json',
url: '/api/v1/get/transport-map/all',
jsonp: false,
error: function () {
console.log('Cannot draw transport map table');
},
success: function (data) {
if (role == "admin") {
$.each(data, function (i, item) {
item.dest = escapeHtml(item.dest);
if (item.parameters == '') {
item.parameters = '<code>-</code>';
} else {
item.parameters = '<code>' + escapeHtml(item.parameters) + '</code>';
}
item.action = '<div class="btn-group">' +
'<a href="/edit/transport_map/' + item.id + '" class="btn btn-xs btn-default"><span class="glyphicon glyphicon-pencil"></span> ' + lang.edit + '</a>' +
'<a href="#" data-action="delete_selected" data-id="single-transport-map" data-api-url="delete/transport-map" data-item="' + item.id + '" class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span> ' + lang.remove + '</a>' +
'</div>';
item.chkbox = '<input type="checkbox" data-id="transport-map" name="multi_select" value="' + item.id + '" />';
});
}
}
}),
"paging": {
"enabled": true,
"limit": 5,
"size": pagination_size
},
"state": {
"enabled": true
},
"filtering": {
"enabled": true,
"delay": 1200,
"position": "left",
"connectors": false,
"placeholder": lang.filter_table
},
"sorting": {
"enabled": true
},
"on": {
"destroy.ft.table": function(e, ft){
$('.refresh_table').attr('disabled', 'true');
},
"ready.ft.table": function(e, ft){
table_mailbox_ready(ft, 'transport_maps_table');
},
"after.ft.filtering": function(e, ft){
table_mailbox_ready(ft, 'transport_maps_table');
}
},
"toggleSelector": "table tbody span.footable-toggle"
});
}
function draw_alias_table() {
ft_alias_table = FooTable.init('#alias_table', {
"columns": [
@ -1102,6 +1034,5 @@ jQuery(function($){
draw_bcc_table();
draw_recipient_map_table();
draw_tls_policy_table();
draw_transport_maps_table();
});