Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 16747 Rev 16822
Línea 8... Línea 8...
8
$allowDownload  = $acl->isAllowed($roleName, 'reports/users-blocked/excel') ? 1 : 0;
8
$allowDownload  = $acl->isAllowed($roleName, 'reports/users-blocked/excel') ? 1 : 0;
9
//$allowEdit      = $acl->isAllowed($roleName, 'reports/users-blocked/edit') ? 1 : 0;
9
//$allowEdit      = $acl->isAllowed($roleName, 'reports/users-blocked/edit') ? 1 : 0;
10
//$allowDelete      = $acl->isAllowed($roleName, 'reports/users-blocked/delete') ? 1 : 0;
10
//$allowDelete      = $acl->isAllowed($roleName, 'reports/users-blocked/delete') ? 1 : 0;
Línea 11... Línea 11...
11
 
11
 
12
 
12
 
13
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
13
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
14
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
14
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
15
$this->inlineScript()->appendFile($this->basePath('plugins/jsrender/jsrender.js'));
15
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jsrender/jsrender.js'));
16
 
16
 
17
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
17
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.css'));
18
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-responsive/css/responsive.bootstrap4.min.css'));
18
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.css'));
19
 
19
 
20
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
20
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net/jquery.dataTables.js'));
21
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
21
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.js'));
Línea 22... Línea 22...
22
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
22
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/dataTables.responsive.min.js'));
23
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
23
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.min.js'));
Línea 179... Línea 179...
179
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
179
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
180
                },
180
                },
181
            },
181
            },
182
            'drawCallback': function( settings ) {
182
            'drawCallback': function( settings ) {
183
                NProgress.done();
183
                NProgress.done();
184
                $('button.btn-delete').confirmation({
-
 
185
                    rootSelector: 'button.btn-delete',
-
 
186
                    title : 'LABEL_ARE_YOU_SURE',
-
 
187
                    singleton : true,
-
 
188
                    btnOkLabel: 'LABEL_YES',
-
 
189
                    btnCancelLabel: 'LABEL_NO',
-
 
190
                    onConfirm: function(value) {
-
 
191
                        action = $(this).data('href');
-
 
192
                        NProgress.start();
-
 
193
                        $.ajax({
-
 
194
                            'dataType'  : 'json',
-
 
195
                            'accept'    : 'application/json',
-
 
-
 
184
              
196
                            'method'    : 'post',
-
 
197
                            'url'       :  action,
-
 
198
                        }).done(function(response) {
-
 
199
                            if(response['success']) {
-
 
200
                                $.fn.showSuccess(response['data']);
-
 
201
                                gridTable.api().ajax.reload(null, false);
-
 
202
                            } else {
-
 
203
                                $.fn.showError(response['data']);
-
 
204
                            }
-
 
205
                        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
206
                            $.fn.showError(textStatus);
-
 
207
                        }).always(function() {
-
 
208
                            NProgress.done();
-
 
209
                        });
-
 
210
                    },
-
 
211
                });
-
 
212
            },
185
            },
213
            'aoColumns': [
186
            'aoColumns': [
214
                { 'mDataProp': 'first_name' },
187
                { 'mDataProp': 'first_name' },
215
                { 'mDataProp': 'last_name' },
188
                { 'mDataProp': 'last_name' },
216
                { 'mDataProp': 'email' },
189
                { 'mDataProp': 'email' },
Línea 233... Línea 206...
233
                    'targets': -2,
206
                    'targets': -2,
234
                    'orderable': false,
207
                    'orderable': false,
235
                    'className' : 'text-center',
208
                    'className' : 'text-center',
236
                      'render' : function ( data, type, row ) {
209
                      'render' : function ( data, type, row ) {
Línea 237... Línea 210...
237
                      
210
                      
238
                        checked = data == 'a' ? ' checked="checked" ' : '';
211
                        checked = data == 'a'  ? 'checked' : '';
239
                        return '<div class="checkbox checkbox-success">' +
212
                        return '<div class="form-check">' +
240
                            '<input class="styled" type="checkbox" ' + checked + ' disabled="disabled">' +
213
                            '<input type="checkbox" class="form-check-input" disabled="" checked="' + checked + '">' +
241
                            '<label ></label></div>';
214
                            '<label class="form-check-label" for="checkCheckedDisabled"></label></div>' ;
242
                    }
215
                    }
243
                },
216
                },
244
                {
217
                {
245
                    'targets': -1,
218
                    'targets': -1,
Línea 267... Línea 240...
267
        $.fn.loadData();
240
        $.fn.loadData();
Línea 268... Línea 241...
268
    
241
    
Línea -... Línea 242...
-
 
242
 
-
 
243
    });
-
 
244
 
-
 
245
 $('body').on('click', 'button.btn-delete', function(e) { 
-
 
246
        e.preventDefault();
-
 
247
        var action = $(this).data('href');
-
 
248
 
-
 
249
 
-
 
250
          swal.fire({
-
 
251
            title: 'LABEL_ARE_YOU_SURE',
-
 
252
            icon: 'question',
-
 
253
            cancelButtonText: 'LABEL_NO',
-
 
254
            showCancelButton: true,
-
 
255
            confirmButtonText: 'LABEL_YES'
-
 
256
          }).then((result) => {
-
 
257
            if (result.isConfirmed) {
-
 
258
 
-
 
259
                    NProgress.start();
-
 
260
                    $.ajax({
-
 
261
                        'dataType'  : 'json',
-
 
262
                        'accept'    : 'application/json',
-
 
263
                        'method'    : 'post',
-
 
264
                        'url'       :  action,
-
 
265
                    }).done(function(response) {
-
 
266
                        if(response['success']) {
-
 
267
                            $.fn.showSuccess(response['data']);
-
 
268
                            gridTable.api().ajax.reload(null, false);
-
 
269
                        } else {
-
 
270
                            $.fn.showError(response['data']);
-
 
271
                        }
-
 
272
                    }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
273
                        $.fn.showError(textStatus);
-
 
274
                    }).always(function() {
-
 
275
                        NProgress.done();
-
 
276
                    });
Línea 269... Línea 277...
269
 
277
            }
270
    });
278
       });