HEX
Server: LiteSpeed
System: Linux houston.panomity.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
User: nudepix (1011)
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: /home/nudepix.eu/public_html/wp-content/plugins/gdpr-framework/assets/gdpr-admin.js
jQuery(function ($) {

    // Handler to open the modal dialog
    $(document).on('click', '.gdpr-open-modal', function (e) {
        $($(this).data('gdpr-modal-target')).dialog('open');
        e.preventDefault();
    });

    // Initialize all modals on page
    $('.gdpr-modal').each(function (i, e) {
        var $base = $(this);

        $base.dialog({
            title: $base.data('gdpr-title'),
            dialogClass: 'wp-dialog',
            autoOpen: false,
            draggable: false,
            width: 'auto',
            modal: true,
            resizable: false,
            closeOnEscape: true,
            position: {
                my: "center",
                at: "center",
                of: window
            },
            create: function () {
                // style fix for WordPress admin
                $('.ui-dialog-titlebar-close').addClass('ui-button');
            },
            open: function () {
                // Bind a click on the overlay to close the dialog
                $('.ui-widget-overlay').bind('click', function () {
                    $base.dialog('close');
                });

                // Bind a custom close button to close the dialog
                $base.find('.gdpr-close-modal').bind('click', function (e) {
                    $base.dialog('close');
                    e.preventDefault();
                });

                // Fix overlay CSS issues in admin
                $('.wp-dialog').css('z-index', 9999);
                $('.ui-widget-overlay').css('z-index', 9998);
            },
            close: function () {
                $('.wp-dialog').css('z-index', 101);
                $('.ui-widget-overlay').css('z-index', 100);
            }
        });
    });

    /**
     * https://github.com/DubFriend/jquery.repeater
     */
    $('.js-gdpr-repeater').each(function () {
        var $repeater = $(this).repeater({
            isFirstItemUndeletable: true
        });

        if (typeof window.repeaterData[$(this).data('name')] !== undefined) {
            $repeater.setList(window.repeaterData[$(this).data('name')]);
        }
    });

    /**
     * Init select2
     */
    $('.js-gdpr-select2').select2({
        width: 'style'
    });

    /**
     * Auto-fill DPA info
     */
    $('.js-gdpr-country-selector').on('change', function () {
        var dpaData, $website, $email, $phone;
        var countryCode = $(this).val();

        if (!window.gdprDpaData[countryCode]) {
            return;
        }

        dpaData = window.gdprDpaData[countryCode];

        $website = $('#gdpr_dpa_website');
        if ('' === $website.data('set')) {
            $website.val(dpaData['website']);
        }

        $email = $('#gdpr_dpa_email');
        if ('' === $email.data('set')) {
            $email.val(dpaData['email']);
        }

        $phone = $('#gdpr_dpa_phone');
        if ('' === $phone.data('set')) {
            $phone.val(dpaData['phone']);
        }
    });
});