golden hour
/var/www/html/wp-content/plugins/woocommerce/assets/js/admin
⬆️ Go Up
Upload
File/Folder
Size
Actions
api-keys.js
3.89 KB
Del
OK
api-keys.min.js
2.21 KB
Del
OK
backbone-modal.js
3.46 KB
Del
OK
backbone-modal.min.js
2.16 KB
Del
OK
marketplace-suggestions.js
15.56 KB
Del
OK
marketplace-suggestions.min.js
6.13 KB
Del
OK
meta-boxes-coupon.js
2.03 KB
Del
OK
meta-boxes-coupon.min.js
1.19 KB
Del
OK
meta-boxes-order.js
46.54 KB
Del
OK
meta-boxes-order.min.js
29.08 KB
Del
OK
meta-boxes-product-variation.js
32.99 KB
Del
OK
meta-boxes-product-variation.min.js
18.34 KB
Del
OK
meta-boxes-product.js
20.82 KB
Del
OK
meta-boxes-product.min.js
12.36 KB
Del
OK
meta-boxes.js
2.33 KB
Del
OK
meta-boxes.min.js
1.56 KB
Del
OK
network-orders.js
2.34 KB
Del
OK
network-orders.min.js
1.24 KB
Del
OK
product-ordering.js
2.26 KB
Del
OK
product-ordering.min.js
1.48 KB
Del
OK
quick-edit.js
6.76 KB
Del
OK
quick-edit.min.js
4.39 KB
Del
OK
reports.js
6.31 KB
Del
OK
reports.min.js
3.17 KB
Del
OK
settings-views-html-settings-tax.js
11.93 KB
Del
OK
settings-views-html-settings-tax.min.js
5.98 KB
Del
OK
settings.js
5.46 KB
Del
OK
settings.min.js
3.61 KB
Del
OK
system-status.js
3.55 KB
Del
OK
system-status.min.js
1.97 KB
Del
OK
term-ordering.js
4.18 KB
Del
OK
term-ordering.min.js
2.2 KB
Del
OK
users.js
3.78 KB
Del
OK
users.min.js
1.87 KB
Del
OK
wc-clipboard.js
869 B
Del
OK
wc-clipboard.min.js
336 B
Del
OK
wc-enhanced-select.js
10.41 KB
Del
OK
wc-enhanced-select.min.js
5.92 KB
Del
OK
wc-orders.js
1.9 KB
Del
OK
wc-orders.min.js
1.11 KB
Del
OK
wc-product-export.js
3.63 KB
Del
OK
wc-product-export.min.js
2.02 KB
Del
OK
wc-product-import.js
2.58 KB
Del
OK
wc-product-import.min.js
1.45 KB
Del
OK
wc-setup.js
10.05 KB
Del
OK
wc-setup.min.js
6.32 KB
Del
OK
wc-shipping-classes.js
7.92 KB
Del
OK
wc-shipping-classes.min.js
4.42 KB
Del
OK
wc-shipping-zone-methods.js
15.15 KB
Del
OK
wc-shipping-zone-methods.min.js
8.49 KB
Del
OK
wc-shipping-zones.js
8.99 KB
Del
OK
wc-shipping-zones.min.js
4.76 KB
Del
OK
wc-status-widget.js
737 B
Del
OK
wc-status-widget.min.js
511 B
Del
OK
woocommerce_admin.js
13.64 KB
Del
OK
woocommerce_admin.min.js
8.12 KB
Del
OK
Edit: settings.js
/* global woocommerce_settings_params, wp */ ( function( $, params, wp ) { $( function() { // Sell Countries $( 'select#woocommerce_allowed_countries' ).on( 'change', function() { if ( 'specific' === $( this ).val() ) { $( this ).closest('tr').next( 'tr' ).hide(); $( this ).closest('tr').next().next( 'tr' ).show(); } else if ( 'all_except' === $( this ).val() ) { $( this ).closest('tr').next( 'tr' ).show(); $( this ).closest('tr').next().next( 'tr' ).hide(); } else { $( this ).closest('tr').next( 'tr' ).hide(); $( this ).closest('tr').next().next( 'tr' ).hide(); } }).trigger( 'change' ); // Ship Countries $( 'select#woocommerce_ship_to_countries' ).on( 'change', function() { if ( 'specific' === $( this ).val() ) { $( this ).closest('tr').next( 'tr' ).show(); } else { $( this ).closest('tr').next( 'tr' ).hide(); } }).trigger( 'change' ); // Stock management $( 'input#woocommerce_manage_stock' ).on( 'change', function() { if ( $( this ).is(':checked') ) { $( this ).closest('tbody').find( '.manage_stock_field' ).closest( 'tr' ).show(); } else { $( this ).closest('tbody').find( '.manage_stock_field' ).closest( 'tr' ).hide(); } }).trigger( 'change' ); // Color picker $( '.colorpick' ) .iris({ change: function( event, ui ) { $( this ).parent().find( '.colorpickpreview' ).css({ backgroundColor: ui.color.toString() }); }, hide: true, border: true }) .on( 'click focus', function( event ) { event.stopPropagation(); $( '.iris-picker' ).hide(); $( this ).closest( 'td' ).find( '.iris-picker' ).show(); $( this ).data( 'originalValue', $( this ).val() ); }) .on( 'change', function() { if ( $( this ).is( '.iris-error' ) ) { var original_value = $( this ).data( 'originalValue' ); if ( original_value.match( /^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/ ) ) { $( this ).val( $( this ).data( 'originalValue' ) ).trigger( 'change' ); } else { $( this ).val( '' ).trigger( 'change' ); } } }); $( 'body' ).on( 'click', function() { $( '.iris-picker' ).hide(); }); // Edit prompt $( function() { var changed = false; $( 'input, textarea, select, checkbox' ).on( 'change', function() { if ( ! changed ) { window.onbeforeunload = function() { return params.i18n_nav_warning; }; changed = true; } }); $( '.submit :input' ).on( 'click', function() { window.onbeforeunload = ''; }); }); // Sorting $( 'table.wc_gateways tbody, table.wc_shipping tbody' ).sortable({ items: 'tr', cursor: 'move', axis: 'y', handle: 'td.sort', scrollSensitivity: 40, helper: function( event, ui ) { ui.children().each( function() { $( this ).width( $( this ).width() ); }); ui.css( 'left', '0' ); return ui; }, start: function( event, ui ) { ui.item.css( 'background-color', '#f6f6f6' ); }, stop: function( event, ui ) { ui.item.removeAttr( 'style' ); ui.item.trigger( 'updateMoveButtons' ); } }); // Select all/none $( '.woocommerce' ).on( 'click', '.select_all', function() { $( this ).closest( 'td' ).find( 'select option' ).prop( 'selected', true ); $( this ).closest( 'td' ).find( 'select' ).trigger( 'change' ); return false; }); $( '.woocommerce' ).on( 'click', '.select_none', function() { $( this ).closest( 'td' ).find( 'select option' ).prop( 'selected', false ); $( this ).closest( 'td' ).find( 'select' ).trigger( 'change' ); return false; }); // Re-order buttons. $( '.wc-item-reorder-nav').find( '.wc-move-up, .wc-move-down' ).on( 'click', function() { var moveBtn = $( this ), $row = moveBtn.closest( 'tr' ); moveBtn.trigger( 'focus' ); var isMoveUp = moveBtn.is( '.wc-move-up' ), isMoveDown = moveBtn.is( '.wc-move-down' ); if ( isMoveUp ) { var $previewRow = $row.prev( 'tr' ); if ( $previewRow && $previewRow.length ) { $previewRow.before( $row ); wp.a11y.speak( params.i18n_moved_up ); } } else if ( isMoveDown ) { var $nextRow = $row.next( 'tr' ); if ( $nextRow && $nextRow.length ) { $nextRow.after( $row ); wp.a11y.speak( params.i18n_moved_down ); } } moveBtn.trigger( 'focus' ); // Re-focus after the container was moved. moveBtn.closest( 'table' ).trigger( 'updateMoveButtons' ); } ); $( '.wc-item-reorder-nav').closest( 'table' ).on( 'updateMoveButtons', function() { var table = $( this ), lastRow = $( this ).find( 'tbody tr:last' ), firstRow = $( this ).find( 'tbody tr:first' ); table.find( '.wc-item-reorder-nav .wc-move-disabled' ).removeClass( 'wc-move-disabled' ) .attr( { 'tabindex': '0', 'aria-hidden': 'false' } ); firstRow.find( '.wc-item-reorder-nav .wc-move-up' ).addClass( 'wc-move-disabled' ) .attr( { 'tabindex': '-1', 'aria-hidden': 'true' } ); lastRow.find( '.wc-item-reorder-nav .wc-move-down' ).addClass( 'wc-move-disabled' ) .attr( { 'tabindex': '-1', 'aria-hidden': 'true' } ); } ); $( '.wc-item-reorder-nav').closest( 'table' ).trigger( 'updateMoveButtons' ); $( '.submit button' ).on( 'click', function() { if ( $( 'select#woocommerce_allowed_countries' ).val() === 'specific' && ! $( '[name="woocommerce_specific_allowed_countries[]"]' ).val() ) { if ( window.confirm( woocommerce_settings_params.i18n_no_specific_countries_selected ) ) { return true; } return false; } } ); }); })( jQuery, woocommerce_settings_params, wp );
Save