Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 20 Rev 16822
Línea 11... Línea 11...
11
$allowAdd               = $acl->isAllowed($roleName, 'microlearning/settings/institutions/add') ? 1 : 0;
11
$allowAdd               = $acl->isAllowed($roleName, 'microlearning/settings/institutions/add') ? 1 : 0;
12
$allowEdit              = $acl->isAllowed($roleName, 'microlearning/settings/institutions/edit') ? 1 : 0;
12
$allowEdit              = $acl->isAllowed($roleName, 'microlearning/settings/institutions/edit') ? 1 : 0;
13
$allowDelete            = $acl->isAllowed($roleName, 'microlearning/settings/institutions/delete') ? 1 : 0;
13
$allowDelete            = $acl->isAllowed($roleName, 'microlearning/settings/institutions/delete') ? 1 : 0;
Línea 14... Línea 14...
14
 
14
 
Línea 15... Línea 15...
15
 
15
 
16
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.min.js'));
16
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-input-number/input-number-format.jquery.min.js'));
Línea 17... Línea 17...
17
 
17
 
18
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
18
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
19
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
19
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
-
 
20
 
-
 
21
 
-
 
22
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/jquery.validate.js'));
-
 
23
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/additional-methods.js'));
-
 
24
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/localization/messages_es.js'));
-
 
25
 
-
 
26
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.css'));
-
 
27
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.css'));
Línea 20... Línea -...
20
 
-
 
21
 
-
 
Línea 22... Línea -...
22
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
-
 
23
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
-
 
24
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
-
 
25
 
-
 
Línea 26... Línea -...
26
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
-
 
27
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-responsive/css/responsive.bootstrap4.min.css'));
-
 
Línea 28... Línea 28...
28
 
28
 
29
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
29
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net/jquery.dataTables.js'));
Línea 147... Línea 147...
147
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
147
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
148
                },
148
                },
149
            },
149
            },
150
            'drawCallback': function( settings ) {
150
            'drawCallback': function( settings ) {
151
                NProgress.done();
151
                NProgress.done();
152
                $('button.btn-delete').confirmation({
-
 
153
                    rootSelector: 'button.btn-delete',
-
 
154
                    title : 'LABEL_ARE_YOU_SURE',
-
 
155
                    singleton : true,
-
 
156
                    btnOkLabel: 'LABEL_YES',
-
 
157
                    btnCancelLabel: 'LABEL_NO',
-
 
158
                    onConfirm: function(value) {
-
 
159
                        action = $(this).data('href');
-
 
160
                        NProgress.start();
-
 
161
                        $.ajax({
-
 
162
                            'dataType'  : 'json',
-
 
163
                            'accept'    : 'application/json',
-
 
-
 
152
                
164
                            'method'    : 'post',
-
 
165
                            'url'       :  action,
-
 
166
                        }).done(function(response) {
-
 
167
                            if(response['success']) {
-
 
168
                                $.fn.showSuccess(response['data']);
-
 
169
                                gridTable.api().ajax.reload(null, false);
-
 
170
                            } else {
-
 
171
                                $.fn.showError(response['data']);
-
 
172
                            }
-
 
173
                        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
174
                            $.fn.showError(textStatus);
-
 
175
                        }).always(function() {
-
 
176
                            NProgress.done();
-
 
177
                        });
-
 
178
                    },
-
 
179
                });
-
 
180
            },
153
            },
181
            'aoColumns': [
154
            'aoColumns': [
182
                { 'mDataProp': 'name' },
155
                { 'mDataProp': 'name' },
183
                { 'mDataProp': 'actions' },
156
                { 'mDataProp': 'actions' },
184
    	    ],
157
    	    ],
Línea 306... Línea 279...
306
        $('body').on('click', 'button.btn-cancel', function(e) {
279
        $('body').on('click', 'button.btn-cancel', function(e) {
307
            e.preventDefault();
280
            e.preventDefault();
308
            $('#modal').modal('hide');
281
            $('#modal').modal('hide');
309
        });
282
        });
Línea -... Línea 283...
-
 
283
 
-
 
284
    $('body').on('click', 'button.btn-delete', function(e) { 
-
 
285
        e.preventDefault();
-
 
286
        var action = $(this).data('href');
-
 
287
 
-
 
288
 
-
 
289
          swal.fire({
-
 
290
            title: 'LABEL_ARE_YOU_SURE',
-
 
291
            icon: 'question',
-
 
292
            cancelButtonText: 'LABEL_NO',
-
 
293
            showCancelButton: true,
-
 
294
            confirmButtonText: 'LABEL_YES'
-
 
295
          }).then((result) => {
-
 
296
            if (result.isConfirmed) {
-
 
297
 
-
 
298
                    NProgress.start();
-
 
299
                    $.ajax({
-
 
300
                        'dataType'  : 'json',
-
 
301
                        'accept'    : 'application/json',
-
 
302
                        'method'    : 'post',
-
 
303
                        'url'       :  action,
-
 
304
                    }).done(function(response) {
-
 
305
                        if(response['success']) {
-
 
306
                            $.fn.showSuccess(response['data']);
-
 
307
                            gridTable.api().ajax.reload(null, false);
-
 
308
                        } else {
-
 
309
                            $.fn.showError(response['data']);
-
 
310
                        }
-
 
311
                    }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
312
                        $.fn.showError(textStatus);
-
 
313
                    }).always(function() {
-
 
314
                        NProgress.done();
-
 
315
                    });
-
 
316
                }
-
 
317
           });
-
 
318
        });
Línea 310... Línea 319...
310
 
319
 
311
 
320
 
312
    });
321
    });
313
JS;
322
JS;
Línea 362... Línea 371...
362
    	<div class="modal-content">
371
    	<div class="modal-content">
Línea 363... Línea 372...
363
 
372
 
364
            <!-- Modal Header -->
373
            <!-- Modal Header -->
365
      		<div class="modal-header">
374
      		<div class="modal-header">
366
        		<h4 class="modal-title">LABEL_INSTITUTIONS - <span id="form-title"></span></h4>
375
        		<h4 class="modal-title">LABEL_INSTITUTIONS - <span id="form-title"></span></h4>
367
        		<button type="button" class="close" data-dismiss="modal">&times;</button>
376
        		<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="btn-close"></button>
Línea 368... Línea 377...
368
      		</div>
377
      		</div>
369
 
378
 
370
            <!-- Modal body -->
379
            <!-- Modal body -->
Línea 399... Línea 408...
399
     	      		<?php echo $this->form()->closeTag($form); ?>
408
     	      		<?php echo $this->form()->closeTag($form); ?>
400
      		</div>
409
      		</div>
Línea 401... Línea 410...
401
 
410
 
402
            <!-- Modal footer -->
411
            <!-- Modal footer -->
403
      		<div class="modal-footer">
412
      		<div class="modal-footer">
404
        		<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
413
        		 <button type="button" class="btn btn-light" data-bs-dismiss="modal">LABEL_CLOSE</button>
Línea 405... Línea 414...
405
      		</div>
414
      		</div>
406
 
415
 
407
    	</div>
416
    	</div>