[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.227.52.200: ~ $
/**
 * Ajax install the Theme Plugin
 *
 */
(function($, window, document, undefined){
	"use strict";
	$(function(){
		$( '#kadence-notice-starter-templates .notice-dismiss' ).on( 'click', function( event ) {
			kadence_dismissNotice();
		} );
		function kadence_dismissNotice(){
			var data = new FormData();
			data.append( 'action', 'kadence_dismiss_notice' );
			data.append( 'security', kadenceStarterInstall.ajax_nonce );
			$.ajax({
				url : kadenceStarterInstall.ajax_url,
				method:  'POST',
				data: data,
				contentType: false,
				processData: false,
			});
		}
		$( '#kadence-notice-starter-templates .kadence-install-starter-btn' ).on( 'click', function( event ) {
			var $button = $( event.target );
			event.preventDefault();
			/**
			 * Keep button from running twice
			 */
			if ( $button.hasClass( 'updating-message' ) || $button.hasClass( 'button-disabled' ) ) {
				return;
			}

			var data = new FormData();
			data.append( 'action', 'kadence_install_starter' );
			data.append( 'security', kadenceStarterInstall.ajax_nonce );
			data.append( 'status', kadenceStarterInstall.status );

			/**
			 * Install a plugin
			 *
			 * @return void
			 */
			function installPlugin(){
				$.ajax({
					method: 'POST',
					url: kadenceStarterInstall.ajax_url,
					data: data,
					contentType: false,
					processData: false,
					beforeSend: function () {
						buttonStatusInProgress( $button.data('installing-label') );
					},
					success: function( response ) {
						if ( response.success ) {
							buttonStatusInstalled( $button.data('installed-label') );
							buttonStatusDisabled( $button.data('activated-label') );
							kadence_dismissNotice();
							location.replace( $button.data('redirect-url') );
						} else {
							console.log( response );
							buttonStatusDisabled( response.data );
						}
					},
					error: function (xhr, ajaxOptions, thrownError) {
						console.log( xhr.responseText );
						// Installation failed
						buttonStatusDisabled( 'Error' );
					}
				});
			}

			/**
			 * Activate a plugin
			 *
			 * @return void
			 */
			function activatePlugin(){

				$.ajax({
					url: kadenceStarterInstall.ajax_url,
					method:  'POST',
					data: data,
					contentType: false,
					processData: false,
					beforeSend: function () {
						buttonStatusInProgress( $button.data('activating-label') );
					},
					success: function( response ) {
						if ( response.success ) {
							buttonStatusDisabled( $button.data('activated-label') );
							kadence_dismissNotice();
							location.replace( $button.data('redirect-url') );
						} else {
							console.log( response );
							buttonStatusDisabled( response.data );
						}
					},
					error: function (xhr, ajaxOptions, thrownError) {
						 // Activation failed
						console.log( xhr.responseText );
						buttonStatusDisabled( 'Error' );
					}
				});
			}

			/**
			 * Change button status to in-progress
			 *
			 * @return void
			 */
			function buttonStatusInProgress( message ){
				$button.addClass('updating-message').removeClass('button-disabled kt-not-installed installed').text( message );
			}

			/**
			 * Change button status to disabled
			 *
			 * @return void
			 */
			function buttonStatusDisabled( message ){
				$button.removeClass('updating-message kt-not-installed installed')
				.addClass('button-disabled')
				.text( message );
			}

			/**
			 * Change button status to installed
			 *
			 * @return void
			 */
			function buttonStatusInstalled( message ){
				$button.removeClass('updating-message kt-not-installed')
					.addClass('installed')
					.text( message );
			}


			if ( kadenceStarterInstall.status === 'install' ){
				installPlugin();
			} else if( kadenceStarterInstall.status === 'activate' ){
				activatePlugin();
			}
		});
	});
})(jQuery, window, document);

Filemanager

Name Type Size Permission Actions
admin-activate.js File 3.75 KB 0644
cart-update.js File 157 B 0644
css-vars-ponyfill.js File 41.91 KB 0644
gutenberg-notice.js File 649 B 0644
ie.js File 1.17 KB 0644
lightbox-init.js File 2.37 KB 0644
navigation-lite.js File 18.54 KB 0644
navigation.js File 43.36 KB 0644
product-cls.js File 526 B 0644
shop-spinner.js File 1.93 KB 0644
shop-toggle.js File 4.91 KB 0644
simplelightbox.js File 13.74 KB 0644
slide-init.js File 3.64 KB 0644
splide-init.js File 4.91 KB 0644
splide.js File 81.98 KB 0644
text-widgets.js File 11.34 KB 0644