Để xuất nhanh tất cả các bảng của tôi, tôi đã thêm một số mã để triển khai nút "XUẤT".
Vui lòng thêm những mã này vào phiên bản chính thức tiếp theo.
đã chỉnh sửa: /modern/admin/tmpl/droptables/default.phpdroptablesđể thêm
nút "Xuất tất cả":
Xuất tất cả
Skript:
// Thêm hàm xuất tất cả bảng
jQuery(document).ready(function ($) {
$('#export_all').on('click', function(e) {
e.preventDefault();
// Lấy tất cả ID bảng từ chế độ xem hiện tại
var tableIds = [];
var base_export_url = "index.php?option=com_droptablesdroptablestask=excel.export&format_excel=xlsx&front=0&onlydata=1&id=";
if (Droptables) {
for (var catID in Droptables) {
if (Droptables(catID)) {
if (typeof Droptables[catID] !== 'undefined' && Droptables[catID].length > 0) {
Droptables[catID].forEach(function(table) {
tableIds.push(table.id);
window.open(base_export_url + table.id, '_blank');
});
}
}
}
console.log('ID Bảng:', tableIds);
} else {
console.log('Không tìm thấy bảng nào');
}
return false;
Vui lòng thêm những mã này vào phiên bản chính thức tiếp theo.
đã chỉnh sửa: /modern/admin/tmpl/droptables/default.phpdroptablesđể thêm
nút "Xuất tất cả":
Xuất tất cả
Skript:
// Thêm hàm xuất tất cả bảng
jQuery(document).ready(function ($) {
$('#export_all').on('click', function(e) {
e.preventDefault();
// Lấy tất cả ID bảng từ chế độ xem hiện tại
var tableIds = [];
var base_export_url = "index.php?option=com_droptablesdroptablestask=excel.export&format_excel=xlsx&front=0&onlydata=1&id=";
if (Droptables) {
for (var catID in Droptables) {
if (Droptables(catID)) {
if (typeof Droptables[catID] !== 'undefined' && Droptables[catID].length > 0) {
Droptables[catID].forEach(function(table) {
tableIds.push(table.id);
window.open(base_export_url + table.id, '_blank');
});
}
}
}
console.log('ID Bảng:', tableIds);
} else {
console.log('Không tìm thấy bảng nào');
}
return false;
- Trang :
- 1
Hiện chưa có ai trả lời bài đăng này.
