Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 15443 Rev 16822
Línea 12... Línea 12...
12
$allowEdit = $acl->isAllowed($roleName, 'recruitment-selection/forms/edit') ? 1 : 0;
12
$allowEdit = $acl->isAllowed($roleName, 'recruitment-selection/forms/edit') ? 1 : 0;
13
$allowDelete = $acl->isAllowed($roleName, 'recruitment-selection/forms/delete') ? 1 : 0;
13
$allowDelete = $acl->isAllowed($roleName, 'recruitment-selection/forms/delete') ? 1 : 0;
14
$allowReport = $acl->isAllowed($roleName, 'recruitment-selection/forms/report') ? 1 : 0;
14
$allowReport = $acl->isAllowed($roleName, 'recruitment-selection/forms/report') ? 1 : 0;
Línea 15... Línea 15...
15
 
15
 
Línea 16... Línea 16...
16
 
16
 
17
$this->inlineScript()->appendFile($this->basePath('plugins/ckeditor/ckeditor.js'));
17
$this->inlineScript()->appendFile($this->basePath('assets/vendors/ckeditor/ckeditor.js'));
Línea 18... Línea 18...
18
 
18
 
19
 
19
 
20
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
20
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
Línea 21... Línea 21...
21
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
21
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
22
 
22
 
Línea 23... Línea 23...
23
 
23
 
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'));
Línea 27... Línea 27...
27
 
27
 
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'));
Línea 29... Línea 29...
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...
30
 
30
 
31
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
31
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net/jquery.dataTables.js'));
32
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
32
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.js'));
Línea 33... Línea 33...
33
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
33
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/dataTables.responsive.min.js'));
34
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
34
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.min.js'));
Línea 35... Línea -...
35
 
-
 
36
 
-
 
-
 
35
 
-
 
36
 
37
$this->headLink()->appendStylesheet($this->basePath('plugins/select2/css/select2.min.css'));
37
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/select2/css/select2.min.css'));
Línea 38... Línea 38...
38
$this->headLink()->appendStylesheet($this->basePath('plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css'));
38
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/select2-bootstrap4-theme/select2-bootstrap4.min.css'));
39
 
-
 
-
 
39
 
Línea 40... Línea 40...
40
$this->inlineScript()->appendFile($this->basePath('plugins/select2/js/select2.full.min.js'));
40
$this->inlineScript()->appendFile($this->basePath('assets/vendors/select2/js/select2.full.min.js'));
41
 
41
 
Línea 42... Línea 42...
42
$this->inlineScript()->appendFile($this->basePath('plugins/moment/moment-with-locales.min.js'));
42
$this->inlineScript()->appendFile($this->basePath('assets/vendors/moment/moment-with-locales.min.js'));
43
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css'));
43
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css'));
Línea 135... Línea 135...
135
                'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
135
                'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
136
            },
136
            },
137
        },
137
        },
138
        'drawCallback': function(settings) {
138
        'drawCallback': function(settings) {
139
            NProgress.done();
139
            NProgress.done();
140
            $('button.btn-delete').confirmation({
-
 
141
                rootSelector: 'button.btn-delete',
-
 
142
                title: 'LABEL_ARE_YOU_SURE',
-
 
143
                singleton: true,
-
 
144
                btnOkLabel: 'LABEL_YES',
-
 
145
                btnCancelLabel: 'LABEL_NO',
-
 
146
                onConfirm: function(value) {
-
 
147
                    action = $(this).data('href');
-
 
148
                    NProgress.start();
-
 
149
                    $.ajax({
-
 
150
                        'dataType': 'json',
-
 
151
                        'accept': 'application/json',
-
 
152
                        'method': 'post',
-
 
153
                        'url': action,
-
 
154
                    }).done(function(response) {
-
 
155
                        if (response['success']) {
-
 
156
                            $.fn.showSuccess(response['data']);
-
 
157
                            tableForm.fnDraw();
-
 
158
                        } else {
-
 
159
                            $.fn.showError(response['data']);
-
 
160
                        }
-
 
161
                    }).fail(function(jqXHR, textStatus, errorThrown) {
-
 
162
                        $.fn.showError(textStatus);
-
 
163
                    }).always(function() {
-
 
164
                        NProgress.done();
-
 
165
                    });
-
 
166
                },
-
 
167
            });
140
           
168
        },
141
        },
169
        'aoColumns': [{
142
        'aoColumns': [{
170
                'mDataProp': 'name'
143
                'mDataProp': 'name'
171
            },
144
            },
172
            {
145
            {
Línea 190... Línea 163...
190
            {
163
            {
191
                'targets': -2,
164
                'targets': -2,
192
                'orderable': false,
165
                'orderable': false,
193
                'className': 'text-center',
166
                'className': 'text-center',
194
                'render': function(data, type, row) {
167
                'render': function(data, type, row) {
195
                    checked = data == 'a' ? ' checked="checked" ' : '';
168
                    checked = data == 'a'  ? 'checked' : '';
196
                    return '<div class="checkbox checkbox-success">' +
169
                    return '<div class="form-check">' +
197
                        '<input class="styled" type="checkbox" ' + checked + ' disabled="disabled">' +
170
                        '<input type="checkbox" class="form-check-input" disabled="" checked="' + checked + '">' +
198
                        '<label ></label></div>';
171
                        '<label class="form-check-label" for="checkCheckedDisabled"></label></div>' ;
199
                }
172
                }
200
            },
173
            },
201
            {
174
            {
202
                'targets': -1,
175
                'targets': -1,
203
                'orderable': false,
176
                'orderable': false,
Línea 284... Línea 257...
284
    /**
257
    /**
285
     * Clicked remove section
258
     * Clicked remove section
286
     */
259
     */
287
    $('body').on('click', 'button.btn-delete-section', function(e) {
260
    $('body').on('click', 'button.btn-delete-section', function(e) {
288
        var id_section = $(this).data('section');
261
        var id_section = $(this).data('section');
-
 
262
 
289
        bootbox.confirm({
263
          swal.fire({
290
            title: "LABEL_DELETE LABEL_SECTION",
264
            title: "LABEL_DELETE LABEL_SECTION",
291
            message: "LABEL_QUESTION_DELETE",
265
            message: "LABEL_QUESTION_DELETE",
292
            buttons: {
266
            icon: 'question',
293
                cancel: {
267
            cancelButtonText: 'LABEL_NO',
294
                    label: '<i class="fa fa-times"></i> LABEL_CANCEL'
-
 
295
                },
268
            showCancelButton: true,
296
                confirm: {
269
            confirmButtonText: 'LABEL_YES'
297
                    label: '<i class="fa fa-check"></i> LABEL_ACCEPT'
-
 
298
                }
-
 
299
            },
-
 
300
            callback: function(result) {
270
          }).then((result) => {
301
                if (result) {
271
            if (result.isConfirmed) {
302
                    removeSection(id_section);
272
                removeSection(id_section);
303
                }
-
 
304
            }
273
            }
305
        });
274
          });
-
 
275
 
-
 
276
       
306
    });
277
    });
307
    $('body').on('click', 'button.btn-edit-section', function(e) {
278
    $('body').on('click', 'button.btn-edit-section', function(e) {
308
        var id = $(this).data('section');
279
        var id = $(this).data('section');
309
        sections.map((item) => {
280
        sections.map((item) => {
310
            if (item.id_section == id) {
281
            if (item.id_section == id) {
Línea 321... Línea 292...
321
     * Clicked remove option
292
     * Clicked remove option
322
     */
293
     */
323
    $('body').on('click', 'button.btn-delete-option', function(e) {
294
    $('body').on('click', 'button.btn-delete-option', function(e) {
324
        var id_section = $(this).data('section');
295
        var id_section = $(this).data('section');
325
        var id_option = $(this).data('option');
296
        var id_option = $(this).data('option');
-
 
297
 
326
        bootbox.confirm({
298
          swal.fire({
327
            title: "LABEL_DELETE LABEL_OPTION",
299
            title: "LABEL_DELETE LABEL_OPTION",
328
            message: "LABEL_QUESTION_DELETE",
300
            message: "LABEL_QUESTION_DELETE",
329
            buttons: {
301
            icon: 'question',
330
                cancel: {
302
            cancelButtonText: 'LABEL_NO',
331
                    label: '<i class="fa fa-times"></i> LABEL_CANCEL'
-
 
332
                },
303
            showCancelButton: true,
333
                confirm: {
304
            confirmButtonText: 'LABEL_YES'
334
                    label: '<i class="fa fa-check"></i> LABEL_ACCEPT'
-
 
335
                }
-
 
336
            },
-
 
337
            callback: function(result) {
305
          }).then((result) => {
338
                if (result) {
306
            if (result.isConfirmed) {
339
                    removeOption(id_section, id_option);
307
                removeOption(id_section, id_option);
340
                    return;
308
                    return;
341
                }
-
 
342
            }
309
            }
343
        });
310
          });
-
 
311
 
-
 
312
 
-
 
313
 
344
    });
314
    });
345
    /**
315
    /**
346
     * Clicked add new Option
316
     * Clicked add new Option
347
     */
317
     */
348
    $('body').on('click', 'button.btn-add-option', function(e) {
318
    $('body').on('click', 'button.btn-add-option', function(e) {
Línea 573... Línea 543...
573
     */
543
     */
574
    $('button.btn-refresh').click(function(e) {
544
    $('button.btn-refresh').click(function(e) {
575
        tableForm.fnDraw();
545
        tableForm.fnDraw();
576
        return;
546
        return;
577
    });
547
    });
-
 
548
 
-
 
549
 $('body').on('click', 'button.btn-delete', function(e) { 
-
 
550
        e.preventDefault();
-
 
551
        var action = $(this).data('href');
-
 
552
 
-
 
553
 
-
 
554
          swal.fire({
-
 
555
            title: 'LABEL_ARE_YOU_SURE',
-
 
556
            icon: 'question',
-
 
557
            cancelButtonText: 'LABEL_NO',
-
 
558
            showCancelButton: true,
-
 
559
            confirmButtonText: 'LABEL_YES'
-
 
560
          }).then((result) => {
-
 
561
            if (result.isConfirmed) {
-
 
562
 
-
 
563
                    NProgress.start();
-
 
564
                    $.ajax({
-
 
565
                        'dataType'  : 'json',
-
 
566
                        'accept'    : 'application/json',
-
 
567
                        'method'    : 'post',
-
 
568
                        'url'       :  action,
-
 
569
                    }).done(function(response) {
-
 
570
                        if(response['success']) {
-
 
571
                            $.fn.showSuccess(response['data']);
-
 
572
                            gridTable.api().ajax.reload(null, false);
-
 
573
                        } else {
-
 
574
                            $.fn.showError(response['data']);
-
 
575
                        }
-
 
576
                    }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
577
                        $.fn.showError(textStatus);
-
 
578
                    }).always(function() {
-
 
579
                        NProgress.done();
-
 
580
                    });
-
 
581
            }
-
 
582
       });
-
 
583
    });
-
 
584
 
578
    /**
585
    /**
579
     * Initialize select Jobdescription
586
     * Initialize select Jobdescription
580
     */
587
     */
581
    $('#job_description_id').select2({
588
    $('#job_description_id').select2({
582
        theme: 'bootstrap4',
589
        theme: 'bootstrap4',
Línea 710... Línea 717...
710
            </div>
717
            </div>
711
         </div>
718
         </div>
712
         <div class="form-group">
719
         <div class="form-group">
713
            <button type="button" form="form-main" class="btn btn-info btn-form-save-continue">LABEL_SAVE & LABEL_CONTINUE</button>
720
            <button type="button" form="form-main" class="btn btn-info btn-form-save-continue">LABEL_SAVE & LABEL_CONTINUE</button>
714
            <button type="button" class="btn btn-primary btn-form-save-close">LABEL_SAVE & LABEL_CLOSE</button>
721
            <button type="button" class="btn btn-primary btn-form-save-close">LABEL_SAVE & LABEL_CLOSE</button>
715
            <button type="button" class="btn btn-secondary btn-edit-cancel">LABEL_CANCEL</button>
722
            <button type="button" class="btn btn-light btn-edit-cancel">LABEL_CANCEL</button>
716
         </div>
723
         </div>
717
      </form>
724
      </form>
718
   </div>
725
   </div>
719
</div>
726
</div>
720
<!-- Create/Edit Form-->
727
<!-- Create/Edit Form-->
Línea 747... Línea 754...
747
                  </select>
754
                  </select>
748
               </div>
755
               </div>
749
            </div>
756
            </div>
750
            <div class="modal-footer">
757
            <div class="modal-footer">
751
               <button type="button" id="btn-save-section" class="btn btn-primary">LABEL_SAVE</button>
758
               <button type="button" id="btn-save-section" class="btn btn-primary">LABEL_SAVE</button>
752
               <button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
759
               <button type="button" class="btn btn-light" data-dismiss="modal">LABEL_CLOSE</button>
753
            </div>
760
            </div>
754
         </div>
761
         </div>
755
      </form>
762
      </form>
756
   </div>
763
   </div>
757
</div>
764
</div>
Línea 776... Línea 783...
776
                  <textarea  name="text-option" id="text-option" rows="5" class="form-control"></textarea>
783
                  <textarea  name="text-option" id="text-option" rows="5" class="form-control"></textarea>
777
               </div>
784
               </div>
778
            </div>
785
            </div>
779
            <div class="modal-footer">
786
            <div class="modal-footer">
780
               <button type="button" class="btn btn-primary" id="btn-save-option">LABEL_SAVE</button>
787
               <button type="button" class="btn btn-primary" id="btn-save-option">LABEL_SAVE</button>
781
               <button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
788
               <button type="button" class="btn btn-light" data-dismiss="modal">LABEL_CLOSE</button>
782
            </div>
789
            </div>
783
         </div>
790
         </div>
784
      </form>
791
      </form>
785
   </div>
792
   </div>
786
</div>
793
</div>