Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 15443 Rev 16822
Línea 13... Línea 13...
13
$allowEdit      = $acl->isAllowed($roleName, 'jobs-description/competencies/edit') ? 1 : 0;
13
$allowEdit      = $acl->isAllowed($roleName, 'jobs-description/competencies/edit') ? 1 : 0;
14
$allowDelete    = $acl->isAllowed($roleName, 'jobs-description/competencies/delete') ? 1 : 0;
14
$allowDelete    = $acl->isAllowed($roleName, 'jobs-description/competencies/delete') ? 1 : 0;
15
$allowImport    = $acl->isAllowed($roleName, 'jobs-description/competencies/import') ? 1 : 0;
15
$allowImport    = $acl->isAllowed($roleName, 'jobs-description/competencies/import') ? 1 : 0;
Línea 16... Línea 16...
16
 
16
 
17
 
17
 
Línea 18... Línea 18...
18
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
18
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
Línea 19... Línea 19...
19
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
19
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
20
 
20
 
21
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-maxlenght/bootstrap-maxlength.min.js'));
21
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-maxlenght/bootstrap-maxlength.min.js'));
Línea 22... Línea 22...
22
 
22
 
23
 
23
 
Línea 24... Línea 24...
24
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
24
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/jquery.validate.js'));
25
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
25
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/additional-methods.js'));
26
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
26
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/localization/messages_es.js'));
27
 
27
 
Línea 28... Línea 28...
28
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
28
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.css'));
29
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-responsive/css/responsive.bootstrap4.min.css'));
29
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.css'));
Línea 30... Línea -...
30
 
-
 
31
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
-
 
Línea 32... Línea -...
32
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
-
 
33
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
-
 
34
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
-
 
Línea -... Línea 30...
-
 
30
 
-
 
31
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net/jquery.dataTables.js'));
-
 
32
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.js'));
-
 
33
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/dataTables.responsive.min.js'));
-
 
34
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.min.js'));
35
 
35
 
Línea 36... Línea 36...
36
 
36
 
37
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
37
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
Línea 38... Línea 38...
38
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
38
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
39
 
-
 
-
 
39
 
Línea 40... Línea 40...
40
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
40
 
Línea 41... Línea 41...
41
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
41
 
Línea 156... Línea 156...
156
                'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
156
                'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
157
            },
157
            },
158
        },
158
        },
159
        'drawCallback': function(settings) {
159
        'drawCallback': function(settings) {
160
            NProgress.done();
160
            NProgress.done();
161
            $('button.btn-delete').confirmation({
-
 
162
                rootSelector: 'button.btn-delete',
-
 
163
                title: 'LABEL_ARE_YOU_SURE',
-
 
164
                singleton: true,
-
 
165
                btnOkLabel: 'LABEL_YES',
-
 
166
                btnCancelLabel: 'LABEL_NO',
-
 
167
                onConfirm: function(value) {
-
 
168
                    action = $(this).data('href');
-
 
169
                    NProgress.start();
-
 
170
                    $.ajax({
-
 
171
                        'dataType': 'json',
-
 
172
                        'accept': 'application/json',
-
 
173
                        'method': 'post',
-
 
174
                        'url': action,
-
 
175
                    }).done(function(response) {
-
 
176
                        if (response['success']) {
-
 
177
                            $.fn.showSuccess(response['data']);
-
 
178
                            gridTable.api().ajax.reload(null, false);
-
 
179
                        } else {
-
 
180
                            $.fn.showError(response['data']);
-
 
181
                        }
-
 
182
                    }).fail(function(jqXHR, textStatus, errorThrown) {
-
 
183
                        $.fn.showError(textStatus);
-
 
184
                    }).always(function() {
-
 
185
                        NProgress.done();
-
 
186
                    });
-
 
187
                }
-
 
188
            });
161
            
189
        },
162
        },
190
        'aoColumns': [{
163
        'aoColumns': [{
191
                'mDataProp': 'type'
164
                'mDataProp': 'type'
192
            },
165
            },
193
            {
166
            {
Línea 211... Línea 184...
211
            {
184
            {
212
                'targets': -2,
185
                'targets': -2,
213
                'orderable': false,
186
                'orderable': false,
214
                'className': 'text-center',
187
                'className': 'text-center',
215
                'render': function(data, type, row) {
188
                'render': function(data, type, row) {
216
                    checked = data == 'a' ? ' checked="checked" ' : '';
189
                    checked = data == 'a'  ? 'checked' : '';
217
                    return '<div class="checkbox checkbox-success">' +
190
                    return '<div class="form-check">' +
218
                        '<input class="styled" type="checkbox" ' + checked + ' disabled="disabled">' +
191
                        '<input type="checkbox" class="form-check-input" disabled="" checked="' + checked + '">' +
219
                        '<label ></label></div>';
192
                        '<label class="form-check-label" for="checkCheckedDisabled"></label></div>' ;
220
                }
193
                }
221
            },
194
            },
222
            {
195
            {
223
                'targets': -1,
196
                'targets': -1,
224
                'orderable': false,
197
                'orderable': false,
Línea 226... Línea 199...
226
                    s = '';
199
                    s = '';
227
                    if (allowEdit) {
200
                    if (allowEdit) {
228
                        s = s + '<button class="btn btn-primary btn-edit" data-href="' + data['link_edit'] + '" data-toggle="tooltip" title="LABEL_EDIT"><i class="fa fa-pencil"></i> LABEL_EDIT </button>&nbsp;';
201
                        s = s + '<button class="btn btn-primary btn-edit" data-href="' + data['link_edit'] + '" data-toggle="tooltip" title="LABEL_EDIT"><i class="fa fa-pencil"></i> LABEL_EDIT </button>&nbsp;';
229
                    }
202
                    }
230
                    if (allowDelete) {
203
                    if (allowDelete) {
231
                        s = s + '<button class="btn btn-danger btn-delete" data-href="' + data['link_delete'] + '" data-toggle="delete-confirmation" data-popout="true" title="LABEL_DELETE"><i class="fa fa-trash"></i> LABEL_DELETE </button>&nbsp;';
204
                        s = s + '<button class="btn btn-danger btn-delete" data-href="' + data['link_delete'] + '" data-toggle="tooltip" title="LABEL_DELETE"><i class="fa fa-trash"></i> LABEL_DELETE </button>&nbsp;';
232
                    }
205
                    }
233
                    return s;
206
                    return s;
234
                }
207
                }
235
            }
208
            }
236
        ],
209
        ],
Línea 346... Línea 319...
346
        return false;
319
        return false;
347
    });
320
    });
Línea 348... Línea 321...
348
 
321
 
349
    $('body').on('click', 'button.btn-edit', function(e) {
322
    $('body').on('click', 'button.btn-edit', function(e) {
350
        e.preventDefault();
-
 
-
 
323
        e.preventDefault();
351
        $("button.btn-delete").confirmation('hide');
324
 
352
        NProgress.start();
325
        NProgress.start();
353
        var action = $(this).data('href');
326
        var action = $(this).data('href');
354
        $.ajax({
327
        $.ajax({
355
            'dataType': 'json',
328
            'dataType': 'json',
Línea 413... Línea 386...
413
        e.preventDefault();
386
        e.preventDefault();
414
        gridTable.api().ajax.reload(null, false);
387
        gridTable.api().ajax.reload(null, false);
415
        return false;
388
        return false;
416
    });
389
    });
Línea -... Línea 390...
-
 
390
 
-
 
391
    $('body').on('click', 'button.btn-delete', function(e) { 
-
 
392
        e.preventDefault();
-
 
393
        var action = $(this).data('href');
-
 
394
 
-
 
395
 
-
 
396
          swal.fire({
-
 
397
            title: 'LABEL_ARE_YOU_SURE',
-
 
398
            icon: 'question',
-
 
399
            cancelButtonText: 'LABEL_NO',
-
 
400
            showCancelButton: true,
-
 
401
            confirmButtonText: 'LABEL_YES'
-
 
402
          }).then((result) => {
-
 
403
            if (result.isConfirmed) {
-
 
404
 
-
 
405
                    NProgress.start();
-
 
406
                    $.ajax({
-
 
407
                        'dataType'  : 'json',
-
 
408
                        'accept'    : 'application/json',
-
 
409
                        'method'    : 'post',
-
 
410
                        'url'       :  action,
-
 
411
                    }).done(function(response) {
-
 
412
                        if(response['success']) {
-
 
413
                            $.fn.showSuccess(response['data']);
-
 
414
                            gridTable.api().ajax.reload(null, false);
-
 
415
                        } else {
-
 
416
                            $.fn.showError(response['data']);
-
 
417
                        }
-
 
418
                    }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
419
                        $.fn.showError(textStatus);
-
 
420
                    }).always(function() {
-
 
421
                        NProgress.done();
-
 
422
                    });
-
 
423
            }
-
 
424
       });
-
 
425
    });
-
 
426
    
417
 
427
 
418
    $('body').on('click', 'button.btn-import', function(e) {
428
    $('body').on('click', 'button.btn-import', function(e) {
419
        e.preventDefault();
429
        e.preventDefault();
420
        NProgress.start();
430
        NProgress.start();
421
        $.ajax({
431
        $.ajax({
Línea 475... Línea 485...
475
        if(element) {
485
        if(element) {
476
            $(element).remove();
486
            $(element).remove();
477
        }
487
        }
Línea 478... Línea 488...
478
 
488
 
479
        return false; 
-
 
Línea 480... Línea -...
480
        
-
 
481
 
-
 
482
 
-
 
483
        
-
 
484
       
-
 
485
        /*
-
 
486
        bootbox.confirm({
-
 
487
            title: "LABEL_DELETE LABEL_CONDUCT",
-
 
488
            message: "LABEL_QUESTION_DELETE",
-
 
489
            buttons: {
-
 
490
                cancel: {
-
 
491
                    label: '<i class="fa fa-times"></i> LABEL_CANCEL'
-
 
492
                },
-
 
493
                confirm: {
-
 
494
                    label: '<i class="fa fa-check"></i> LABEL_ACCEPT'
-
 
495
                }
-
 
496
            },
-
 
497
            callback: function(result) {
-
 
498
                if (result) {
-
 
499
                    removeBehavior(id);
-
 
500
                }
-
 
501
            }
489
        return false; 
Línea 502... Línea 490...
502
        });*/
490
 
503
    });
491
    });
Línea 555... Línea 543...
555
 
543
 
556
JS;
544
JS;
557
$this->inlineScript()->captureEnd();
545
$this->inlineScript()->captureEnd();
Línea 558... Línea -...
558
?>
-
 
559
 
-
 
560
<!-- Content Header (Page header) -->
-
 
561
<section class="content-header">
-
 
562
    <div class="container-fluid">
-
 
563
        <div class="row mb-2">
-
 
564
            <div class="col-sm-12">
-
 
565
                <h1>LABEL_COMPETENCIES</h1>
-
 
566
            </div>
546
?>
567
        </div>
-
 
568
    </div>
-
 
569
    <!-- /.container-fluid -->
-
 
570
</section>
547
 
571
<section class="content" id="row-list">
548
 
572
    <div class="container-fluid">
549
<div class="container">
573
        <div class="row">
550
        <div class="row" " id="row-list">
-
 
551
            <div class="col-12">
574
            <div class="col-12">
552
                <div class="card">
575
                <div class="card">
553
                	<h6 class="card-title">LABEL_COMPETENCIES</h6>
576
                    <div class="card-body">
554
                    <div class="card-body">
577
                        <table id="gridTable" class="table   table-hover">
555
                        <table id="gridTable" class="table   table-hover">
578
                            <thead>
556
                            <thead>
Línea 599... Línea 577...
599
                        </div>
577
                        </div>
600
                    </div>
578
                    </div>
601
                </div>
579
                </div>
602
            </div>
580
            </div>
603
        </div>
581
        </div>
604
    </div>
-
 
605
</section>
-
 
Línea 606... Línea -...
606
 
-
 
607
<!-- The Form creation -->
582
 
608
<section class="content" id="row-form" style="display: none">
-
 
609
    <div class="container-fluid">
-
 
610
        <div class="row">
583
        <div class="row"  id="row-form" style="display: none">
611
            <div class="col-md-12 col-sm-12 col-12">
584
            <div class="col-md-12 col-sm-12 col-12">
612
                <div class="panel">
585
                <div class="panel">
613
                    <div class="panel-body">
586
                    <div class="panel-body">
614
                        <?php
587
                        <?php
Línea 701... Línea 674...
701
                                </table>
674
                                </table>
702
                            </div>
675
                            </div>
703
                            <div class="col-xs-12 col-md-12 text-right">
676
                            <div class="col-xs-12 col-md-12 text-right">
Línea 704... Línea 677...
704
                        
677
                        
705
                                    <button type="submit" form="form" class="btn btn-primary">LABEL_SAVE</button>
678
                                    <button type="submit" form="form" class="btn btn-primary">LABEL_SAVE</button>
Línea 706... Línea 679...
706
                                    <button type="button" class="btn btn-secondary btn-edit-cancel">LABEL_CANCEL</button>
679
                                    <button type="button" class="btn btn-light btn-edit-cancel">LABEL_CANCEL</button>
707
                 
680
                 
708
                            </div>
681
                            </div>
709
                        </div>
682
                        </div>
710
                         <?php echo $this->form()->closeTag($form); ?>
683
                         <?php echo $this->form()->closeTag($form); ?>
711
                    </div>
684
                    </div>
712
                </div>
685
                </div>
713
            </div>
686
            </div>
-
 
687
        </div>
Línea 714... Línea 688...
714
        </div>
688
</div>
715
</section>
689
	
Línea 716... Línea 690...
716
 
690