Youtube Demo
Here’s a breakdown:
- Checking for jQuery:
- It first verifies if jQuery exists (
$('#jquerycdn')
). If not, it dynamically adds the jQuery library from a CDN (https://code.jquery.com/jquery-2.2.4.min.js
). - This ensures the script works even if jQuery isn’t pre-loaded in adminer.php.
afterJqueryLoad
Function:
- This function executes after jQuery loads.
adminerCheckboxes
Array:
- It defines an array containing the names of the tables you want to select (e.g.,
ps_address
,ps_address_format etc
).
- Selecting Tables:
- The code iterates through the
adminerCheckboxes
array in reverse order (for...loop
). - For each table name:
- It uses jQuery to find the checkbox element with the corresponding value (
$(
table tbody [value="${adminerCheckboxes[i]}"])
). - It triggers a
click
event on the checkbox to simulate selecting it. - It then triggers a
click
event on the element two levels up in the DOM structure (parent().parent().next()
) which likely corresponds to the "export" button or action for that table.
In Summary:
This script automates selecting predefined tables for export in adminer.php using jQuery. It dynamically loads jQuery if needed and simulates clicks on checkboxes and potentially export buttons.
Support
For any kind of technical assistance, just mail us at sales@codeeshop.com
You can check our website for your next ecommerce project CodeEshop