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/clinic.corals.io/resources/infyom/infyom-generator-templates/scaffold/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/clinic.corals.io/resources/infyom/infyom-generator-templates/scaffold/jquery.stub
'use strict';

let tableName = '#$MODEL_NAME_PLURAL_CAMEL$Table';
$(tableName).DataTable({
    scrollX: true,
    deferRender: true,
    scroller: true,
    processing: true,
    serverSide: true,
    'order': [[0, 'asc']],
    ajax: {
        url: route('$ROUTE_NAMED_PREFIX$$MODEL_NAME_PLURAL_CAMEL$.index'),
    },
    columnDefs: [
        {
            'targets': [$ACTION_COLUMN_COUNT$],
            'orderable': false,
            'className': 'text-center',
            'width': '8%',
        },
    ],
    columns: [
        $JQUERY_FIELDS$
        {
            data: function (row) {
                let data = [
                    {
                        'id': row.id,
                        'editUrl': route('$ROUTE_NAMED_PREFIX$$MODEL_NAME_PLURAL_CAMEL$.edit', row.id),
                    },
                ];

                return prepareTemplateRender('#actionsTemplates',
                    data);
            },
            name: 'id',
        },
    ],
});

$(document).on('click', '.delete-btn', function (event) {
    let recordId = $(event.currentTarget).data('id');
    deleteItem(route('$ROUTE_NAMED_PREFIX$$MODEL_NAME_PLURAL_CAMEL$.destroy', recordId), tableName, '$MODEL_NAME_HUMAN$');
});

Spamworldpro Mini