मेरी सभी तालिकाओं को शीघ्रता से निर्यात करने के लिए मैंने एक "निर्यात" बटन लागू करने के लिए कुछ कोड जोड़ा है।
droptables इसे अगले आधिकारिक संस्करण में जोड़ें।
संपादित फ़ाइल: /modern/admin/tmpl/droptables/default.php
बटन
जोड़ने के लिए
स्क्रिप्ट:
// सभी तालिकाओं को निर्यात करने का फ़ंक्शन जोड़ें
jQuery(document).ready(function ($) {
$('#export_all').on('click', function(e) {
e.preventDefault();
// वर्तमान दृश्य से सभी तालिका आईडी प्राप्त करें
var tableIds = [];
var base_export_url = " index.php?option=com_droptables droptables task=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('टेबल आईडी:', tableIds);
} else {
console.log('कोई टेबल नहीं मिली');
}
return false;
droptables इसे अगले आधिकारिक संस्करण में जोड़ें।
संपादित फ़ाइल: /modern/admin/tmpl/droptables/default.php
बटन
जोड़ने के लिए
स्क्रिप्ट:
// सभी तालिकाओं को निर्यात करने का फ़ंक्शन जोड़ें
jQuery(document).ready(function ($) {
$('#export_all').on('click', function(e) {
e.preventDefault();
// वर्तमान दृश्य से सभी तालिका आईडी प्राप्त करें
var tableIds = [];
var base_export_url = " index.php?option=com_droptables droptables task=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('टेबल आईडी:', tableIds);
} else {
console.log('कोई टेबल नहीं मिली');
}
return false;
- पृष्ठ :
- 1
इस पोस्ट पर अभी तक कोई जवाब नहीं आया है।.
