HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wpprm/wp-content/themes/ronneby/inc/icons/js/generator.js
jQuery(document).ready(function($) {
	"use strict";
    var icon_field;

	$('#mnky-generator ul.icons-list li').each(function() {
		var $self = $(this);
		var selected = $self.hasClass('crdash-wine_alt') ? 'checked' : '';
		var $class = $self.find('i').attr('class');
		var $label = $self.find('label');
		var $icon = $self.find('i').clone();
		$self.prepend('<input name="name" type="radio" value="'+$class+'" id="'+$class+'" '+selected+'>').find('i').remove();
		$label.html('').attr('for', $class).append($icon);
	});
	

    // Custom popup box
    $(document).on('click', '.crum-icon-add', function(evt){

        icon_field = $(this).siblings('.iconname');

        $("#mnky-generator-wrap, #mnky-generator-overlay").show();
		$('.ui-dialog').hide();
		
        $('#mnky-generator-insert').on('click', function(event) {
			
            $('.mnky-generator-icon-select input:checked').addClass("mnky-generator-attr");
            $('.mnky-generator-icon-select input:not(:checked)').removeClass("mnky-generator-attr");


            var icon_name = $('.mnky-generator-icon-select input:checked').val();

            icon_field.val(icon_name);


            $(icon_field).parents('.metro-menu-item').find('.tile-icon').addClass(icon_name);


			$('.ui-dialog').show();
            $("#mnky-generator-wrap, #mnky-generator-overlay").hide();


            // Prevent default action
            event.preventDefault();

            return false;
        });

        return false;
    });

	$(document).on('click', '#mnky-generator-close', function(evt){
		$("#mnky-generator-wrap, #mnky-generator-overlay").hide();
		$('.ui-dialog').show();
        return false;
    });

    // Icon pack select
	$(document).on('change', '#mnky-generator-select-pack', function(){
		$('ul.ul-icon-list').hide();
		$('ul.'+ $(this).val()).show();
	});


});