MOON
Server: Apache
System: Linux server.netcommlabs.in 3.10.0-1160.83.1.el7.x86_64 #1 SMP Wed Jan 25 16:41:43 UTC 2023 x86_64
User: dermova (1051)
PHP: 5.4.45
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/dermova/public_html/india/wp-content/plugins/wptouch/admin/js/wptouch-ajax.js
// Let's see if we're in a *happy* browser : )
function wptouchIsWebKit() {
	// Only recent versions of WebKit browsers have this
	return ( '-webkit-filter' in document.body.style );
}

function wptouchSetupAjax() {
	jQuery.ajaxSetup ({
	    cache: false
	});
}

var wptouchTotalAjaxEnabled = 0;

function wptouchAdminAjaxEnableSpinner( enable ) {
	if ( enable ) {
		jQuery( '#admin-spinner' ).show();
		if ( wptouchIsWebKit() ) {
			console.log( 'Saving item…' );
		}
		wptouchTotalAjaxEnabled = wptouchTotalAjaxEnabled + 1;
	} else {
		wptouchTotalAjaxEnabled = wptouchTotalAjaxEnabled - 1;
	}

	if ( wptouchTotalAjaxEnabled == 0 ) {
		jQuery( '#admin-spinner' ).fadeOut( 500 );
		if ( wptouchIsWebKit() ) {
			console.log( 'Save complete.' );
		}
	}
}

function wptouchAdminAjax( actionName, actionParams, callback ) {	
	var ajaxData = {
		action: 'wptouch_ajax',
		wptouch_action: actionName,
		wptouch_ajax_nonce: WPtouchAjax.admin_ajax_nonce
	};
	
	for ( name in actionParams ) { ajaxData[name] = actionParams[name]; }

	wptouchAdminAjaxEnableSpinner( true );

	jQuery.post( ajaxurl, ajaxData, function( result ) {
		wptouchAdminAjaxEnableSpinner( false );

		callback( result );	
	});	
}

jQuery( document ).ready( function() { wptouchSetupAjax(); } );