Server IP : 103.119.228.120 / Your IP : 3.129.249.170 Web Server : Apache System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : nobody ( 99) PHP Version : 5.6.40 Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/softaculous/sitepad/editor/site-data/plugins/kkart-pro/assets/js/admin/ |
Upload File : |
/*global inlineEditPost, kkart_admin, kkart_quick_edit */ jQuery( function( $ ) { $( '#the-list' ).on( 'click', '.editinline', function() { inlineEditPost.revert(); var post_id = $( this ).closest( 'tr' ).attr( 'id' ); post_id = post_id.replace( 'post-', '' ); var $kkart_inline_data = $( '#kkart_inline_' + post_id ); var sku = $kkart_inline_data.find( '.sku' ).text(), regular_price = $kkart_inline_data.find( '.regular_price' ).text(), sale_price = $kkart_inline_data.find( '.sale_price ' ).text(), weight = $kkart_inline_data.find( '.weight' ).text(), length = $kkart_inline_data.find( '.length' ).text(), width = $kkart_inline_data.find( '.width' ).text(), height = $kkart_inline_data.find( '.height' ).text(), shipping_class = $kkart_inline_data.find( '.shipping_class' ).text(), visibility = $kkart_inline_data.find( '.visibility' ).text(), stock_status = $kkart_inline_data.find( '.stock_status' ).text(), stock = $kkart_inline_data.find( '.stock' ).text(), featured = $kkart_inline_data.find( '.featured' ).text(), manage_stock = $kkart_inline_data.find( '.manage_stock' ).text(), menu_order = $kkart_inline_data.find( '.menu_order' ).text(), tax_status = $kkart_inline_data.find( '.tax_status' ).text(), tax_class = $kkart_inline_data.find( '.tax_class' ).text(), backorders = $kkart_inline_data.find( '.backorders' ).text(), product_type = $kkart_inline_data.find( '.product_type' ).text(); var formatted_regular_price = regular_price.replace( '.', kkart_admin.mon_decimal_point ), formatted_sale_price = sale_price.replace( '.', kkart_admin.mon_decimal_point ); $( 'input[name="_sku"]', '.inline-edit-row' ).val( sku ); $( 'input[name="_regular_price"]', '.inline-edit-row' ).val( formatted_regular_price ); $( 'input[name="_sale_price"]', '.inline-edit-row' ).val( formatted_sale_price ); $( 'input[name="_weight"]', '.inline-edit-row' ).val( weight ); $( 'input[name="_length"]', '.inline-edit-row' ).val( length ); $( 'input[name="_width"]', '.inline-edit-row' ).val( width ); $( 'input[name="_height"]', '.inline-edit-row' ).val( height ); $( 'select[name="_shipping_class"] option:selected', '.inline-edit-row' ).attr( 'selected', false ).change(); $( 'select[name="_shipping_class"] option[value="' + shipping_class + '"]' ).attr( 'selected', 'selected' ).change(); $( 'input[name="_stock"]', '.inline-edit-row' ).val( stock ); $( 'input[name="menu_order"]', '.inline-edit-row' ).val( menu_order ); $( 'select[name="_tax_status"] option, ' + 'select[name="_tax_class"] option, ' + 'select[name="_visibility"] option, ' + 'select[name="_stock_status"] option, ' + 'select[name="_backorders"] option' ).removeAttr( 'selected' ); var is_variable_product = 'variable' === product_type; $( 'select[name="_stock_status"] ~ .kkart-quick-edit-warning', '.inline-edit-row' ).toggle( is_variable_product ); $( 'select[name="_stock_status"] option[value="' + (is_variable_product ? '' : stock_status) + '"]', '.inline-edit-row' ) .attr( 'selected', 'selected' ); $( 'select[name="_tax_status"] option[value="' + tax_status + '"]', '.inline-edit-row' ).attr( 'selected', 'selected' ); $( 'select[name="_tax_class"] option[value="' + tax_class + '"]', '.inline-edit-row' ).attr( 'selected', 'selected' ); $( 'select[name="_visibility"] option[value="' + visibility + '"]', '.inline-edit-row' ).attr( 'selected', 'selected' ); $( 'select[name="_backorders"] option[value="' + backorders + '"]', '.inline-edit-row' ).attr( 'selected', 'selected' ); if ( 'yes' === featured ) { $( 'input[name="_featured"]', '.inline-edit-row' ).attr( 'checked', 'checked' ); } else { $( 'input[name="_featured"]', '.inline-edit-row' ).removeAttr( 'checked' ); } // Conditional display. var product_is_virtual = $kkart_inline_data.find( '.product_is_virtual' ).text(); var product_supports_stock_status = 'external' !== product_type; var product_supports_stock_fields = 'external' !== product_type && 'grouped' !== product_type; $( '.stock_fields, .manage_stock_field, .stock_status_field, .backorder_field' ).show(); if ( product_supports_stock_fields ) { if ( 'yes' === manage_stock ) { $( '.stock_qty_field, .backorder_field', '.inline-edit-row' ).show().removeAttr( 'style' ); $( '.stock_status_field' ).hide(); $( '.manage_stock_field input' ).prop( 'checked', true ); } else { $( '.stock_qty_field, .backorder_field', '.inline-edit-row' ).hide(); $( '.stock_status_field' ).show().removeAttr( 'style' ); $( '.manage_stock_field input' ).prop( 'checked', false ); } } else if ( product_supports_stock_status ) { $( '.stock_fields, .manage_stock_field, .backorder_field' ).hide(); } else { $( '.stock_fields, .manage_stock_field, .stock_status_field, .backorder_field' ).hide(); } if ( 'simple' === product_type || 'external' === product_type ) { $( '.price_fields', '.inline-edit-row' ).show().removeAttr( 'style' ); } else { $( '.price_fields', '.inline-edit-row' ).hide(); } if ( 'yes' === product_is_virtual ) { $( '.dimension_fields', '.inline-edit-row' ).hide(); } else { $( '.dimension_fields', '.inline-edit-row' ).show().removeAttr( 'style' ); } // Rename core strings. $( 'input[name="comment_status"]' ).parent().find( '.checkbox-title' ).text( kkart_quick_edit.strings.allow_reviews ); } ); $( '#the-list' ).on( 'change', '.inline-edit-row input[name="_manage_stock"]', function() { if ( $( this ).is( ':checked' ) ) { $( '.stock_qty_field, .backorder_field', '.inline-edit-row' ).show().removeAttr( 'style' ); $( '.stock_status_field' ).hide(); } else { $( '.stock_qty_field, .backorder_field', '.inline-edit-row' ).hide(); $( '.stock_status_field' ).show().removeAttr( 'style' ); } } ); $( '#wpbody' ).on( 'click', '#doaction, #doaction2', function() { $( 'input.text', '.inline-edit-row' ).val( '' ); $( '#kkart-fields' ).find( 'select' ).prop( 'selectedIndex', 0 ); $( '#kkart-fields-bulk' ).find( '.inline-edit-group .change-input' ).hide(); } ); $( '#wpbody' ).on( 'change', '#kkart-fields-bulk .inline-edit-group .change_to', function() { if ( 0 < $( this ).val() ) { $( this ).closest( 'div' ).find( '.change-input' ).show(); } else { $( this ).closest( 'div' ).find( '.change-input' ).hide(); } } ); $( '#wpbody' ).on( 'click', '.trash-product', function() { return window.confirm( kkart_admin.i18n_delete_product_notice ); } ); } );