Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 1174 Rev 1175
Línea 42... Línea 42...
42
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
42
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
Línea 43... Línea 43...
43
 
43
 
44
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
44
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
Línea -... Línea 45...
-
 
45
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
-
 
46
 
-
 
47
// bootbox Alert //
-
 
48
$this->inlineScript()->appendFile($this->basePath('plugins/bootbox/bootbox.min.js'));
-
 
49
 
-
 
50
// JsRender //
-
 
51
$this->inlineScript()->appendFile($this->basePath('plugins/jsrender/jsrender.min.js'));
-
 
52
 
-
 
53
 
-
 
54
// Page Styles
Línea 45... Línea 55...
45
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
55
$this->headLink()->appendStylesheet($this->basePath('css/pages/self-evaluation.css'));
Línea 46... Línea 56...
46
 
56
 
47
 
57
 
Línea 471... Línea 481...
471
        'height': '40px'
481
        'height': '40px'
472
    });
482
    });
473
    CKEDITOR.replace('functions');
483
    CKEDITOR.replace('functions');
474
    CKEDITOR.replace('objectives');
484
    CKEDITOR.replace('objectives');
Línea -... Línea 485...
-
 
485
 
-
 
486
 
-
 
487
    /**
-
 
488
     * Clicked cancel new/edit Form
-
 
489
     */
-
 
490
    $('body').on('click', 'button[id="btn-select-competency"]', function(e) {
-
 
491
        if ($("#select-competency").val() == "") {
-
 
492
            $.fn.showError('LABEL_ERROR_SELECT_COMPETENCY');
-
 
493
        } else {
-
 
494
            competencies_selected.push();
-
 
495
            renderData(competencies_selected);
-
 
496
        }
-
 
497
    });
475
 
498
 
476
    const setCompetencySelect = () => {
499
    const setCompetencySelect = () => {
477
        $.each(competencies, function(i, item) {
500
        $.each(competencies, function(i, item) {
478
            if (!filterItemById(item.competency_id)) {
501
            if (!filterItemById(item.competency_id)) {
479
                var type = filterTypeById(item.competency_type_id);
502
                var type = filterTypeById(item.competency_type_id);
480
                $('#select-competency').append($('<option>', {
503
                $('#select-competency').append($('<option>', {
481
                    value: item.competency_id,
504
                    value: item.competency_id,
482
                    text: type.name+' '+item.name
505
                    text: type.name+' - '+item.name
483
                }));
506
                }));
484
            }
507
            }
485
        });
508
        });
-
 
509
    }
-
 
510
 
-
 
511
    /**
-
 
512
     * Render Competencies data
-
 
513
     */
-
 
514
    const renderData = (data) => {
-
 
515
        $("#competencies-job").html($("#sectionTemplate").render(data));
-
 
516
    }
486
    }
517
   
-
 
518
    const filterItemById = (id) => competencies_selected.filter((item) => item.competency_id == id ? item : false)[0];
-
 
519
    
-
 
520
    /**
-
 
521
     * Filter competencie type
487
    const filterItemById = (id) => competencies_selected.filter((item) => item.competency_id == id ? item : false)[0];
522
     */
488
    const filterTypeById = (id) => competencies_type.filter((item) => item.competency_type_id == id ? item : false)[0];
523
    const filterTypeById = (id) => competencies_type.filter((item) => item.competency_type_id == id ? item : false)[0];
Línea 489... Línea 524...
489
});
524
});
490
 
525
 
Línea 645... Línea 680...
645
                           <div class="col-md-4 col-sm-4 col-xs-12">
680
                           <div class="col-md-4 col-sm-4 col-xs-12">
646
                              <button type="button" class="btn btn-primary" id="btn-select-competency" data-toggle="tooltip" title="LABEL_ADD LABEL_COMPETENCY">LABEL_ADD LABEL_COMPETENCY</button>
681
                              <button type="button" class="btn btn-primary" id="btn-select-competency" data-toggle="tooltip" title="LABEL_ADD LABEL_COMPETENCY">LABEL_ADD LABEL_COMPETENCY</button>
647
                           </div>
682
                           </div>
648
                        </div>
683
                        </div>
649
                        <div class="row">
684
                        <div class="row">
650
                           <div class="col-md-12 col-sm-12 col-xs-12">
685
                           <div class="col-md-12 col-sm-12 col-xs-12" id="competencies-job">
-
 
686
 
651
                           </div>
687
                           </div>
652
                        </div>
688
                        </div>
653
                     </div>
689
                     </div>
654
                     <div class="tab-pane fade" id="custom-tabs-subordinates" role="tabpanel" aria-labelledby="custom-tabs-subordinates-tab">
690
                     <div class="tab-pane fade" id="custom-tabs-subordinates" role="tabpanel" aria-labelledby="custom-tabs-subordinates-tab">
655
                        <table class="table table-hover"  id="tableSubordinates">
691
                        <table class="table table-hover"  id="tableSubordinates">
Línea 675... Línea 711...
675
         </div>
711
         </div>
676
      </div>
712
      </div>
677
   </div>
713
   </div>
678
</div>	
714
</div>	
Línea -... Línea 715...
-
 
715
 
-
 
716
 <!---Template Competencies --->
-
 
717
 <script id="sectionTemplate" type="text/x-jsrender">
-
 
718
   <div class="panel panel-default" id="panel-{{:competency_id}}">
-
 
719
   <div class="panel-heading">
-
 
720
      <h4 class="panel-title">
-
 
721
         <a class="accordion-toggle" data-toggle="collapse" aria-expanded="true" data-parent="#panel-{{:competency_id}}" href="#collapse-{{:competency_id}}">
-
 
722
         <span class="section-name{{:competency_id}}">
-
 
723
         {{:title}}
-
 
724
         </span>
-
 
725
         </a>
-
 
726
      </h4>
-
 
727
   </div>
-
 
728
   <div id="collapse-{{:competency_id}}" class="panel-collapse in collapse show">
-
 
729
      <div class="panel-body">
-
 
730
         <div class="table-responsive">
-
 
731
            <table class="table table-bordered">
-
 
732
               <thead>
-
 
733
                  <tr>
-
 
734
                     <th style="width: 10%;">LABEL_ELEMENT</th>
-
 
735
                     <th style="width: 30%;">LABEL_TITLE</th>
-
 
736
                     <th style="width: 10%;">LABEL_LEVEL</th>
-
 
737
                     <th style="width: 50%;">LABEL_ACTIONS</th>
-
 
738
                  </tr>
-
 
739
               </thead>
-
 
740
               <tbody>
-
 
741
                  <tr class="tr-section">
-
 
742
                     <td class="text-left">LABEL_COMPETENCY</td>
-
 
743
                     <td class="text-left">{{:title}}</td>
-
 
744
                     <td>
-
 
745
                        {{if type == 'simple'}} Simple {{/if}}
-
 
746
                        {{if type == 'multiple'}} Multiple {{/if}}
-
 
747
                     </td>
-
 
748
                     <td>
-
 
749
              
-
 
750
                        <button  type="button" class="btn btn-default btn-delete-section" data-section="{{:competency_id}}" data-toggle="tooltip"  data-original-title="LABEL_DELETE LABEL_COMPETENCY"><i class="fa fa-ban" aria-hidden="true"></i> LABEL_DELETE LABEL_COMPETENCY </button> 
-
 
751
            
-
 
752
                     </td>
-
 
753
                  </tr>
-
 
754
                  {{for options}}
-
 
755
                  <tr >
-
 
756
                     <td class="text-left">--LABEL_CONDUCT</td>
-
 
757
                     <td class="text-left">
-
 
758
                        {{:description}}
-
 
759
                     </td>
-
 
760
                     <td>
-
 
761
                     </td>
-
 
762
                     <td>
679
 
763
                        <button type="button"  class="btn btn-default btn-edit-option" data-section="{{:competency_id}}" data-option="{{:conduct_id}}" data-toggle="tooltip"  data-original-title="LABEL_EDIT LABEL_CONDUCT"><i class="fa fa-edit" aria-hidden="true"></i> LABEL_EDIT LABEL_CONDUCT</button> 
-
 
764
           
-
 
765
                     </td>
-
 
766
                  </tr>
-
 
767
                  {{/for}}
-
 
768
               </tbody>
-
 
769
            </table>
-
 
770
         </div>
-
 
771
      </div>
-
 
772
   </div>
-
 
773
</div>
-
 
774
   </script>