AnonSec Shell
Server IP : 162.214.74.102  /  Your IP : 216.73.217.103
Web Server : Apache
System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64
User : lrsys ( 1015)
PHP Version : 5.6.40
Disable Function : exec,passthru,shell_exec,system
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/lrsys/public_html/lrsys_apps/dialogo/application/plugins/module_crm/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/lrsys/public_html/lrsys_apps/dialogo/application/plugins/module_crm/assets/js/default.js
$(document).ready(function()
{
    // MASCARAS
    $(".dt").mask("99-99-9999");
    $(".hr").mask("99:99");
    $(".amount").maskMoney();

    // SELECTS
    $(".contact_select").select2({
        theme: "bootstrap",
        ajax: {
            url: $("#_url").val() + 'module_crm/ajax/contacts',
            dataType: 'json',
            delay: 250,
            method: "POST",
            data: function (params) {

                var queryParameters = {
                    term: params.term
                };

                return queryParameters;
            },
            processResults: function (data) {

                return {
                    results: $.map(data, function (item) {
                        return {
                            text: item.name,
                            id: item.id
                        }
                    })
                };
            },
            cache: true
        }
    });

    // SELECTS
    $(".company_select").select2({
        // maximumSelectionLength: 2
        theme: "bootstrap",
        ajax: {
            url: $("#_url").val() + 'module_crm/ajax/companies',
            dataType: 'json',
            delay: 250,
            method: "POST",
            data: function (params) {

                var queryParameters = {
                    term: params.term
                };

                return queryParameters;
            },
            processResults: function (data) {

                console.log(data);

                return {
                    results: $.map(data, function (item) {
                        return {
                            text: item.name,
                            id: item.id
                        }
                    })
                };
            },
            cache: true
        }
    });

    // SELECTS
    $(".account_select").select2({
        // maximumSelectionLength: 1,
        theme: "bootstrap",
        ajax: {
            url: $("#_url").val() + 'module_crm/ajax/account',
            dataType: 'json',
            delay: 250,
            method: "POST",
            data: function (params) {

                var queryParameters = {
                    term: params.term
                };

                return queryParameters;
            },
            processResults: function (data) {

                console.log(data);

                return {
                    results: $.map(data, function (item) {
                        return {
                            text: item.name,
                            id: item.id
                        }
                    })
                };
            },
            cache: true
        }
    });

    // SELECTS
    $(".business_select").select2({
        // maximumSelectionLength: 1,
        theme: "bootstrap",
        ajax: {
            url: $("#_url").val() + 'module_crm/ajax/business',
            dataType: 'json',
            delay: 250,
            method: "POST",
            data: function (params) {

                var queryParameters = {
                    term: params.term
                };

                return queryParameters;
            },
            processResults: function (data) {

                return {
                    results: $.map(data, function (item) {
                        return {
                            text: item.name,
                            id: item.id
                        }
                    })
                };
            },
            cache: true
        }
    });

    var id = $("input[name=id_business]").val();

    $.ajax({
        url: $("#_url").val() + 'module_crm/ajax/timeline',
        dataType: 'json',
        method: "POST",
        data: {id: id},
        success: function (data) {

            var timeline = $('#myTimeline');
            var html = '';

            $.each(data, function (i, item) {

                var type = '';
                var subject = '';
                var note = '';
                var icon = '';

                if (typeof data[i].subject !== 'undefined') {
                    subject = data[i].subject + '<span class="pull-right">' + data[i].activity + '</span>';
                    // activity
                    type = '<div class="panel panel-success">';
                    icon = '<i class="glyphicon glyphicon-edit"></i> '
                } else {
                    subject = '';
                    // note
                    type = '<div class="panel panel-primary">';
                    icon = '<i class="glyphicon glyphicon-list-alt"></i> '
                }

                if (typeof data[i].note !== 'undefined') {
                    note = data[i].note;
                } else {
                    note = data[i].notes;
                }

                html += type;
                html += '<div class="panel-heading"><h3 class="panel-title">' + icon + data[i].fullname + '<span class="pull-right">' + data[i].created_at + '</span></span></h3></div>';
                html += '<div class="panel-body"><h2>' + subject + '</h2>' + note + '</div>';

                if (typeof data[i].subject !== 'undefined') {
                    html += '<div class="panel-footer">';

                    if (data[i].date !== null) {
                        html += '<span style="padding-right: 10px;"><b>Data</b>: ' + data[i].date + ' </span>';
                    }

                    if (data[i].hour !== null) {
                        html += '<span style="padding-right: 10px;"><b>Hora</b>: ' + data[i].hour + ' </span>';
                    }

                    if (data[i].duration !== null) {
                        html += '<span style="padding-right: 10px;"><b>Duração</b>: ' + data[i].duration + '</span>';
                    }

                    html += '</div>';
                }

                html += '</div>';
            });

            timeline.prepend(html);
        },
        error: function () {
        },
        complete: function () {
        }
    });

});

Anon7 - 2022
AnonSec Team