Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/rentpix.corals.io/public/assets/themes/admin/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/rentpix.corals.io/public/assets/themes/admin/js/main.js
"use strict";

$(document).ajaxStart(function () {
    // Pace.restart();
});

$(document).ajaxComplete(function () {
    initThemeElements();
});

$(document).ready(function () {
    if ($('.sidebar-menu').length) {
        $('.sidebar-menu').tree();
    }

    set_menu_classes();

    initThemeElements();
});

let url = window.base_url + '/reservations/search';

$(".reservations-search-bar-select2").select2({
    ajax: {
        url: url,
        dataType: 'json',
        delay: 250,
        data: function (params) {
            return {
                q: params.term, // search term
                page: params.page
            };
        },
        processResults: function (data, params) {
            // parse the results into the format expected by Select2
            // since we are using custom formatting functions we do not need to
            // alter the remote JSON data, except to indicate that infinite
            // scrolling can be used
            params.page = params.page || 1;

            return {
                results: data.items,
                pagination: {
                    more: (params.page * 30) < data.total_count
                }
            };
        },
        cache: true
    },
    placeholder: 'Search for Reservations...',
    minimumInputLength: 4,
    templateResult: formatRepo,
    templateSelection: formatRepoSelection
});
function formatRepo(repo) {
    if (repo.loading) {
        return repo.text;
    }

    return $(`<div class='clearfix'>${repo.code}</div>`);

}

function formatRepoSelection(repo) {
    return repo.full_name || repo.text;
}

Spamworldpro Mini