Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 16785 Rev 16787
Línea 20... Línea 20...
20
$allowImport            = $acl->isAllowed($roleName, 'jobs-description/import') ? 1 : 0;
20
$allowImport            = $acl->isAllowed($roleName, 'jobs-description/import') ? 1 : 0;
Línea 21... Línea 21...
21
 
21
 
22
 
22
 
23
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
-
 
24
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
23
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
Línea 25... Línea -...
25
 
-
 
26
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-maxlenght/bootstrap-maxlength.min.js'));
24
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
27
 
25
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-maxlenght/bootstrap-maxlength.min.js'));
28
 
26
 
Línea 29... Línea 27...
29
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
27
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
Línea 36... Línea 34...
36
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
34
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
37
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
35
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
38
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
36
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
39
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
37
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
Línea 40... Línea -...
40
 
-
 
41
 
38
 
42
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
39
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
Línea 43... Línea 40...
43
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
40
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
44
 
41
 
Línea 45... Línea -...
45
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
-
 
46
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
-
 
47
 
-
 
48
 
-
 
49
 
-
 
50
$this->headLink()->appendStylesheet($this->basePath('css/jquery-sortable.css'));
-
 
51
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-sortable/jquery-sortable.js'));
42
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
52
 
43
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
53
 
44
 
Línea 54... Línea 45...
54
$this->inlineScript()->appendFile($this->basePath('plugins/select2/js/select2.js'));
45
$this->inlineScript()->appendFile($this->basePath('plugins/select2/js/select2.js'));
Línea 55... Línea -...
55
$this->inlineScript()->appendFile($this->basePath('plugins/select2/js/i18n/es.js'));
-
 
56
$this->headLink()->appendStylesheet($this->basePath('plugins/select2/css/select2.css'));
46
$this->inlineScript()->appendFile($this->basePath('plugins/select2/js/i18n/es.js'));
57
 
47
$this->headLink()->appendStylesheet($this->basePath('plugins/select2/css/select2.css'));
Línea 58... Línea 48...
58
$this->headLink()->appendStylesheet($this->basePath('plugins/select2-bootstrap4-theme/select2-bootstrap4.css'));
48
 
59
 
49
$this->headLink()->appendStylesheet($this->basePath('plugins/select2-bootstrap4-theme/select2-bootstrap4.css'));
Línea -... Línea 50...
-
 
50
 
-
 
51
// bootbox Alert //
-
 
52
$this->inlineScript()->appendFile($this->basePath('plugins/bootbox/bootbox.min.js'));
-
 
53
 
Línea 60... Línea 54...
60
 
54
// JsRender //
61
// bootbox Alert //
55
$this->inlineScript()->appendFile($this->basePath('plugins/jsrender/jsrender.min.js'));
Línea -... Línea 56...
-
 
56
 
-
 
57
$this->inlineScript()->appendFile($this->basePath('plugins/orgchart/js/jquery.orgchart.js'));
-
 
58
$this->headLink()->appendStylesheet($this->basePath('plugins/orgchart/css/jquery.orgchart.css'));
-
 
59
 
-
 
60
 
-
 
61
 
-
 
62
$status_active = JobDescription::STATUS_ACTIVE;
-
 
63
$status_inactive = JobDescription::STATUS_INACTIVE;
-
 
64
 
-
 
65
$this->headStyle()->captureStart();
-
 
66
echo <<<CSS
62
$this->inlineScript()->appendFile($this->basePath('plugins/bootbox/bootbox.min.js'));
67
div.orgchart 
63
 
68
{
Línea 64... Línea 69...
64
// JsRender //
69
    width: 100%;
Línea 84... Línea 89...
84
    var allowEdit = $allowEdit;
89
    var allowEdit = $allowEdit;
85
    var allowDelete = $allowDelete;
90
    var allowDelete = $allowDelete;
86
    var allowReport = $allowReport;
91
    var allowReport = $allowReport;
Línea -... Línea 92...
-
 
92
 
-
 
93
 
-
 
94
    var datasource = {};
-
 
95
    var dataactions = [];
87
 
96
    var oc = null;
88
 
97
 
Línea 89... Línea 98...
89
    $.fn.renderCompetencies = function() {
98
    $.fn.renderCompetencies = function() {
Línea 156... Línea 165...
156
                error.insertAfter(field.parent());
165
                error.insertAfter(field.parent());
157
            }
166
            }
158
        }
167
        }
159
    };
168
    };
Línea 160... Línea -...
160
 
-
 
Línea -... Línea 169...
-
 
169
 
-
 
170
 
-
 
171
 
-
 
172
 
-
 
173
    $.fn.recursiveTree = function(parent_branch, parent_item) {
-
 
174
        $.each(parent_item, function(i, item) {
-
 
175
            dataactions.push({
-
 
176
                'uuid' : item['uuid'],
Línea 161... Línea -...
161
    $.groupSortable = null;
-
 
162
 
-
 
163
 
-
 
164
 
-
 
165
 
-
 
166
    $.fn.setGroupSortable = function(html) {
-
 
167
 
-
 
168
        $('#ol-jobs-descriptions').html(html);
-
 
169
        $.groupSortable =  $('#ol-jobs-descriptions').sortable({
-
 
170
 
-
 
171
            onDragStart: function(\$item, container, _super) {
-
 
172
                //\$item.find('ol.dropdown-menu').sortable('disable');
-
 
173
                _super(\$item, container);
-
 
174
            },
-
 
175
            onDrop: function(\$item, container, _super) {
177
                'link_report' : item['link_report'],
176
 
178
                'link_edit' : item['link_edit'],
177
                var data = $.groupSortable.sortable('serialize').get();
-
 
178
                var jsonString = JSON.stringify(data, null, ' ');
179
                'link_delete' : item['link_delete'],
179
 
-
 
180
                $.ajax({
180
            })
181
                    'dataType': 'json',
-
 
182
                    'accept': 'application/json',
-
 
183
                    'method': 'post',
-
 
Línea -... Línea 181...
-
 
181
 
-
 
182
            var branch  = {
Línea 184... Línea 183...
184
                    'url': '$routeDatatable',
183
                'uuid' : item['uuid'],
185
                    'data': {
-
 
186
                        data: jsonString
-
 
187
                    }
-
 
188
                }).done(function(response) {
184
                'name' : item['name'],
189
 
185
                'children' : [
Línea -... Línea 186...
-
 
186
 
Línea 190... Línea -...
190
 
-
 
191
                    if (!response['success']) {
187
                ]
Línea 192... Línea -...
192
                        $.fn.showError(response['data']);
-
 
193
                    }
-
 
194
                }).fail(function(jqXHR, textStatus, errorThrown) {
-
 
195
                    $.fn.showError(textStatus);
188
            }
Línea 196... Línea -...
196
                })
-
 
Línea 197... Línea -...
197
 
-
 
198
 
-
 
199
                //\$item.find('ol.dropdown-menu').sortable('enable');
-
 
200
                _super(\$item, container);
-
 
Línea 201... Línea -...
201
 
-
 
202
                //console.log($(\$item).data('id'));
-
 
203
                // console.log(\$item);
-
 
Línea 204... Línea 189...
204
            }
189
 
205
        });
190
            if(item.children.length > 0) {
206
 
191
                $.fn.recursiveTree(branch, item.children); 
207
    },
192
            }
208
 
193
 
209
    $.fn.recursiveTree = function(items) {
194
            parent_branch.children.push(branch)
210
        var s  = '';     
195
 
211
        $.each(items, function(i, item) {
196
        }); 
212
            s = s + $('#listJobDescriptionTemplate').render(item);
197
 
213
 
198
    }
214
        });
199
 
215
        return s;
200
 
216
    };
201
 
Línea 217... Línea 202...
217
 
202
 
-
 
203
    $.fn.refreshTree = function() {
-
 
204
        NProgress.start();
-
 
205
        $.ajax({
-
 
206
            'dataType': 'json',
-
 
207
            'accept': 'application/json',
-
 
208
            'method': 'get',
-
 
209
            'url': '$routeDatatable',
-
 
210
        }).done(function(response) {
-
 
211
            if (response['success']) {
-
 
212
                if(response['data']['items'].length == 0) {
-
 
213
                    $('#divNoRecordsAvailable').show();
-
 
214
                } else {
-
 
215
                    $('#divNoRecordsAvailable').hide();
-
 
216
 
-
 
217
                }
-
 
218
                
Línea 218... Línea 219...
218
    $.fn.refreshTree = function() {
219
                dataactions = [];
219
        NProgress.start();
220
 
-
 
221
 
-
 
222
                datasource = {
-
 
223
                    'uuid' : 'n-a',
220
        $.ajax({
224
                    'name' : '$company_name',
221
            'dataType': 'json',
225
                    'children' : [
222
            'accept': 'application/json',
226
 
-
 
227
                    ]
-
 
228
                }
-
 
229
 
-
 
230
                
-
 
231
                $.fn.recursiveTree(datasource, response['data']['items']);
-
 
232
 
-
 
233
 
-
 
234
 
-
 
235
                oc.init({ 'data': datasource });
-
 
236
                oc.\$chart.find('.node').on('mouseover', function(e) {
-
 
237
                    e.preventDefault(); 
-
 
238
            
-
 
239
                    $('.horizontalEdge').hide();
-
 
240
                    $('.verticalEdge').hide();
-
 
241
                });
-
 
242
            
-
 
243
                oc.\$chart.find('.node').on('click', function() {
-
 
244
                    var message = $(this).children('.title').text();
-
 
245
            
-
 
246
 
-
 
247
                    if(!allowEdit && !allowDelete && !allowReport) {
-
 
248
                        return;
-
 
249
                    }
-
 
250
 
223
            'method': 'get',
251
 
-
 
252
                    var uuid = $(this).attr('id'); 
-
 
253
                    var link_report = '';
-
 
254
                    var link_edit = '';
-
 
255
                    var link_delete = '';
-
 
256
        
-
 
257
                    $.each(dataactions, function(i, item) {
-
 
258
                        if(uuid == item.uuid) {
-
 
259
                            link_report = item.link_report;
-
 
260
                            link_edit = item.link_edit;
-
 
261
                            link_delete = item.link_delete;
-
 
262
                        }
-
 
263
                    });
-
 
264
 
-
 
265
                    var buttons =  {}
-
 
266
 
-
 
267
                    buttons.cancel = {
-
 
268
                        label: 'LABEL_CANCEL',
-
 
269
                        className: 'btn-default',
-
 
270
                        callback: function(){
-
 
271
                            console.log('CANCEL clicked');
-
 
272
                        }
-
 
273
                    };
-
 
274
 
-
 
275
 
-
 
276
                    if(allowEdit && link_edit) {
-
 
277
                        buttons.edit = {
-
 
278
                            label: 'LABEL_EDIT',
-
 
279
                            className: 'btn-edit',
-
 
280
                            callback: function(){
-
 
281
                               
-
 
282
                                setTimeout(() => {
-
 
283
                                    $.fn.editJobDescription(link_edit);
-
 
284
                                },  250);
-
 
285
 
-
 
286
                            }
-
 
287
                        };
-
 
288
                    }
-
 
289
                    if(allowDelete && link_delete) {
-
 
290
                        buttons.delete = {
-
 
291
                            label: 'LABEL_DELETE',
-
 
292
                            className: 'btn-delete',
-
 
293
                            callback: function(){
-
 
294
                                setTimeout(() => {
-
 
295
                                    $.fn.deleteJobDescription(link_delete);
-
 
296
                                },  250);
-
 
297
 
-
 
298
 
-
 
299
 
-
 
300
 
-
 
301
                            }
-
 
302
                        };
-
 
303
                    }
-
 
304
 
-
 
305
                    if(allowReport && link_report) {
-
 
306
                        buttons.report = {
-
 
307
                            label: 'LABEL_REPORT',
-
 
308
                            className: 'btn-default',
-
 
309
                            callback: function() {
-
 
310
                                setTimeout(() => {
-
 
311
                                    $.fn.reportJobDescription(link_report);
224
            'url': '$routeDatatable',
312
                                },  250);
225
        }).done(function(response) {
313
                            }
226
            if (response['success']) {
314
                        };
227
                if(response['data'].items.length == 0) {
315
                    }
228
                    $('#divNoRecordsAvailable').show();
316
 
Línea 266... Línea 354...
266
                maxlength: 1024,
354
                maxlength: 1024,
267
            },
355
            },
268
            'status': {
356
            'status': {
269
                required: false,
357
                required: false,
270
            },
358
            },
-
 
359
            'job_description_id_boss' : {
-
 
360
                required: false,
-
 
361
            },
271
        },
362
        },
272
        submitHandler: function(form) {
363
        submitHandler: function(form) {
Línea 273... Línea 364...
273
    
364
    
274
 
365
 
275
  
366
  
276
            var data = {
367
            var data = {
277
                name : $('#form #name').val(),
368
                name : $('#form #name').val(),
-
 
369
                functions : $('#form #functions').val(),
278
                functions : $('#form #functions').val(),
370
                objectives : $('#form #objectives').val(),
279
                objectives : $('#form #objectives').val(),
371
                status :  $('#form #status').prop('checked') ?  '$status_active' : '$status_inactive',
Línea 280... Línea 372...
280
                status :  $('#form #status').prop('checked') ?  '$status_active' : '$status_inactive',
372
                job_description_id_boss: $('#form #job_description_id_boss').val(),
Línea 357... Línea 449...
357
    });
449
    });
Línea 358... Línea 450...
358
 
450
 
359
    $('body').on('click', 'button.btn-add-job-description', function(e) {
451
    $('body').on('click', 'button.btn-add-job-description', function(e) {
Línea 360... Línea 452...
360
        e.preventDefault();
452
        e.preventDefault();
361
 
-
 
362
        var link = $(this).data('link');
-
 
363
        $.fn.defaultValuesAdd(link);
-
 
364
 
-
 
365
        return false
-
 
366
    });
-
 
367
 
-
 
368
    $('body').on('click', 'i.btn-add-job-description', function(e) {
-
 
369
        e.preventDefault();
-
 
370
 
-
 
371
 
-
 
372
        var link = $(this).data('link');
-
 
373
        $.fn.defaultValuesAdd(link);
-
 
374
       
-
 
375
        return false
-
 
376
    });
-
 
377
 
-
 
Línea 378... Línea -...
378
    $.fn.defaultValuesAdd = function(action) {
-
 
379
 
453
 
380
 
454
        var action = $(this).data('link');
381
        setTimeout(() => {
455
 
382
            NProgress.start();
456
        NProgress.start();
383
            $.ajax({
457
        $.ajax({
384
                'dataType': 'json',
458
            'dataType': 'json',
385
                'accept': 'application/json',
459
            'accept': 'application/json',
386
                'method': 'get',
-
 
387
                'url' : action,
-
 
388
            }).done(function(response) {
-
 
389
    
-
 
390
                if (response['success']) {
-
 
391
    
-
 
392
    
-
 
393
                    behaviors = response['data']['behaviors'];
-
 
Línea -... Línea 460...
-
 
460
            'method': 'get',
-
 
461
            'url' : '$routeAdd',
-
 
462
        }).done(function(response) {
394
                    competency_types = response['data']['competency_types'];
463
    
Línea -... Línea 464...
-
 
464
            if (response['success']) {
395
                    competencies = response['data']['competencies'];
465
                behaviors = response['data']['behaviors'];
396
    
466
                competency_types = response['data']['competency_types'];
397
    
467
                competencies = response['data']['competencies'];
398
                    competencies_selected = [];
-
 
399
    
468
    
-
 
469
    
Línea 400... Línea 470...
400
    
470
                competencies_selected = [];
401
                    $.each(competencies, function(i, competency) {
471
                $.each(competencies, function(i, competency) {
Línea 402... Línea 472...
402
                        $.each(competency.behaviors, function(j, behavior) {
472
                    $.each(competency.behaviors, function(j, behavior) {
403
                            competencies[i].behaviors[j].level = 0;
473
                        competencies[i].behaviors[j].level = 0;
404
                        });
474
                    });
405
                    });
475
                });
Línea 406... Línea 476...
406
    
476
    
407
                    $.fn.renderCompetencies();
477
                $.fn.renderCompetencies();
-
 
478
                $.fn.comboCompetencies();
-
 
479
    
-
 
480
                $('span[id="form-title"]').html('LABEL_ADD');
-
 
481
                $('#form').attr('action', action);
-
 
482
                $('#form #name').val('');
-
 
483
                $('#form #status').bootstrapToggle('on');
-
 
484
                        
-
 
485
                $('#form #functions').val('');
-
 
486
                $('#form #objectives').val('');
-
 
487
 
Línea 408... Línea 488...
408
                    $.fn.comboCompetencies();
488
 
Línea 409... Línea 489...
409
    
489
                $('#job_description_id_boss').empty();
410
                    $('span[id="form-title"]').html('LABEL_ADD');
490
                $.each(response['data']['jobs_description'], function(id, text) {
411
                    $('#form').attr('action', action);
491
 
Línea 412... Línea 492...
412
                    $('#form #name').val('');
492
                    var option = new Option(text, id, false, false);
413
                    $('#form #status').bootstrapToggle('on');
493
                    $('#job_description_id_boss').append(option).trigger('change');
414
                        
494
                });
Línea 415... Línea 495...
415
                    $('#form #functions').val('');
495
                $('#job_description_id_boss').trigger('change');
416
                    $('#form #objectives').val('');
496
                $('#job_description_id_boss').val('').trigger('change');
417
    
497
    
418
                    validator.resetForm();
498
                validator.resetForm();
419
    
499
    
420
    
500
    
Línea -... Línea 501...
-
 
501
                $('#custom-tabs #custom-tabs-general-tab').tab('show');
-
 
502
                $('#row-lists').hide();
-
 
503
                $('#row-form').show();
-
 
504
    
-
 
505
            } else   {                      
-
 
506
                $.fn.showError(response['data']);
-
 
507
            }
-
 
508
    
-
 
509
        }).fail(function(jqXHR, textStatus, errorThrown) {
-
 
510
            $.fn.showError(textStatus);
-
 
511
        }).always(function() {
-
 
512
            NProgress.done();
-
 
513
        });
-
 
514
    });
-
 
515
 
-
 
516
    $.fn.deleteJobDescription = function(action)
-
 
517
    {
-
 
518
        bootbox.confirm({
-
 
519
            message: 'LABEL_ARE_YOU_SURE',
-
 
520
            buttons: {
-
 
521
                confirm: {
-
 
522
                    label: 'LABEL_YES',
-
 
523
                    className: 'btn-success'
-
 
524
                },
-
 
525
                cancel: {
-
 
526
                    label: 'LABEL_NO',
-
 
527
                    className: 'btn-danger'
-
 
528
                }
-
 
529
            },
-
 
530
            callback: function (result) {
-
 
531
                if(result) {
-
 
532
                    NProgress.start();
-
 
533
                    $.ajax({
-
 
534
                        'dataType'  : 'json',
-
 
535
                        'accept'    : 'application/json',
-
 
536
                        'method'    : 'post',
-
 
537
                        'url'       :  action,
421
                    $('#custom-tabs #custom-tabs-general-tab').tab('show');
538
                    }).done(function(response) {
Línea 422... Línea -...
422
                    $('#row-lists').hide();
-
 
423
                    $('#row-form').show();
-
 
424
    
539
                        if(response['success']) {
425
               } else   {                      
540
                            $.fn.showSuccess(response['data']);
426
                    $.fn.showError(response['data']);
541
                            $.fn.refreshTree();
427
                }
-
 
-
 
542
                        } else {
428
    
543
                            $.fn.showError(response['data']);
429
            }).fail(function(jqXHR, textStatus, errorThrown) {
544
                        }
430
                $.fn.showError(textStatus);
545
                    }).fail(function( jqXHR, textStatus, errorThrown) {
431
            }).always(function() {
546
                        $.fn.showError(textStatus);
432
                NProgress.done();
547
                    }).always(function() {
433
            });
548
                        NProgress.done();
434
        }, 100);
549
                    });
435
 
550
                }
436
    }
551
            }
-
 
552
        });
437
 
553
    }
438
 
554
 
Línea 439... Línea 555...
439
 
555
    $.fn.editJobDescription = function(action)
440
    $('body').on('click', 'i.btn-edit-job-description', function(e) {
556
    {
Línea 459... Línea 575...
459
                behaviors = response['data']['behaviors'];
575
                behaviors = response['data']['behaviors'];
460
                competency_types = response['data']['competency_types'];
576
                competency_types = response['data']['competency_types'];
Línea 461... Línea 577...
461
 
577
 
462
                competencies = response['data']['competencies'];
578
                competencies = response['data']['competencies'];
-
 
579
                competencies_selected = response['data']['competencies_selected'];
-
 
580
 
-
 
581
                $('#job_description_id_boss').empty();
-
 
582
                $.each(response['data']['jobs_description'], function(id, text) {
-
 
583
 
-
 
584
                    var option = new Option(text, id, false, false);
-
 
585
                    $('#job_description_id_boss').append(option).trigger('change');
-
 
586
                });
-
 
587
 
-
 
588
                $('#job_description_id_boss').trigger('change');
-
 
589
                $('#job_description_id_boss').val(response['data']['job_description_id_boss']).trigger('change');
Línea 463... Línea 590...
463
                competencies_selected = response['data']['competencies_selected'];
590
 
464
               
591
               
Línea 476... Línea 603...
476
        }).fail(function(jqXHR, textStatus, errorThrown) {
603
        }).fail(function(jqXHR, textStatus, errorThrown) {
477
            $.fn.showError(textStatus);
604
            $.fn.showError(textStatus);
478
        }).always(function() {
605
        }).always(function() {
479
            NProgress.done();
606
            NProgress.done();
480
        });
607
        });
481
    });
608
    }
482
 
-
 
483
    $('body').on('click', 'i.btn-pdf-job-description', function(e) {
-
 
484
        e.preventDefault();
-
 
485
        var action   = $(this).data('link');
-
 
Línea -... Línea 609...
-
 
609
 
-
 
610
    $.fn.reportJobDescription = function(action)
486
 
611
    {
Línea 487... Línea -...
487
        window.open(action, '_blank');
-
 
488
 
-
 
489
        /*
-
 
490
        NProgress.start(); 
-
 
491
        $.ajax({
-
 
492
            'dataType'  : 'json',
-
 
493
            'method'    : 'get',
-
 
494
            'url'       :  action,
-
 
495
        }).done(function(response) {
-
 
496
            if(response['success']) {
-
 
497
                var anchor = window.document.createElement("a");
-
 
498
                anchor.href = 'data:application/octet-stream;charset=utf-8;base64,' + response['data']['content'] ;
-
 
499
                anchor.download = response['data']['basename'];
-
 
500
                document.body.appendChild(anchor);
-
 
501
                anchor.click();  // IE: "Access is denied"; see: https://connect.microsoft.com/IE/feedback/details/797361/ie-10-treats-blob-url-as-cross-origin-and-denies-access
-
 
502
                document.body.removeChild(anchor);
-
 
503
            } else {
-
 
504
                $.fn.showError(response['data']);
-
 
505
            }
-
 
506
        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
507
            $.fn.showError(textStatus);
-
 
508
        }).always(function() {
-
 
509
            NProgress.done();
612
        window.open(action, '_blank');
Línea 510... Línea 613...
510
        });*/
613
 
511
    });
614
    }
Línea 512... Línea 615...
512
 
615
 
Línea 682... Línea 785...
682
    $('#select-competency').select2({
785
    $('#select-competency').select2({
683
        theme: 'bootstrap4',
786
        theme: 'bootstrap4',
684
        width: '100%',
787
        width: '100%',
685
    });
788
    });
Línea -... Línea 789...
-
 
789
 
-
 
790
    $('#boss_id').select2({
-
 
791
        theme: 'bootstrap4',
-
 
792
        width: '100%',
-
 
793
    });
-
 
794
 
-
 
795
 
-
 
796
    oc = $('#chart-container').orgchart({
-
 
797
        'data' : datasource,
-
 
798
        'nodeId': 'uuid' ,
-
 
799
    });
Línea 686... Línea -...
686
 
-
 
Línea -... Línea 800...
-
 
800
 
687
 
801
 
Línea 688... Línea 802...
688
 
802
 
689
    $.fn.refreshTree();    
803
 
690
 
804
    $.fn.refreshTree();
Línea 712... Línea 826...
712
        <div class="row">
826
        <div class="row">
713
            <div class="col-12">
827
            <div class="col-12">
714
                <div class="card">
828
                <div class="card">
715
                    <div class="card-body">
829
                    <div class="card-body">
716
                   	  <div id="divNoRecordsAvailable" class="text-center" style="display: none"><h3>LABEL_NO_RECORDS_AVAILABLE</h3></div>
830
                   	  <div id="divNoRecordsAvailable" class="text-center" style="display: none"><h3>LABEL_NO_RECORDS_AVAILABLE</h3></div>
-
 
831
                   	
-
 
832
                   	<!-- 
717
                   	 <div id="ol-jobs-descriptions-container" style="background-color: rgba(0, 0, 0, .03); width: 100%; height: 600px; scroll: auto; overflow: auto;">
833
                   	; scroll: auto; overflow: auto;
-
 
834
                   	 -->
718
     					 <ol id="ol-jobs-descriptions" class="default vertical" style="padding-left: 0px;">
835
                   	 <div id="chart-container" style="width: 100%; height: 600px">
-
 
836
 
-
 
837
 
Línea 719... Línea -...
719
 
-
 
Línea 720... Línea 838...
720
            			</ol>
838
 
Línea 772... Línea 890...
772
 
890
 
773
 
891
 
Línea 774... Línea -...
774
                    $element = $form->get('competencies');
-
 
775
                    echo $this->formHidden($element);
892
                    $element = $form->get('competencies');
Línea 776... Línea 893...
776
 
893
                    echo $this->formHidden($element);
777
 
894
 
778
                    ?>
895
                    ?>
Línea 823... Línea 940...
823
 
940
 
824
                                echo $this->formLabel($element);
941
                                echo $this->formLabel($element);
825
                                echo $this->formTextArea($element);
942
                                echo $this->formTextArea($element);
826
                                ?>
943
                                ?>
-
 
944
                            </div>
-
 
945
                     		<div class="form-group">
-
 
946
                                <?php
-
 
947
                                $element = $form->get('job_description_id_boss');
-
 
948
                                $element->setOptions(['label' => 'LABEL_BOSS']);
-
 
949
                                $element->setAttributes(['class' => 'form-control']);
-
 
950
 
-
 
951
                                echo $this->formLabel($element);
-
 
952
                                echo $this->formSelect($element);
-
 
953
                                ?>
827
                            </div>
954
                            </div>
828
                        </div>
955
                        </div>
829
                        <div class="tab-pane fade" id="custom-tabs-compentencies" role="tabpanel" aria-labelledby="custom-tabs-compentencies-tab">
956
                        <div class="tab-pane fade" id="custom-tabs-compentencies" role="tabpanel" aria-labelledby="custom-tabs-compentencies-tab">
830
                            <div class="row">
957
                            <div class="row">
831
                                <div class="col-md-8 col-sm-8 col-xs-12">
958
                                <div class="col-md-8 col-sm-8 col-xs-12">