Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 16396 | Rev 16398 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 16396 Rev 16397
Línea 134... Línea 134...
134
    $(document).ready(function () {
134
    $(document).ready(function () {
135
        listar();
135
        listar();
136
    });
136
    });
Línea 137... Línea 137...
137
 
137
 
-
 
138
    $('#gridTable').DataTable({
-
 
139
        'processing': true,
-
 
140
            'serverSide': true,
-
 
141
            'searching': true,
-
 
142
            'order': [[ 0, 'asc' ]],
-
 
143
            'ordering':  true,
-
 
144
            'ordenable' : true,
-
 
145
            'responsive': true,
-
 
146
            'select' : false,
-
 
147
        	'paging': true,
138
    $('#gridTable').DataTable({
148
            'pagingType': 'simple_numbers',
-
 
149
    		'ajax': {
-
 
150
    			'url' : '$routeDatatable',
-
 
151
    			'type' : 'get',
139
        ajax: {
152
                'beforeSend': function (request) {
-
 
153
                  NProgress.start();
-
 
154
                },
-
 
155
                'dataFilter': function(response) {
-
 
156
                    var response = jQuery.parseJSON( response );
-
 
157
                    
-
 
158
                    var json                = {};
-
 
159
                    json.recordsTotal       = 0;
-
 
160
                    json.recordsFiltered    = 0;
-
 
161
                    json.data               = [];
-
 
162
                    
-
 
163
                    
-
 
164
                    if(response.success) {
-
 
165
                        json.recordsTotal       = response.data.total;
-
 
166
                        json.recordsFiltered    = response.data.total;
140
                 url: '$routeOverview',
167
                        json.data               = response.data.items;
-
 
168
                    } else {
-
 
169
                        $.fn.showError(response.data)
-
 
170
                    }
-
 
171
                    
141
                 method: 'POST'
172
                    return JSON.stringify( json );
142
             },
173
                },
143
             columns: [ 
174
                'aoColumns': [
144
                 {'data':'first_name'},
175
                    { 'mDataProp': 'first_name' },
145
                 {'data':'last_name'},
176
                    { 'mDataProp': 'last_name' },
146
                 {'data':'email'},
177
                    { 'mDataProp': 'email' },
-
 
178
                    { 'mDataProp': 'total_by_day' },
147
                 {'data':'total_by_day'}
179
                    { 'mDataProp': 'added_on' }
-
 
180
                ],
148
             ]
181
    		},
Línea 149... Línea 182...
149
    });
182
    });
150
    
183