整理工作
提取index.php中的js
This commit is contained in:
parent
480796d55d
commit
e46ed84b0b
19
web/js/home_script.js
Normal file
19
web/js/home_script.js
Normal file
@ -0,0 +1,19 @@
|
||||
$(document).on('click', '.rename-btn', function () {
|
||||
var relativePath = $(this).attr('value');
|
||||
var fileName = $(this).closest('tr').find('td:first').text().trim();
|
||||
$('#renameRelativePath').val(relativePath);
|
||||
$('#renameform-newname').val(fileName);
|
||||
$('#renameModal').modal('show');
|
||||
})
|
||||
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
|
||||
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
|
||||
return new bootstrap.Tooltip(tooltipTriggerEl)
|
||||
});
|
||||
$(document).on('click', '.download-btn', function () {
|
||||
window.location.href = $(this).attr('value');
|
||||
});
|
||||
$(document).on('click', '.delete-btn', function () {
|
||||
var relativePath = $(this).attr('value');
|
||||
$('#deleteRelativePath').val(relativePath);
|
||||
$('#deleteModal').modal('show');
|
||||
});
|
Loading…
Reference in New Issue
Block a user