X7ROOT File Manager
Current Path:
/var/softaculous/sitepad/editor/site-data/plugins/kkart-pro/assets/js/admin
var
/
softaculous
/
sitepad
/
editor
/
site-data
/
plugins
/
kkart-pro
/
assets
/
js
/
admin
/
ðŸ“
..
📄
api-keys.js
(3.82 KB)
📄
api-keys.min.js
(2.15 KB)
📄
backbone-modal.js
(3.48 KB)
📄
backbone-modal.min.js
(2.19 KB)
📄
kkart-clipboard.js
(858 B)
📄
kkart-clipboard.min.js
(327 B)
📄
kkart-enhanced-select.js
(9.05 KB)
📄
kkart-enhanced-select.min.js
(5.24 KB)
📄
kkart-orders.js
(1.94 KB)
📄
kkart-orders.min.js
(1.13 KB)
📄
kkart-product-export.js
(3.54 KB)
📄
kkart-product-export.min.js
(1.93 KB)
📄
kkart-product-import.js
(2.58 KB)
📄
kkart-product-import.min.js
(1.45 KB)
📄
kkart-setup.js
(10 KB)
📄
kkart-setup.min.js
(6.37 KB)
📄
kkart-shipping-classes.js
(7.96 KB)
📄
kkart-shipping-classes.min.js
(4.46 KB)
📄
kkart-shipping-zone-methods.js
(15.1 KB)
📄
kkart-shipping-zone-methods.min.js
(8.52 KB)
📄
kkart-shipping-zones.js
(8.92 KB)
📄
kkart-shipping-zones.min.js
(4.74 KB)
📄
kkart_admin.js
(13.45 KB)
📄
kkart_admin.min.js
(8.07 KB)
📄
marketplace-suggestions.js
(15.54 KB)
📄
marketplace-suggestions.min.js
(6.11 KB)
📄
meta-boxes-coupon.js
(1.98 KB)
📄
meta-boxes-coupon.min.js
(1.15 KB)
📄
meta-boxes-order.js
(45.57 KB)
📄
meta-boxes-order.min.js
(27.96 KB)
📄
meta-boxes-product-variation.js
(32.37 KB)
📄
meta-boxes-product-variation.min.js
(17.56 KB)
📄
meta-boxes-product.js
(21.64 KB)
📄
meta-boxes-product.min.js
(13.13 KB)
📄
meta-boxes.js
(2.47 KB)
📄
meta-boxes.min.js
(1.71 KB)
📄
network-orders.js
(2.29 KB)
📄
network-orders.min.js
(1.19 KB)
📄
product-ordering.js
(2.25 KB)
📄
product-ordering.min.js
(1.47 KB)
📄
quick-edit.js
(6.73 KB)
📄
quick-edit.min.js
(4.33 KB)
📄
reports.js
(6.31 KB)
📄
reports.min.js
(3.17 KB)
📄
settings-views-html-settings-tax.js
(11.98 KB)
📄
settings-views-html-settings-tax.min.js
(6 KB)
📄
settings.js
(5.36 KB)
📄
settings.min.js
(3.55 KB)
📄
system-status.js
(3.49 KB)
📄
system-status.min.js
(1.92 KB)
📄
term-ordering.js
(4.17 KB)
📄
term-ordering.min.js
(2.19 KB)
📄
users.js
(3.76 KB)
📄
users.min.js
(1.84 KB)
Editing: users.js
/*global kkart_users_params */ jQuery( function ( $ ) { /** * Users country and state fields */ var kkart_users_fields = { states: null, init: function() { if ( typeof kkart_users_params.countries !== 'undefined' ) { /* State/Country select boxes */ this.states = JSON.parse( kkart_users_params.countries.replace( /"/g, '"' ) ); } $( '.js_field-country' ).selectWoo().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 ( kkart_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 = 'kkart.stickState-' + country, value = $this.data( stickstatefield ) ? $this.data( stickstatefield ) : $state.val(), placeholder = $state.attr( 'placeholder' ), $newstate; if ( stickValue ){ $this.data( 'kkart.stickState-' + country, value ); } // Remove the previous DOM element $parent.show().find( '.select2-container' ).remove(); if ( ! $.isEmptyObject( kkart_users_fields.states[ country ] ) ) { var state = kkart_users_fields.states[ country ], $defaultOption = $( '<option value=""></option>' ) .text( kkart_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().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.kkart', [country, $( this ).closest( 'div' )] ); $( document.body ).trigger( 'country-change.kkart', [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( 'kkart.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' ); } ); } }; kkart_users_fields.init(); });
Upload File
Create Folder