Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 16747 Rev 16822
Línea 12... Línea 12...
12
$allowEdit      = $acl->isAllowed($roleName, 'fast-survey/edit') ? 1 : 0;
12
$allowEdit      = $acl->isAllowed($roleName, 'fast-survey/edit') ? 1 : 0;
13
$allowDelete    = $acl->isAllowed($roleName, 'fast-survey/delete') ? 1 : 0;
13
$allowDelete    = $acl->isAllowed($roleName, 'fast-survey/delete') ? 1 : 0;
14
$allowChart    = $acl->isAllowed($roleName, 'fast-survey/chart') ? 1 : 0;
14
$allowChart    = $acl->isAllowed($roleName, 'fast-survey/chart') ? 1 : 0;
15
$allowDownload  = $acl->isAllowed($roleName, 'fast-survey/download') ? 1 : 0;
15
$allowDownload  = $acl->isAllowed($roleName, 'fast-survey/download') ? 1 : 0;
Línea 16... Línea 16...
16
 
16
 
17
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
17
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
Línea 18... Línea 18...
18
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
18
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
19
 
19
 
20
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
20
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/jquery.validate.js'));
Línea 21... Línea 21...
21
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
21
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/additional-methods.js'));
Línea 22... Línea 22...
22
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
22
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/localization/messages_es.js'));
23
 
23
 
Línea 24... Línea 24...
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'));
Línea 25... Línea -...
25
 
-
 
Línea -... Línea 25...
-
 
25
 
26
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
26
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net/jquery.dataTables.js'));
27
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
27
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.js'));
Línea 28... Línea 28...
28
 
28
 
29
 
29
 
Línea 186... Línea 186...
186
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
186
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
187
                },
187
                },
188
            },
188
            },
189
            'drawCallback': function( settings ) {
189
            'drawCallback': function( settings ) {
190
                NProgress.done();
190
                NProgress.done();
191
                $('button.btn-delete').confirmation({
-
 
192
                    rootSelector: 'button.btn-delete',
-
 
193
                    title : 'LABEL_ARE_YOU_SURE',
-
 
194
                    singleton : true,
-
 
195
                    btnOkLabel: 'LABEL_YES',
-
 
196
                    btnCancelLabel: 'LABEL_NO',
-
 
197
                    onConfirm: function(value) {
-
 
198
                        action = $(this).data('href');
-
 
199
                        NProgress.start();
-
 
200
                        $.ajax({
-
 
201
                            'dataType'  : 'json',
-
 
202
                            'accept'    : 'application/json',
-
 
-
 
191
               
203
                            'method'    : 'post',
-
 
204
                            'url'       :  action,
-
 
205
                        }).done(function(response) {
-
 
206
                            if(response['success']) {
-
 
207
                                $.fn.showSuccess(response['data']);
-
 
208
                                gridTable.api().ajax.reload(null, false);
-
 
209
                            } else {
-
 
210
                                $.fn.showError(response['data']);
-
 
211
                            }
-
 
212
                        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
213
                            $.fn.showError(textStatus);
-
 
214
                        }).always(function() {
-
 
215
                            NProgress.done();
-
 
216
                        });
-
 
217
                    },
-
 
218
                });
-
 
219
            },
192
            },
220
            'aoColumns': [
193
            'aoColumns': [
221
                { 'mDataProp': 'question' },
194
                { 'mDataProp': 'question' },
222
                { 'mDataProp': 'details' },
195
                { 'mDataProp': 'details' },
223
                { 'mDataProp': 'votes' },
196
                { 'mDataProp': 'votes' },
Línea 555... Línea 528...
555
            $('#row-chart').hide();    
528
            $('#row-chart').hide();    
556
            $('#row-form').hide();
529
            $('#row-form').hide();
557
            $('#row-listing').show();
530
            $('#row-listing').show();
558
        });
531
        });
Línea -... Línea 532...
-
 
532
 
-
 
533
    $('body').on('click', 'button.btn-delete', function(e) { 
-
 
534
        e.preventDefault();
-
 
535
        var action = $(this).data('href');
-
 
536
 
-
 
537
 
-
 
538
          swal.fire({
-
 
539
            title: 'LABEL_ARE_YOU_SURE',
-
 
540
            icon: 'question',
-
 
541
            cancelButtonText: 'LABEL_NO',
-
 
542
            showCancelButton: true,
-
 
543
            confirmButtonText: 'LABEL_YES'
-
 
544
          }).then((result) => {
-
 
545
            if (result.isConfirmed) {
-
 
546
 
-
 
547
                    NProgress.start();
-
 
548
                    $.ajax({
-
 
549
                        'dataType'  : 'json',
-
 
550
                        'accept'    : 'application/json',
-
 
551
                        'method'    : 'post',
-
 
552
                        'url'       :  action,
-
 
553
                    }).done(function(response) {
-
 
554
                        if(response['success']) {
-
 
555
                            $.fn.showSuccess(response['data']);
-
 
556
                            gridTable.api().ajax.reload(null, false);
-
 
557
                        } else {
-
 
558
                            $.fn.showError(response['data']);
-
 
559
                        }
-
 
560
                    }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
561
                        $.fn.showError(textStatus);
-
 
562
                    }).always(function() {
-
 
563
                        NProgress.done();
-
 
564
                    });
-
 
565
                }
-
 
566
           });
-
 
567
        });
559
 
568
 
560
        $('#form #number_of_answers').change(function(e) {
569
        $('#form #number_of_answers').change(function(e) {
Línea 561... Línea 570...
561
            e.preventDefault();
570
            e.preventDefault();
562
    
571
    
Línea 603... Línea 612...
603
    });
612
    });
604
JS;
613
JS;
605
$this->inlineScript()->captureEnd();
614
$this->inlineScript()->captureEnd();
606
?>
615
?>
Línea 607... Línea -...
607
 
-
 
608
 
-
 
609
 
-
 
610
<!-- Content Header (Page header) -->
-
 
611
<section class="content-header">
616
 
612
    <div class="container-fluid">
-
 
613
        <div class="row mb-2">
-
 
614
            <div class="col-sm-12">
-
 
615
                <h1>LABEL_FAST_SURVEYS</h1>
-
 
616
            </div>
-
 
617
        </div>
-
 
618
    </div><!-- /.container-fluid -->
-
 
619
</section>
-
 
620
 
-
 
621
<section class="content">
-
 
622
    <div class="container-fluid">
617
<div class="container">
623
        <div class="row" id="row-listing">
618
        <div class="row" id="row-listing">
624
            <div class="col-12">
619
            <div class="col-12">
-
 
620
                <div class="card">
625
                <div class="card">
621
                	<h6 class="card-title">LABEL_FAST_SURVEYS</h6>
626
                    <div class="card-body">
622
                    <div class="card-body">
627
                        <table id="gridTable" class="table table-striped table-hover">
623
                        <table id="gridTable" class="table table-striped table-hover">
628
                            <thead>
624
                            <thead>
629
                                <tr>
625
                                <tr>
Línea 817... Línea 813...
817
            </div>
813
            </div>
818
        </div>           
814
        </div>           
Línea 819... Línea 815...
819
        
815
        
820
        
816