Submit
Path:
~
/
/
usr
/
local
/
sitepad
/
editor
/
site-data
/
plugins
/
kkart-pro
/
assets
/
js
/
admin
/
File Content:
system-status.js
/* global jQuery, kkart_admin_system_status, wcSetClipboard, wcClearClipboard */ jQuery( function ( $ ) { /** * Users country and state fields */ var wcSystemStatus = { init: function() { $( document.body ) .on( 'click', 'a.help_tip, a.kkart-help-tip', this.preventTipTipClick ) .on( 'click', 'a.debug-report', this.generateReport ) .on( 'click', '#copy-for-support', this.copyReport ) .on( 'aftercopy', '#copy-for-support', this.copySuccess ) .on( 'aftercopyfailure', '#copy-for-support', this.copyFail ); }, /** * Prevent anchor behavior when click on TipTip. * * @return {Bool} */ preventTipTipClick: function() { return false; }, /** * Generate system status report. * * @return {Bool} */ generateReport: function() { var report = ''; $( '.kkart_status_table thead, .kkart_status_table tbody' ).each( function() { if ( $( this ).is( 'thead' ) ) { var label = $( this ).find( 'th:eq(0)' ).data( 'export-label' ) || $( this ).text(); report = report + '\n### ' + $.trim( label ) + ' ###\n\n'; } else { $( 'tr', $( this ) ).each( function() { var label = $( this ).find( 'td:eq(0)' ).data( 'export-label' ) || $( this ).find( 'td:eq(0)' ).text(); var the_name = $.trim( label ).replace( /(<([^>]+)>)/ig, '' ); // Remove HTML. // Find value var $value_html = $( this ).find( 'td:eq(2)' ).clone(); $value_html.find( '.private' ).remove(); $value_html.find( '.dashicons-yes' ).replaceWith( '✔' ); $value_html.find( '.dashicons-no-alt, .dashicons-warning' ).replaceWith( '❌' ); // Format value var the_value = $.trim( $value_html.text() ); var value_array = the_value.split( ', ' ); if ( value_array.length > 1 ) { // If value have a list of plugins ','. // Split to add new line. var temp_line =''; $.each( value_array, function( key, line ) { temp_line = temp_line + line + '\n'; }); the_value = temp_line; } report = report + '' + the_name + ': ' + the_value + '\n'; }); } }); try { $( '#debug-report' ).slideDown(); $( '#debug-report' ).find( 'textarea' ).val( '`' + report + '`' ).focus().select(); $( this ).fadeOut(); return false; } catch ( e ) { /* jshint devel: true */ console.log( e ); } return false; }, /** * Copy for report. * * @param {Object} evt Copy event. */ copyReport: function( evt ) { wcClearClipboard(); wcSetClipboard( $( '#debug-report' ).find( 'textarea' ).val(), $( this ) ); evt.preventDefault(); }, /** * Display a "Copied!" tip when success copying */ copySuccess: function() { $( '#copy-for-support' ).tipTip({ 'attribute': 'data-tip', 'activation': 'focus', 'fadeIn': 50, 'fadeOut': 50, 'delay': 0 }).focus(); }, /** * Displays the copy error message when failure copying. */ copyFail: function() { $( '.copy-error' ).removeClass( 'hidden' ); $( '#debug-report' ).find( 'textarea' ).focus().select(); } }; wcSystemStatus.init(); $( '.kkart_status_table' ).on( 'click', '.run-tool .button', function( evt ) { evt.stopImmediatePropagation(); return window.confirm( kkart_admin_system_status.run_tool_confirmation ); }); $( '#log-viewer-select' ).on( 'click', 'h2 a.page-title-action', function( evt ) { evt.stopImmediatePropagation(); return window.confirm( kkart_admin_system_status.delete_log_confirmation ); }); });
Submit
FILE
FOLDER
Name
Size
Permission
Action
api-keys.js
3907 bytes
0644
api-keys.min.js
2203 bytes
0644
backbone-modal.js
3564 bytes
0644
backbone-modal.min.js
2245 bytes
0644
kkart-clipboard.js
858 bytes
0644
kkart-clipboard.min.js
327 bytes
0644
kkart-enhanced-select.js
9265 bytes
0644
kkart-enhanced-select.min.js
5366 bytes
0644
kkart-orders.js
1988 bytes
0644
kkart-orders.min.js
1153 bytes
0644
kkart-product-export.js
3627 bytes
0644
kkart-product-export.min.js
1973 bytes
0644
kkart-product-import.js
2643 bytes
0644
kkart-product-import.min.js
1484 bytes
0644
kkart-setup.js
10238 bytes
0644
kkart-setup.min.js
6519 bytes
0644
kkart-shipping-classes.js
8147 bytes
0644
kkart-shipping-classes.min.js
4565 bytes
0644
kkart-shipping-zone-methods.js
15463 bytes
0644
kkart-shipping-zone-methods.min.js
8723 bytes
0644
kkart-shipping-zones.js
9138 bytes
0644
kkart-shipping-zones.min.js
4852 bytes
0644
kkart_admin.js
13768 bytes
0644
kkart_admin.min.js
8261 bytes
0644
marketplace-suggestions.js
15910 bytes
0644
marketplace-suggestions.min.js
6252 bytes
0644
meta-boxes-coupon.js
2029 bytes
0644
meta-boxes-coupon.min.js
1177 bytes
0644
meta-boxes-order.js
46662 bytes
0644
meta-boxes-order.min.js
28628 bytes
0644
meta-boxes-product-variation.js
33142 bytes
0644
meta-boxes-product-variation.min.js
17982 bytes
0644
meta-boxes-product.js
22161 bytes
0644
meta-boxes-product.min.js
13440 bytes
0644
meta-boxes.js
2532 bytes
0644
meta-boxes.min.js
1750 bytes
0644
network-orders.js
2340 bytes
0644
network-orders.min.js
1217 bytes
0644
product-ordering.js
2306 bytes
0644
product-ordering.min.js
1510 bytes
0644
quick-edit.js
6895 bytes
0644
quick-edit.min.js
4435 bytes
0644
reports.js
6463 bytes
0644
reports.min.js
3251 bytes
0644
settings-views-html-settings-tax.js
12267 bytes
0644
settings-views-html-settings-tax.min.js
6142 bytes
0644
settings.js
5488 bytes
0644
settings.min.js
3633 bytes
0644
system-status.js
3577 bytes
0644
system-status.min.js
1967 bytes
0644
term-ordering.js
4268 bytes
0644
term-ordering.min.js
2245 bytes
0644
users.js
3855 bytes
0644
users.min.js
1881 bytes
0644
N4ST4R_ID | Naxtarrr