Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 66 Rev 16822
Línea 11... Línea 11...
11
$allowDelete = $acl->isAllowed($roleName, 'microlearning/content/quizzes/delete') ? 1 : 0;
11
$allowDelete = $acl->isAllowed($roleName, 'microlearning/content/quizzes/delete') ? 1 : 0;
12
$allowCopy = $acl->isAllowed($roleName, 'microlearning/content/quizzes/copy') ? 1 : 0;
12
$allowCopy = $acl->isAllowed($roleName, 'microlearning/content/quizzes/copy') ? 1 : 0;
13
$allowCheck = $acl->isAllowed($roleName, 'microlearning/content/quizzes/check') ? 1 : 0;
13
$allowCheck = $acl->isAllowed($roleName, 'microlearning/content/quizzes/check') ? 1 : 0;
14
$allowQuestion = $acl->isAllowed($roleName, 'microlearning/content/quizzes/questions') ? 1 : 0;
14
$allowQuestion = $acl->isAllowed($roleName, 'microlearning/content/quizzes/questions') ? 1 : 0;
Línea 15... Línea 15...
15
 
15
 
16
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
16
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
Línea 17... Línea 17...
17
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
17
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
18
 
18
 
Línea 19... Línea 19...
19
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
19
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.css'));
20
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-responsive/css/responsive.bootstrap4.min.css'));
20
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.css'));
21
 
21
 
22
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
22
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net/jquery.dataTables.js'));
Línea 23... Línea 23...
23
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
23
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.js'));
24
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
24
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/dataTables.responsive.min.js'));
Línea 25... Línea -...
25
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
-
 
26
 
-
 
Línea 27... Línea -...
27
 
-
 
28
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
-
 
Línea 29... Línea -...
29
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
-
 
Línea -... Línea 25...
-
 
25
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.min.js'));
-
 
26
 
Línea -... Línea 27...
-
 
27
 
-
 
28
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
-
 
29
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
30
 
30
 
31
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
31
 
32
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
32
 
Línea 33... Línea 33...
33
 
33
 
34
 
34
 
Línea 128... Línea 128...
128
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
128
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
129
                },
129
                },
130
            },
130
            },
131
            'drawCallback': function( settings ) {
131
            'drawCallback': function( settings ) {
132
                NProgress.done();
132
                NProgress.done();
133
                $('button.btn-delete').confirmation({
-
 
134
                    rootSelector: 'button.btn-delete',
-
 
135
                    title : 'LABEL_ARE_YOU_SURE',
-
 
136
                    singleton : true,
-
 
137
                    btnOkLabel: 'LABEL_YES',
-
 
138
                    btnCancelLabel: 'LABEL_NO',
-
 
139
                    onConfirm: function(value) {
-
 
140
                        action = $(this).data('href');
-
 
141
                        NProgress.start();
-
 
142
                        $.ajax({
-
 
143
                            'dataType'  : 'json',
-
 
144
                            'accept'    : 'application/json',
-
 
-
 
133
                
145
                            'method'    : 'post',
-
 
146
                            'url'       :  action,
-
 
147
                        }).done(function(response) {
-
 
148
                            if(response['success']) {
-
 
149
                                $.fn.showSuccess(response['data']);
-
 
150
                                gridTable.api().ajax.reload(null, false);
-
 
151
                            } else {
-
 
152
                                $.fn.showError(response['data']);
-
 
153
                            }
-
 
154
                        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
155
                            $.fn.showError(textStatus);
-
 
156
                        }).always(function() {
-
 
157
                            NProgress.done();
-
 
158
                        });
-
 
159
                    },
-
 
160
                });
-
 
161
            },
134
            },
162
            'aoColumns': [
135
            'aoColumns': [
163
                { 'mDataProp': 'name' },
136
                { 'mDataProp': 'name' },
164
                { 'mDataProp': 'details' },
137
                { 'mDataProp': 'details' },
165
                { 'mDataProp': 'actions' },
138
                { 'mDataProp': 'actions' },
Línea 436... Línea 409...
436
        }).always(function() {
409
        }).always(function() {
437
            NProgress.done();
410
            NProgress.done();
438
        });
411
        });
439
    });
412
    });
Línea -... Línea 413...
-
 
413
 
-
 
414
    $('body').on('click', 'button.btn-delete', function(e) { 
-
 
415
        e.preventDefault();
-
 
416
        var action = $(this).data('href');
-
 
417
 
-
 
418
 
-
 
419
          swal.fire({
-
 
420
            title: 'LABEL_ARE_YOU_SURE',
-
 
421
            icon: 'question',
-
 
422
            cancelButtonText: 'LABEL_NO',
-
 
423
            showCancelButton: true,
-
 
424
            confirmButtonText: 'LABEL_YES'
-
 
425
          }).then((result) => {
-
 
426
            if (result.isConfirmed) {
-
 
427
 
-
 
428
                    NProgress.start();
-
 
429
                    $.ajax({
-
 
430
                        'dataType'  : 'json',
-
 
431
                        'accept'    : 'application/json',
-
 
432
                        'method'    : 'post',
-
 
433
                        'url'       :  action,
-
 
434
                    }).done(function(response) {
-
 
435
                        if(response['success']) {
-
 
436
                            $.fn.showSuccess(response['data']);
-
 
437
                            gridTable.api().ajax.reload(null, false);
-
 
438
                        } else {
-
 
439
                            $.fn.showError(response['data']);
-
 
440
                        }
-
 
441
                    }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
442
                        $.fn.showError(textStatus);
-
 
443
                    }).always(function() {
-
 
444
                        NProgress.done();
-
 
445
                    });
-
 
446
            }
-
 
447
       });
Línea 440... Línea 448...
440
 
448
    });
441
 
449
 
Línea 560... Línea 568...
560
				</div>
568
				</div>
561
          	</div>
569
          	</div>
Línea 562... Línea 570...
562
          	
570
          	
563
         	<div class="modal-footer">
571
         	<div class="modal-footer">
564
    			<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
572
    			<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
565
    			<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
573
    			 <button type="button" class="btn btn-light" data-bs-dismiss="modal">LABEL_CLOSE</button>
566
          	</div>
574
          	</div>
567
      	<?php echo $this->form()->closeTag($form); ?>	
575
      	<?php echo $this->form()->closeTag($form); ?>	
Línea 568... Línea 576...
568
    	</div>
576
    	</div>