html-admin-dashboard-setup.php
5 months ago
html-admin-page-addons-category-nav.php
4 years ago
html-admin-page-product-export.php
1 year ago
html-admin-page-reports.php
2 years ago
html-admin-page-status-logs-db.php
2 years ago
html-admin-page-status-logs.php
2 years ago
html-admin-page-status-report.php
1 month ago
html-admin-page-status-tools.php
2 years ago
html-admin-page-status.php
8 years ago
html-admin-settings.php
1 month ago
html-bulk-edit-product.php
1 year ago
html-email-template-preview.php
1 year ago
html-notice-base-table-missing.php
3 years ago
html-notice-custom.php
8 years ago
html-notice-download-dir-sync-complete.php
2 years ago
html-notice-install.php
5 years ago
html-notice-legacy-shipping.php
11 months ago
html-notice-maxmind-license-key.php
6 years ago
html-notice-no-shipping-methods.php
2 years ago
html-notice-redirect-only-download.php
4 years ago
html-notice-regenerating-lookup-table.php
5 years ago
html-notice-regenerating-thumbnails.php
8 years ago
html-notice-secure-connection.php
2 years ago
html-notice-sync-on-read-disabled.php
3 months ago
html-notice-template-check.php
2 years ago
html-notice-update.php
4 months ago
html-notice-updated.php
7 years ago
html-notice-updating.php
6 years ago
html-notice-uploads-directory-is-unprotected.php
2 years ago
html-notice-wp-php-minimum-requirements.php
2 years ago
html-quick-edit-product.php
1 year ago
html-report-by-date.php
5 years ago
html-admin-page-status-logs-db.php
65 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Admin View: Page - Status Database Logs |
| 4 | * |
| 5 | * @package WooCommerce\Admin\Logs |
| 6 | */ |
| 7 | |
| 8 | if ( ! defined( 'ABSPATH' ) ) { |
| 9 | exit; |
| 10 | } |
| 11 | |
| 12 | $delete_confirmation_js = sprintf( |
| 13 | "return window.confirm( '%s' )", |
| 14 | esc_js( __( 'Are you sure you want to clear all logs from the database?', 'woocommerce' ) ) |
| 15 | ); |
| 16 | ?> |
| 17 | <form method="get" id="mainform"> |
| 18 | <input type="hidden" name="page" value="wc-status" /> |
| 19 | <input type="hidden" name="tab" value="logs" /> |
| 20 | |
| 21 | <?php $log_table_list->search_box( __( 'Search logs', 'woocommerce' ), 'log' ); ?> |
| 22 | <?php $log_table_list->display(); ?> |
| 23 | |
| 24 | <?php |
| 25 | submit_button( |
| 26 | __( 'Flush all logs', 'woocommerce' ), |
| 27 | 'delete', |
| 28 | 'flush-logs', |
| 29 | true, |
| 30 | array( |
| 31 | 'onclick' => esc_attr( $delete_confirmation_js ), |
| 32 | ) |
| 33 | ); |
| 34 | ?> |
| 35 | </form> |
| 36 | <script> |
| 37 | document.addEventListener( 'DOMContentLoaded', function() { |
| 38 | var contextToggles = Array.from( document.getElementsByClassName( 'log-toggle' ) ); |
| 39 | contextToggles.forEach( ( element ) => { |
| 40 | element.addEventListener( 'click', ( event ) => { |
| 41 | event.preventDefault(); |
| 42 | const button = event.currentTarget; |
| 43 | const buttonLabel = button.querySelector( '.log-toggle-label' ); |
| 44 | const buttonIcon = button.querySelector( '.dashicons' ); |
| 45 | const context = document.getElementById( 'log-context-' + button.dataset.logId ); |
| 46 | |
| 47 | switch ( button.dataset.toggleStatus ) { |
| 48 | case 'off': |
| 49 | context.style.display = 'table-row'; |
| 50 | buttonLabel.textContent = button.dataset.labelHide; |
| 51 | buttonIcon.classList.replace( 'dashicons-arrow-down-alt2', 'dashicons-arrow-up-alt2' ); |
| 52 | button.dataset.toggleStatus = 'on'; |
| 53 | break; |
| 54 | case 'on': |
| 55 | context.style.display = 'none'; |
| 56 | buttonLabel.textContent = button.dataset.labelShow; |
| 57 | buttonIcon.classList.replace( 'dashicons-arrow-up-alt2', 'dashicons-arrow-down-alt2' ); |
| 58 | button.dataset.toggleStatus = 'off'; |
| 59 | break; |
| 60 | } |
| 61 | } ); |
| 62 | } ); |
| 63 | } ); |
| 64 | </script> |
| 65 |