/
var
/
www
/
vhosts
/
ihelp.ro
/
ajutam.ro
/
wp-content
/
plugins
/
woocommerce
/
assets
/
js
/
admin
/
/var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/woocommerce/assets/js/admin
mkdir
upload
Name
Size
Mode
Actions
api-keys.js
3986
0644
edit
dl
rm
api-keys.min.js
2268
0644
edit
dl
rm
backbone-modal.js
3543
0644
edit
dl
rm
backbone-modal.min.js
2214
0644
edit
dl
rm
marketplace-suggestions.js
15965
0644
edit
dl
rm
marketplace-suggestions.min.js
6311
0644
edit
dl
rm
meta-boxes-coupon.js
2075
0644
edit
dl
rm
meta-boxes-coupon.min.js
1219
0644
edit
dl
rm
meta-boxes-order.js
47963
0644
edit
dl
rm
meta-boxes-order.min.js
29991
0644
edit
dl
rm
meta-boxes-product-variation.js
34329
0644
edit
dl
rm
meta-boxes-product-variation.min.js
19168
0644
edit
dl
rm
meta-boxes-product.js
21319
0644
edit
dl
rm
meta-boxes-product.min.js
12654
0644
edit
dl
rm
meta-boxes.js
2387
0644
edit
dl
rm
meta-boxes.min.js
1598
0644
edit
dl
rm
network-orders.js
2394
0644
edit
dl
rm
network-orders.min.js
1265
0644
edit
dl
rm
product-ordering.js
2312
0644
edit
dl
rm
product-ordering.min.js
1516
0644
edit
dl
rm
quick-edit.js
6942
0644
edit
dl
rm
quick-edit.min.js
4508
0644
edit
dl
rm
reports.js
6461
0644
edit
dl
rm
reports.min.js
3248
0644
edit
dl
rm
settings-views-html-settings-tax.js
12219
0644
edit
dl
rm
settings-views-html-settings-tax.min.js
6126
0644
edit
dl
rm
settings.js
5593
0644
edit
dl
rm
settings.min.js
3698
0644
edit
dl
rm
system-status.js
3636
0644
edit
dl
rm
system-status.min.js
2014
0644
edit
dl
rm
term-ordering.js
4280
0644
edit
dl
rm
term-ordering.min.js
2251
0644
edit
dl
rm
users.js
3875
0644
edit
dl
rm
users.min.js
1917
0644
edit
dl
rm
wc-clipboard.js
869
0644
edit
dl
rm
wc-clipboard.min.js
336
0644
edit
dl
rm
wc-enhanced-select.js
10662
0644
edit
dl
rm
wc-enhanced-select.min.js
6061
0644
edit
dl
rm
wc-orders.js
1949
0644
edit
dl
rm
wc-orders.min.js
1135
0644
edit
dl
rm
wc-product-export.js
3719
0644
edit
dl
rm
wc-product-export.min.js
2066
0644
edit
dl
rm
wc-product-import.js
2640
0644
edit
dl
rm
wc-product-import.min.js
1484
0644
edit
dl
rm
wc-setup.js
10290
0644
edit
dl
rm
wc-setup.min.js
6476
0644
edit
dl
rm
wc-shipping-classes.js
8112
0644
edit
dl
rm
wc-shipping-classes.min.js
4526
0644
edit
dl
rm
wc-shipping-zone-methods.js
15517
0644
edit
dl
rm
wc-shipping-zone-methods.min.js
8690
0644
edit
dl
rm
wc-shipping-zones.js
9202
0644
edit
dl
rm
wc-shipping-zones.min.js
4874
0644
edit
dl
rm
wc-status-widget.js
737
0644
edit
dl
rm
wc-status-widget.min.js
511
0644
edit
dl
rm
woocommerce_admin.js
15331
0644
edit
dl
rm
woocommerce_admin.min.js
8792
0644
edit
dl
rm
Edit:
/var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/woocommerce/assets/js/admin/users.js
(3875B)
/*global wc_users_params */ jQuery( function ( $ ) { /** * Users country and state fields */ var wc_users_fields = { states: null, init: function() { if ( typeof wc_users_params.countries !== 'undefined' ) { /* State/Country select boxes */ this.states = JSON.parse( wc_users_params.countries.replace( /"/g, '"' ) ); } $( '.js_field-country' ).selectWoo().on( 'change', this.change_country ); $( '.js_field-country' ).trigger( 'change', [ true ] ); $( document.body ).on( 'change', 'select.js_field-state', this.change_state ); $( document.body ).on( 'click', 'button.js_copy-billing', this.copy_billing ); }, change_country: function( e, stickValue ) { // Check for stickValue before using it if ( typeof stickValue === 'undefined' ) { stickValue = false; } // Prevent if we don't have the metabox data if ( wc_users_fields.states === null ) { return; } var $this = $( this ), country = $this.val(), $state = $this.parents( '.form-table' ).find( ':input.js_field-state' ), $parent = $state.parent(), input_name = $state.attr( 'name' ), input_id = $state.attr( 'id' ), stickstatefield = 'woocommerce.stickState-' + country, value = $this.data( stickstatefield ) ? $this.data( stickstatefield ) : $state.val(), placeholder = $state.attr( 'placeholder' ), $newstate; if ( stickValue ){ $this.data( 'woocommerce.stickState-' + country, value ); } // Remove the previous DOM element $parent.show().find( '.select2-container' ).remove(); if ( ! $.isEmptyObject( wc_users_fields.states[ country ] ) ) { var state = wc_users_fields.states[ country ], $defaultOption = $( '<option value=""></option>' ) .text( wc_users_fields.i18n_select_state_text ); $newstate = $( '<select style="width: 25em;"></select>' ) .prop( 'id', input_id ) .prop( 'name', input_name ) .prop( 'placeholder', placeholder ) .addClass( 'js_field-state' ) .append( $defaultOption ); $.each( state, function( index ) { var $option = $( '<option></option>' ) .prop( 'value', index ) .text( state[ index ] ); $newstate.append( $option ); } ); $newstate.val( value ); $state.replaceWith( $newstate ); $newstate.show().selectWoo().hide().trigger( 'change' ); } else { $newstate = $( '<input type="text" />' ) .prop( 'id', input_id ) .prop( 'name', input_name ) .prop( 'placeholder', placeholder ) .addClass( 'js_field-state regular-text' ) .val( value ); $state.replaceWith( $newstate ); } // This event has a typo - deprecated in 2.5.0 $( document.body ).trigger( 'contry-change.woocommerce', [country, $( this ).closest( 'div' )] ); $( document.body ).trigger( 'country-change.woocommerce', [country, $( this ).closest( 'div' )] ); }, change_state: function() { // Here we will find if state value on a select has changed and stick it to the country data var $this = $( this ), state = $this.val(), $country = $this.parents( '.form-table' ).find( ':input.js_field-country' ), country = $country.val(); $country.data( 'woocommerce.stickState-' + country, state ); }, copy_billing: function( event ) { event.preventDefault(); $( '#fieldset-billing' ).find( 'input, select' ).each( function( i, el ) { // The address keys match up, except for the prefix var shipName = el.name.replace( /^billing_/, 'shipping_' ); // Swap prefix, then check if there are any elements var shipEl = $( '[name="' + shipName + '"]' ); // No corresponding shipping field, skip this item if ( ! shipEl.length ) { return; } // Found a matching shipping element, update the value shipEl.val( el.value ).trigger( 'change' ); } ); } }; wc_users_fields.init(); });
Save
cmd:
run