web admin: fix Microsoft edge compatibility

Edge does not support trimEnd
This commit is contained in:
Nicola Murino 2020-06-29 11:46:02 +02:00
parent aec372ca31
commit 4f0a936ca0
3 changed files with 4 additions and 4 deletions

View file

@ -92,7 +92,7 @@
var table = $('#dataTable').DataTable();
table.button(0).enable(false);
var connectionID = table.row({ selected: true }).data()[0];
var path = '{{.APIConnectionsURL}}'.trimEnd("/") + "/" + connectionID;
var path = '{{.APIConnectionsURL}}' + "/" + connectionID;
$('#disconnectModal').modal('hide');
$.ajax({
url: path,

View file

@ -89,7 +89,7 @@ function deleteAction() {
var table = $('#dataTable').DataTable();
table.button(1).enable(false);
var folderPath = table.row({ selected: true }).data()[0];
var path = '{{.APIFoldersURL}}'.trimEnd("/") + "?folder_path=" + encodeURIComponent(folderPath);
var path = '{{.APIFoldersURL}}' + "?folder_path=" + encodeURIComponent(folderPath);
$('#deleteModal').modal('hide');
$.ajax({
url: path,

View file

@ -99,7 +99,7 @@
var table = $('#dataTable').DataTable();
table.button(2).enable(false);
var userID = table.row({ selected: true }).data()[0];
var path = '{{.APIUserURL}}'.trimEnd("/") + "/" + userID;
var path = '{{.APIUserURL}}' + "/" + userID;
$('#deleteModal').modal('hide');
$.ajax({
url: path,
@ -141,7 +141,7 @@
text: 'Edit',
action: function (e, dt, node, config) {
var userID = dt.row({ selected: true }).data()[0];
var path = '{{.UserURL}}'.trimEnd("/") + "/" + userID;
var path = '{{.UserURL}}' + "/" + userID;
window.location.href = path;
},
enabled: false