Changeset View
Changeset View
Standalone View
Standalone View
swh/web/assets/src/bundles/browse/origin-save.js
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | saveRequestsTable = $('#swh-origin-save-requests') | ||||
return date.toLocaleString(); | return date.toLocaleString(); | ||||
} | } | ||||
return data; | return data; | ||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
data: 'origin_type', | data: 'origin_type', | ||||
name: 'origin_type' | name: 'origin_type' | ||||
}, | }, | ||||
{ | { | ||||
data: 'origin_url', | data: 'origin_url', | ||||
name: 'origin_url', | name: 'origin_url', | ||||
render: (data, type, row) => { | render: (data, type, row) => { | ||||
if (type === 'display') { | if (type === 'display') { | ||||
const sanitizedURL = $.fn.dataTable.render.text().display(data); | const sanitizedURL = $.fn.dataTable.render.text().display(data); | ||||
return `<a href="${sanitizedURL}">${sanitizedURL}</a>`; | return `<a href="${sanitizedURL}">${sanitizedURL}</a>`; | ||||
Show All 17 Lines | saveRequestsTable = $('#swh-origin-save-requests') | ||||
return `<a href="${browseOriginUrl}">${data}</a>`; | return `<a href="${browseOriginUrl}">${data}</a>`; | ||||
} | } | ||||
return data; | return data; | ||||
} | } | ||||
} | } | ||||
], | ], | ||||
scrollY: '50vh', | scrollY: '50vh', | ||||
scrollCollapse: true, | scrollCollapse: true, | ||||
order: [[0, 'desc']] | order: [[0, 'desc']], | ||||
responsive: { | |||||
details: { | |||||
type: 'none' | |||||
} | |||||
} | |||||
}); | }); | ||||
$('#swh-origin-save-requests-list-tab').on('shown.bs.tab', () => { | $('#swh-origin-save-requests-list-tab').on('shown.bs.tab', () => { | ||||
saveRequestsTable.draw(); | saveRequestsTable.draw(); | ||||
window.location.hash = '#requests'; | window.location.hash = '#requests'; | ||||
}); | }); | ||||
$('#swh-origin-save-request-create-tab').on('shown.bs.tab', () => { | $('#swh-origin-save-request-create-tab').on('shown.bs.tab', () => { | ||||
▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines |