Server IP : 162.0.217.223 / Your IP : 216.73.216.150 Web Server : LiteSpeed System : Linux premium269.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : mypckeys ( 1539) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/mypckeys/backup/msckey.com/wp-content/plugins/woo-order-export-lite/assets/js/ |
Upload File : |
jQuery.fn.extend( { select2_i18n: function ( $attrs, ajax_method, is_default ) { if ( typeof $attrs !== 'object' ) { $attrs = {}; } var default_params = {language: script_data.select2_locale}; if ( is_default ) { var select2_wo_dropdown_opts = { containerCssClass: 'without-dropdown', dropdownCssClass: 'without-dropdown', }; Object.assign( default_params, select2_wo_dropdown_opts ); } if ( ajax_method ) { let minimumInputLength = 3; if ( script_data.show_all_items_in_filters && ( ajax_method === 'get_categories' || ajax_method === 'get_products') ) { minimumInputLength = 0; } var select2_ajax = { ajax: { url: ajaxurl, dataType: 'json', delay: 250, data: function ( params ) { return { q: params.term ? params.term : "", // search term page: params.page, method: ajax_method, action: "order_exporter", tab: script_data.active_tab, woe_nonce: settings_form.woe_nonce }; }, processResults: function ( data, page ) { return { results: data }; }, cache: true }, escapeMarkup: function ( markup ) { return markup; }, // let our custom formatter work minimumInputLength: minimumInputLength, templateResult: function ( item ) { var markup = '<div class="weo_clearfix">' + '<div>'; if ( typeof item.photo_url !== "undefined" ) { markup += '<img src="' + item.photo_url + '" style="width: 20%;float:left;" />'; } markup += '<div style="width:75%;float:left; padding: 5px;">' + item.text + '</div>' + '</div>' + '</div><div style="clear:both"></div>'; return markup; }, templateSelection: function ( item ) { return item.text; }, }; Object.assign( default_params, select2_ajax ); } $attrs = Object.assign( default_params, $attrs ); jQuery( this ).select2( $attrs ); }, } ); jQuery( document ).ready( function ( $ ) { try { $( '.select2-i18n' ).each( function () { var width = $( this ).attr( 'data-select2-i18n-width' ); $( this ).select2_i18n( width ? {width: + width} : {}, $( this ).attr( 'data-select2-i18n-ajax-method' ), $( this ).attr( 'data-select2-i18n-default' ) ); } ); } catch ( err ) { console.log( err.message ); jQuery( '#select2_warning' ).show(); } } );