HEX
Server: Apache
System: Linux server1.panigaletech.com 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.30
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/dev.captainschairit.com/wp-content/plugins/wp-mail-logging/js/modal.js
jQuery(function ($) {

    var wpml = {};

    wpml.modal = {
        self : this,
        id : undefined,
        selectedFormat: undefined,
        init: function () {
            var selected = $('#wp-mail-logging-modal-content-header-format-switch').find('.checked');
            var selectedFormat = $(selected).children("input").attr('id');
            wpml.modal.setSelectedFormat(selectedFormat);
            $('#wp-mail-logging-modal-content-header-format-switch input').on('ifChecked', function( event ) {
                wpml.modal.setSelectedFormat( $(this).attr('id') );
            });
        },
        clear: function () {
            $('#wp-mail-logging-modal-content-body-content').html('');
        },
        set: function ($value) {
            $('#wp-mail-logging-modal-content-body-content').html($value);
        },
        show: function () {
            $('#wp-mail-logging-modal-wrap').fadeIn();
        },
        hide: function () {
            $('#wp-mail-logging-modal-wrap').fadeOut();
        },
        setSelectedFormat: function( newFormat ) {
            wpml.modal.selectedFormat = newFormat;
                jQuery.ajax({
                type: 'POST',
                url: ajaxurl,
                data: {
                    'action': wpml_modal_ajax.action,
                    '_ajax_nonce': wpml_modal_ajax.nonce,
                    'id': wpml.modal.id,
                    'format': wpml.modal.selectedFormat
                },
                success: wpml.modal.ajaxResponse,
                error: wpml.modal.ajaxError
            });
        },
        ajaxResponse: function( response_data, textStatus, XMLHttpRequest ) {
            if (response_data.success) {
                wpml.modal.set(response_data.data);
            } else {
                wpml.modal.set("Error (" + response_data.data.code + "): '" + response_data.data.message + "'");
            }
        },
        ajaxError: function (XMLHttpRequest, textStatus, errorThrown) {
            wpml.modal.set(errorThrown);
        }
    };

    $('.wp-mail-logging-view-message').click(function () {
        wpml.modal.id = $(this).data('mail-id');
        wpml.modal.init();
        wpml.modal.show();
    });
    $('.wp-mail-logging-modal-close').click(function () {
        wpml.modal.hide();
    });
    $(document).keyup(function(e) {
        if (e.keyCode === 27) wpml.modal.hide();
    });
});