Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 16701 Rev 16822
Línea 10... Línea 10...
10
 
10
 
11
$allowAdd       = $acl->isAllowed($roleName, 'my-coach/categories/add') ? 1 : 0;
11
$allowAdd       = $acl->isAllowed($roleName, 'my-coach/categories/add') ? 1 : 0;
12
$allowEdit      = $acl->isAllowed($roleName, 'my-coach/categories/edit') ? 1 : 0;
12
$allowEdit      = $acl->isAllowed($roleName, 'my-coach/categories/edit') ? 1 : 0;
Línea 13... Línea 13...
13
$allowDelete    = $acl->isAllowed($roleName, 'my-coach/categories/delete') ? 1 : 0;
13
$allowDelete    = $acl->isAllowed($roleName, 'my-coach/categories/delete') ? 1 : 0;
14
 
14
 
Línea 15... Línea 15...
15
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
15
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
16
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
16
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
17
 
17
 
Línea 18... Línea 18...
18
 
18
 
Línea 19... Línea 19...
19
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
19
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/jquery.validate.js'));
20
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
20
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/additional-methods.js'));
Línea 21... Línea 21...
21
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
21
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/localization/messages_es.js'));
22
 
22
 
Línea 23... Línea -...
23
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
-
 
24
 
-
 
Línea 25... Línea -...
25
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
-
 
26
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
-
 
27
 
-
 
Línea -... Línea 23...
-
 
23
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.css'));
-
 
24
 
-
 
25
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net/jquery.dataTables.js'));
-
 
26
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.js'));
-
 
27
 
28
 
28
 
Línea 29... Línea 29...
29
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
29
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
30
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
30
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
Línea 151... Línea 151...
151
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
151
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
152
                },
152
                },
153
            },
153
            },
154
            'drawCallback': function( settings ) {
154
            'drawCallback': function( settings ) {
155
                NProgress.done();
155
                NProgress.done();
156
                $('button.btn-delete').confirmation({
-
 
157
                    rootSelector: 'button.btn-delete',
-
 
158
                    title : 'LABEL_ARE_YOU_SURE',
-
 
159
                    singleton : true,
-
 
160
                    btnOkLabel: 'LABEL_YES',
-
 
161
                    btnCancelLabel: 'LABEL_NO',
-
 
162
                    onConfirm: function(value) {
-
 
163
                        action = $(this).data('href');
-
 
164
                        NProgress.start();
-
 
165
                        $.ajax({
-
 
166
                            'dataType'  : 'json',
-
 
167
                            'accept'    : 'application/json',
-
 
-
 
156
                
168
                            'method'    : 'post',
-
 
169
                            'url'       :  action,
-
 
170
                        }).done(function(response) {
-
 
171
                            if(response['success']) {
-
 
172
                                $.fn.showSuccess(response['data']);
-
 
173
                                gridTable.api().ajax.reload(null, false);
-
 
174
                            } else {
-
 
175
                                $.fn.showError(response['data']);
-
 
176
                            }
-
 
177
                        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
178
                            $.fn.showError(textStatus);
-
 
179
                        }).always(function() {
-
 
180
                            NProgress.done();
-
 
181
                        });
-
 
182
                    },
-
 
183
                });
-
 
184
            },
157
            },
185
            'aoColumns': [
158
            'aoColumns': [
186
                { 'mDataProp': 'name' },
159
                { 'mDataProp': 'name' },
187
                { 'mDataProp': 'privacy' },
160
                { 'mDataProp': 'privacy' },
188
                { 'mDataProp': 'status' },
161
                { 'mDataProp': 'status' },
Línea 204... Línea 177...
204
                    'targets': -2,
177
                    'targets': -2,
205
                    'orderable': false,
178
                    'orderable': false,
206
                    'className' : 'text-center',
179
                    'className' : 'text-center',
207
                      'render' : function ( data, type, row ) {
180
                      'render' : function ( data, type, row ) {
Línea 208... Línea 181...
208
                      
181
                      
209
                        checked = data == 'a' ? ' checked="checked" ' : '';
182
                        checked = data == 'a'  ? 'checked' : '';
210
                        return '<div class="checkbox checkbox-success">' +
183
                        return '<div class="form-check">' +
211
                            '<input class="styled" type="checkbox" ' + checked + ' disabled="disabled">' +
184
                            '<input type="checkbox" class="form-check-input" disabled="" checked="' + checked + '">' +
212
                            '<label ></label></div>';
185
                            '<label class="form-check-label" for="checkCheckedDisabled"></label></div>' ;
213
                    }
186
                    }
214
                },
187
                },
215
                {
188
                {
216
                    'targets': -1,
189
                    'targets': -1,
Línea 353... Línea 326...
353
        $('body').on('click', 'button.btn-cancel', function(e) {
326
        $('body').on('click', 'button.btn-cancel', function(e) {
354
            e.preventDefault();
327
            e.preventDefault();
355
            $('#modal').modal('hide');
328
            $('#modal').modal('hide');
356
        });
329
        });
Línea -... Línea 330...
-
 
330
 
-
 
331
    $('body').on('click', 'button.btn-delete', function(e) { 
-
 
332
        e.preventDefault();
-
 
333
        var action = $(this).data('href');
-
 
334
 
-
 
335
 
-
 
336
          swal.fire({
-
 
337
            title: 'LABEL_ARE_YOU_SURE',
-
 
338
            icon: 'question',
-
 
339
            cancelButtonText: 'LABEL_NO',
-
 
340
            showCancelButton: true,
-
 
341
            confirmButtonText: 'LABEL_YES'
-
 
342
          }).then((result) => {
-
 
343
            if (result.isConfirmed) {
-
 
344
 
-
 
345
                    NProgress.start();
-
 
346
                    $.ajax({
-
 
347
                        'dataType'  : 'json',
-
 
348
                        'accept'    : 'application/json',
-
 
349
                        'method'    : 'post',
-
 
350
                        'url'       :  action,
-
 
351
                    }).done(function(response) {
-
 
352
                        if(response['success']) {
-
 
353
                            $.fn.showSuccess(response['data']);
-
 
354
                            gridTable.api().ajax.reload(null, false);
-
 
355
                        } else {
-
 
356
                            $.fn.showError(response['data']);
-
 
357
                        }
-
 
358
                    }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
359
                        $.fn.showError(textStatus);
-
 
360
                    }).always(function() {
-
 
361
                        NProgress.done();
-
 
362
                    });
-
 
363
                }
-
 
364
           });
-
 
365
        });
357
 
366
 
358
        $('#form #privacy').select2({
367
        $('#form #privacy').select2({
359
            theme: 'bootstrap4',
368
            theme: 'bootstrap4',
360
            width: '100%',
369
            width: '100%',
Línea 421... Línea 430...
421
        <div class="modal-content">
430
        <div class="modal-content">
Línea 422... Línea 431...
422
 
431
 
423
            <!-- Modal Header -->
432
            <!-- Modal Header -->
424
            <div class="modal-header">
433
            <div class="modal-header">
425
                <h4 class="modal-title">LABEL_MY_COACH_CATEGORIES - <span id="form-title"></span></h4>
434
                <h4 class="modal-title">LABEL_MY_COACH_CATEGORIES - <span id="form-title"></span></h4>
426
                <button type="button" class="close" data-dismiss="modal">&times;</button>
435
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="btn-close"></button>
Línea 427... Línea 436...
427
            </div>
436
            </div>
428
 
437
 
Línea 485... Línea 494...
485
 
494
 
486
            <?php echo $this->form()->closeTag($form); ?>
495
            <?php echo $this->form()->closeTag($form); ?>
487
            <!-- Modal footer -->
496
            <!-- Modal footer -->
488
            <div class="modal-footer">
497
            <div class="modal-footer">
489
                <button type="submit" id="submitBtn" form="form" class="btn btn-primary">LABEL_SAVE</button>
498
                <button type="submit" id="submitBtn" form="form" class="btn btn-primary">LABEL_SAVE</button>
490
                <button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
499
                 <button type="button" class="btn btn-light" data-bs-dismiss="modal">LABEL_CLOSE</button>
491
            </div>
500
            </div>
Línea 492... Línea 501...
492
        </div>
501
        </div>