HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux sa-dev.otherchirps.net 5.15.0-139-generic #149-Ubuntu SMP Fri Apr 11 22:06:13 UTC 2025 x86_64
User: www-data (33)
PHP: 8.0.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/html/wp-content/plugins/image-hover-effects-ultimate/assets/backend/js/shortcode.js
jQuery.noConflict();
(function ($) {
    var styleid = '';
    var childid = '';

    async function Oxi_Image_Admin_Shortcode(
        functionname,
        rawdata,
        styleid,
        childid,
        callback
    ) {
        if (functionname === '') {
            alert('Confirm Function Name');
            return false;
        }
        let result;
        try {
            result = await $.ajax({
                url: image_hover_settings.ajaxurl,
                method: 'POST',
                data: {
                    action: 'image_hover_settings',
                    _wpnonce: image_hover_settings.nonce,
                    functionname: functionname,
                    styleid: styleid,
                    childid: childid,
                    rawdata: rawdata
                }
            });

            if (result) {
                try {
                    console.log(JSON.parse(result));
                    return callback(JSON.parse(result));
                } catch (e) {
                    console.log(result);
                    return callback(result)
                }
            }
        } catch (error) {
            console.error(error);
        }
    }


    $('#oxi-import-style').on('click', function () {
        $('#oxi-addons-style-import-modal').modal('show');
    });

    $('.oxi-addons-style-clone').on('click', function (e) {
        e.preventDefault();
        $('#oxistyleid').val($(this).attr('datavalue'));
        $('#oxi-addons-style-clone-modal').modal('show');
    });


    $("#oxi-addons-style-clone-modal-form").submit(function (e) {
        e.preventDefault();
        var rawdata = $('#addons-style-name').val();
        var styleid = $('#oxistyleid').val();
        var functionname = "layouts_clone";
        $('.modal-footer').prepend('<span class="spinner sa-spinner-open-left"></span>');
        Oxi_Image_Admin_Shortcode(functionname, rawdata, styleid, childid, function (callback) {
            setTimeout(function () {
                document.location.href = callback;
            }, 1000);
        });
    });


    $('.oxi-addons-style-delete').on('click', function (e) {
        e.preventDefault();

        var status = confirm("Do you want to Delete this Shortcode? Before delete kindly confirm that you don't use or already replaced this Shortcode. If deleted will never Restored.");
        if (status == false) {
            return false;
        }
        var $This = $(this);
        var rawdata = 'deleting';
        var styleid = $This.val();
        var functionname = 'shortcode_delete';
        $(this).parents('td').append('<span class="spinner sa-spinner-open"></span>');
        Oxi_Image_Admin_Shortcode(
            functionname,
            rawdata,
            styleid,
            childid,
            function (callback) {

                setTimeout(function () {
                    if (callback === 'done') {
                        $This.parents('tr').remove();
                    }
                }, 1000);
            }
        );
    });


    setTimeout(function () {
        if ($('.table').hasClass('oxi_addons_table_data')) {
            $('.oxi_addons_table_data').DataTable({
                aLengthMenu: [
                    [7, 25, 50, -1],
                    [7, 25, 50, 'All'],
                ],
                initComplete: function (settings, json) {
                    $('.oxi-addons-row.table-responsive')
                        .css('opacity', '1')
                        .animate(
                            {
                                height: $('.oxi-addons-row.table-responsive').get(0)
                                    .scrollHeight,
                            },
                            1000
                        );
                },
            });
        }
    }, 500);

})(jQuery);