Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 12080 Rev 16822
Línea 16... Línea 16...
16
 
16
 
17
$allowAdd = $acl->isAllowed($roleName, 'microlearning/content/quizzes/questions/answers/add') ? 1 : 0;
17
$allowAdd = $acl->isAllowed($roleName, 'microlearning/content/quizzes/questions/answers/add') ? 1 : 0;
18
$allowEdit = $acl->isAllowed($roleName, 'microlearning/content/quizzes/questions/answers/edit') ? 1 : 0;
18
$allowEdit = $acl->isAllowed($roleName, 'microlearning/content/quizzes/questions/answers/edit') ? 1 : 0;
Línea 19... Línea 19...
19
$allowDelete = $acl->isAllowed($roleName, 'microlearning/content/quizzes/questions/answers/delete') ? 1 : 0;
19
$allowDelete = $acl->isAllowed($roleName, 'microlearning/content/quizzes/questions/answers/delete') ? 1 : 0;
20
 
20
 
Línea 21... Línea 21...
21
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
21
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
22
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
22
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
Línea 23... Línea 23...
23
 
23
 
24
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
24
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.css'));
25
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-responsive/css/responsive.bootstrap4.min.css'));
25
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.css'));
26
 
26
 
Línea 27... Línea 27...
27
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
27
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net/jquery.dataTables.js'));
28
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
28
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.js'));
Línea 29... Línea -...
29
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
-
 
30
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
-
 
Línea 31... Línea -...
31
 
-
 
32
 
-
 
Línea 33... Línea -...
33
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
-
 
Línea -... Línea 29...
-
 
29
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/dataTables.responsive.min.js'));
-
 
30
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.min.js'));
Línea -... Línea 31...
-
 
31
 
-
 
32
 
-
 
33
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
34
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
34
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
35
 
35
 
36
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
36
 
Línea 37... Línea 37...
37
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
37
 
Línea 123... Línea 123...
123
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
123
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
124
                },
124
                },
125
            },
125
            },
126
            'drawCallback': function( settings ) {
126
            'drawCallback': function( settings ) {
127
                NProgress.done();
127
                NProgress.done();
128
                $('button.btn-delete').confirmation({
-
 
129
                    rootSelector: 'button.btn-delete',
-
 
130
                    title : 'LABEL_ARE_YOU_SURE',
-
 
131
                    singleton : true,
-
 
132
                    btnOkLabel: 'LABEL_YES',
-
 
133
                    btnCancelLabel: 'LABEL_NO',
-
 
134
                    onConfirm: function(value) {
-
 
135
                        action = $(this).data('href');
-
 
136
                        NProgress.start();
-
 
137
                        $.ajax({
-
 
138
                            'dataType'  : 'json',
-
 
139
                            'accept'    : 'application/json',
-
 
-
 
128
               
140
                            'method'    : 'post',
-
 
141
                            'url'       :  action,
-
 
142
                        }).done(function(response) {
-
 
143
                            if(response['success']) {
-
 
144
                                $.fn.showSuccess(response['data']);
-
 
145
                                gridTable.api().ajax.reload(null, false);
-
 
146
                            } else {
-
 
147
                                $.fn.showError(response['data']);
-
 
148
                            }
-
 
149
                        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
150
                            $.fn.showError(textStatus);
-
 
151
                        }).always(function() {
-
 
152
                            NProgress.done();
-
 
153
                        });
-
 
154
                    },
-
 
155
                });
-
 
156
            },
129
            },
157
            'aoColumns': [
130
            'aoColumns': [
158
                { 'mDataProp': 'text' },
131
                { 'mDataProp': 'text' },
159
                { 'mDataProp': 'details' },
132
                { 'mDataProp': 'details' },
160
                { 'mDataProp': 'actions' },
133
                { 'mDataProp': 'actions' },
Línea 355... Línea 328...
355
            }).always(function() {
328
            }).always(function() {
356
                NProgress.done();
329
                NProgress.done();
357
            });
330
            });
358
        });
331
        });
Línea -... Línea 332...
-
 
332
 
-
 
333
    $('body').on('click', 'button.btn-delete', function(e) { 
-
 
334
        e.preventDefault();
-
 
335
        var action = $(this).data('href');
-
 
336
 
-
 
337
 
-
 
338
          swal.fire({
-
 
339
            title: 'LABEL_ARE_YOU_SURE',
-
 
340
            icon: 'question',
-
 
341
            cancelButtonText: 'LABEL_NO',
-
 
342
            showCancelButton: true,
-
 
343
            confirmButtonText: 'LABEL_YES'
-
 
344
          }).then((result) => {
-
 
345
            if (result.isConfirmed) {
-
 
346
 
-
 
347
                    NProgress.start();
-
 
348
                    $.ajax({
-
 
349
                        'dataType'  : 'json',
-
 
350
                        'accept'    : 'application/json',
-
 
351
                        'method'    : 'post',
-
 
352
                        'url'       :  action,
-
 
353
                    }).done(function(response) {
-
 
354
                        if(response['success']) {
-
 
355
                            $.fn.showSuccess(response['data']);
-
 
356
                            gridTable.api().ajax.reload(null, false);
-
 
357
                        } else {
-
 
358
                            $.fn.showError(response['data']);
-
 
359
                        }
-
 
360
                    }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
361
                        $.fn.showError(textStatus);
-
 
362
                    }).always(function() {
-
 
363
                        NProgress.done();
-
 
364
                    });
-
 
365
            }
-
 
366
       });
-
 
367
    });
Línea 359... Línea 368...
359
 
368
 
Línea 360... Línea 369...
360
 
369
 
361
    $('#form #points').inputNumberFormat({decimal: 0});
370
    $('#form #points').inputNumberFormat({decimal: 0});
Línea 482... Línea 491...
482
				<?php endif; ?>
491
				<?php endif; ?>
483
          	</div>
492
          	</div>
Línea 484... Línea 493...
484
          	
493
          	
485
         	<div class="modal-footer">
494
         	<div class="modal-footer">
486
    			<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
495
    			<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
487
    			<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
496
    			 <button type="button" class="btn btn-light" data-bs-dismiss="modal">LABEL_CLOSE</button>
488
          	</div>
497
          	</div>
489
      	<?php echo $this->form()->closeTag($form); ?>	
498
      	<?php echo $this->form()->closeTag($form); ?>	
Línea 490... Línea 499...
490
    	</div>
499
    	</div>