Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 16840 Rev 16842
Línea 16... Línea 16...
16
 
16
 
17
 
17
 
Línea 18... Línea 18...
18
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/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('assets/vendors/nprogress/nprogress.js'));
19
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
20
 
20
 
21
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-maxlenght/bootstrap-maxlength.min.js'));
21
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-maxlength/bootstrap-maxlength.min.js'));
Línea 327... Línea 327...
327
        $.ajax({
327
        $.ajax({
328
            'dataType': 'json',
328
            'dataType': 'json',
329
            'method': 'get',
329
            'method': 'get',
330
            'url': action,
330
            'url': action,
331
        }).done(function(response) {
331
        }).done(function(response) {
332
            console.log(response)
-
 
333
            if (response['success']) {
332
            if (response['success']) {
Línea 334... Línea 333...
334
                
333
                
335
                $('#form').attr('action', action);
334
                $('#form').attr('action', action);
336
                $('#form #name').val(response['data']['name']);
335
                $('#form #name').val(response['data']['name']);
Línea 491... Línea 490...
491
    });
490
    });
Línea 492... Línea 491...
492
 
491
 
493
    $('#btn-select-behavior').click(function(e) {
492
    $('#btn-select-behavior').click(function(e) {
Línea -... Línea 493...
-
 
493
        e.preventDefault();
-
 
494
 
494
        e.preventDefault();
495
 
-
 
496
 
Línea 495... Línea 497...
495
 
497
        var id  = $('#select-behavior option:selected').val(); 
496
        var id  = $('#select-behavior option:selected').val(); 
498
 
497
        
499
        
Línea 498... Línea 500...
498
        if(!id) {
500
        if(!id) {
499
            return false;
501
            return false;
-
 
502
        }
Línea 500... Línea -...
500
        }
-
 
501
 
-
 
502
        var description = $('#select-behavior option:selected').text();
-
 
503
        var key         = '#tr_behavior_id_' + id ;
-
 
504
 
-
 
505
        console.log("key = "  + key);
503
 
506
        var element     = $(key);
-
 
507
 
504
        var description = $('#select-behavior option:selected').text();
508
 
505
        var key         = '#tr_behavior_id_' + id ;
509
        console.log(element);
506
        var element     = $(key)
Línea -... Línea 507...
-
 
507
 
-
 
508
        if(element.length > 0) {
-
 
509
            $.fn.showError( 'ERROR_BEHAVIOR_WAS_PREVIOUSLY_ADDED');
-
 
510
            return false;
-
 
511
        }
510
        if(element.length > 0) {
512
 
511
 
513
 
512
            $.fn.showError( 'ERROR_BEHAVIOR_WAS_PREVIOUSLY_ADDED');
514
        if(description.length > 50) {
513
            return false;
515
           description = description.substr(0, 50) + '...';
Línea 528... Línea 530...
528
 
530
 
Línea 529... Línea 531...
529
    });
531
    });
530
 
532
 
531
  
533
  
532
 
534
 
533
    $('button.btn-edit-cancel').click(function(e) {
535
    $('button.btn-cancel').click(function(e) {
Línea 543... Línea 545...
543
 
545
 
544
JS;
546
JS;
545
$this->inlineScript()->captureEnd();
547
$this->inlineScript()->captureEnd();
Línea 546... Línea -...
546
?>
-
 
547
 
548
?>
548
 
549
 
-
 
550
<div class="container">
549
<div class="container">
551
	<div class="card" id="row-list">
550
        <div class="row" " id="row-list">
-
 
551
            <div class="col-12">
552
	 	
-
 
553
	 	<div class="card-body">
552
                <div class="card">
554
	 		<h6 class="card-title">LABEL_COMPETENCIES</h6>
553
                	<h6 class="card-title">LABEL_COMPETENCIES</h6>
555
	 		<div class="row">
554
                    <div class="card-body">
556
	 	         <div class="col-12 mt-3">
555
                        <table id="gridTable" class="table   table-hover">
557
	 	         <table id="gridTable" class="table   table-hover">
556
                            <thead>
558
                            <thead>
557
                                <tr>
559
                                <tr>
558
                                    <th>LABEL_TYPE</th>
560
                                    <th>LABEL_TYPE</th>
559
                                    <th>LABEL_NAME</th>
561
                                    <th>LABEL_NAME</th>
560
                                    <th>LABEL_ACTIVE</th>
562
                                    <th>LABEL_ACTIVE</th>
561
                                    <th>LABEL_ACTIONS</th>
563
                                    <th>LABEL_ACTIONS</th>
562
                                </tr>
564
                                </tr>
563
                            </thead>
565
                            </thead>
564
                            <tbody>
566
                            <tbody>
565
                            </tbody>
567
                            </tbody>
566
                        </table>
568
                        </table>    
-
 
569
	 	         </div>
567
                    </div>
570
	 	     </div>
568
                    <div class="card-footer clearfix">
571
	 	</div>
569
                        <div style="float:right;">
572
	 	<div class="card-footer text-right">
570
                            <button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
573
                            <button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
571
                            <?php if ($allowImport) : ?>
574
                            <?php if ($allowImport) : ?>
572
                                <button type="button" class="btn btn-primary btn-import"><i class="fa fa-upload"></i> LABEL_IMPORT </button>
575
                                <button type="button" class="btn btn-primary btn-import"><i class="fa fa-upload"></i> LABEL_IMPORT </button>
573
                            <?php endif; ?>
576
                            <?php endif; ?>
574
                            <?php if ($allowAdd) : ?>
577
                            <?php if ($allowAdd) : ?>
575
                                <button type="button" class="btn btn-primary btn-add"><i class="fa fa-plus"></i> LABEL_ADD </button>
-
 
576
                            <?php endif; ?>
-
 
577
                        </div>
-
 
578
                    </div>
578
                                <button type="button" class="btn btn-primary btn-add"><i class="fa fa-plus"></i> LABEL_ADD </button>
579
                </div>
579
                            <?php endif; ?>
580
            </div>
580
	 	</div>
581
        </div>
581
	</div>
582
 
-
 
583
        <div class="row"  id="row-form" style="display: none">
-
 
584
            <div class="col-md-12 col-sm-12 col-12">
-
 
585
                <div class="panel">
582
	
586
                    <div class="panel-body">
583
	<div class="card" id="row-form" style="display: none">
587
                        <?php
584
	 	                        <?php
588
                        $form = $this->form;
585
                        $form = $this->form;
589
                        $form->setAttributes([
586
                        $form->setAttributes([
590
                            'method'    => 'post',
587
                            'method'    => 'post',
591
                            'name'      => 'form',
588
                            'name'      => 'form',
Línea 592... Línea 589...
592
                            'id'        => 'form'
589
                            'id'        => 'form'
593
                        ]);
590
                        ]);
594
 
591
 
595
                        $form->prepare();
592
                        $form->prepare();
596
                        echo $this->form()->openTag($form);
593
                        echo $this->form()->openTag($form);
597
                        ?>
594
                        ?>
598
                        <div class="row">
595
	 	<div class="card-body">
-
 
596
	 		<h6 class="card-title">LABEL_COMPETENCIES</h6>
599
                            <div class="col-md-4 col-sm-12 col-12">
597
	 		<div class="row">
600
                                <div class="from-group">
598
	 	         <div class="col-12 mt-3">
Línea 601... Línea 599...
601
                                    <?php
599
	 	   			<?php
602
                                    $element = $form->get('competency_type_id');
600
                                    $element = $form->get('competency_type_id');
603
                                    $element->setOptions(['label' => 'LABEL_TYPE']);
601
                                    $element->setOptions(['label' => 'LABEL_TYPE']);
604
 
602
 
605
                                    echo $this->formLabel($element);
603
                                    echo $this->formLabel($element);
606
                                    echo $this->formSelect($element);
604
                                    echo $this->formSelect($element);
607
                                    ?>
605
                                    ?>
608
                                </div>
606
          		</div>
609
                            </div>
607
         	</div>
610
                            <div class="col-md-4 col-sm-12 col-12">
608
			<div class="row">
611
                                <div class="from-group">
609
	 	         <div class="col-12 mt-3">
Línea 612... Línea 610...
612
                                    <?php
610
                                    <?php
613
                                    $element = $form->get('name');
611
                                    $element = $form->get('name');
614
                                    $element->setOptions(['label' => 'LABEL_NAME']);
612
                                    $element->setOptions(['label' => 'LABEL_NAME']);
615
                                    $element->setAttributes(['class' => 'form-control']);
613
                                    $element->setAttributes(['class' => 'form-control']);
616
 
614
 
617
                                    echo $this->formLabel($element);
615
                                    echo $this->formLabel($element);
618
                                    echo $this->formText($element);
616
                                    echo $this->formText($element);
619
                                    ?>
617
                                    ?>
620
                                </div>
618
                                </div>
621
                            </div>
619
                            </div>
622
                            <div class="col-md-4 col-sm-12 col-12">
620
			<div class="row">
623
                                <div class="from-group">
621
	 	         <div class="col-12 mt-3">
624
                                    <label>LABEL_STATUS</label>
622
                                    <label>LABEL_STATUS</label>
625
                                    <br />
623
                                    <br />
626
                                    <?php
624
                                    <?php
627
                                    $element = $form->get('status');
625
                                    $element = $form->get('status');
628
                                    $element->setOptions(['label' => 'LABEL_STATUS']);
626
                                    $element->setOptions(['label' => 'LABEL_STATUS']);
629
                                    // echo $this->formLabel($element);
627
                                    // echo $this->formLabel($element);
630
                                    echo $this->formCheckbox($element);
628
                                    echo $this->formCheckbox($element);
631
                                    ?>
629
                                    ?>
632
                                </div>
630
                                </div>
633
                            </div>
631
                            </div>
634
                            <div class="col-md-12 col-sm-12 col-12">
632
			<div class="row">
Línea 642... Línea 640...
642
                                    echo $this->formTextArea($element);
640
                                    echo $this->formTextArea($element);
643
                                    ?>
641
                                    ?>
644
                                </div>
642
                                </div>
645
                            </div>
643
                            </div>
Línea 646... Línea -...
646
                           
-
 
647
                            <div class="col-md-12 col-sm-12 col-12">
-
 
648
                                <div class="form-group">
644
                           
649
                                    <div class="row">
645
			<div class="row">
650
                                        <div class="col-md-8 col-sm-8 col-xs-12">
646
	 	         <div class="col-8 mt-3">
651
                                            <select name="select-behavior" id="select-behavior" >
647
					<select name="select-behavior" id="select-behavior" >
652
                                           		<option value="">LABEL_SELECT</option>
648
                   		<option value="">LABEL_SELECT</option>
653
                                            </select>
649
                  	</select>
654
                                        </div>
650
         		</div>
655
                                        <div class="col-md-4 col-sm-4 col-xs-12">
651
         		<div class="col-4 mt-3">
656
                                            <button type="button" class="btn btn-primary" id="btn-select-behavior" data-toggle="tooltip" title="LABEL_ADD LABEL_BEHAVIOR">LABEL_ADD LABEL_BEHAVIOR</button>
-
 
657
                                        </div>
-
 
658
                                    </div>
-
 
659
                                </div>
652
                 	<button type="button" class="btn btn-primary" id="btn-select-behavior" data-toggle="tooltip" title="LABEL_ADD LABEL_BEHAVIOR">LABEL_ADD LABEL_BEHAVIOR</button>
-
 
653
       			</div>
660
                            </div>
654
 
661
                        </div>
655
     		</div>
662
                        <div class="col-xs-12 col-md-12">
656
			<div class="row">
663
                            <br />
657
	 	         <div class="col-12 mt-3">
664
                            <div class="table-responsive">
658
                            <div class="table-responsive">
665
                                <table id="table-behaviors" class="table table-bordered">
659
                                <table id="table-behaviors" class="table table-bordered">
666
                                    <thead>
660
                                    <thead>
667
                                        <tr>
661
                                        <tr>
Línea 671... Línea 665...
671
                                    </thead>
665
                                    </thead>
672
                                    <tbody >
666
                                    <tbody >
673
                                    </tbody>
667
                                    </tbody>
674
                                </table>
668
                                </table>
675
                            </div>
669
                            </div>
676
                            <div class="col-xs-12 col-md-12 text-right">
-
 
677
                        
670
 
-
 
671
    	 	     </div>
-
 
672
    	 	</div>
-
 
673
    	 </div>	
-
 
674
	 	<div class="card-footer text-right">
678
                                    <button type="submit" form="form" class="btn btn-primary">LABEL_SAVE</button>
675
	 	      <button type="submit" form="form" class="btn btn-primary">LABEL_SAVE</button>
679
                                    <button type="button" class="btn btn-light btn-edit-cancel">LABEL_CANCEL</button>
676
        	<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
680
                 
-
 
681
                            </div>
-
 
682
                        </div>
677
	 	</div>
683
                         <?php echo $this->form()->closeTag($form); ?>
678
	 	<?php echo $this->form()->closeTag($form); ?>
684
                    </div>
-
 
685
                </div>
-
 
686
            </div>
-
 
687
        </div>
679
	</div>
688
</div>
680
</div>
-
 
681
 
689
	
682
 
-
 
683
 
-
 
684
 
Línea 690... Línea 685...
690
 
685
 
691
<script id="trBehaviorTemplate" type="text/x-jsrender">
686
<script id="trBehaviorTemplate" type="text/x-jsrender">
Línea 692... Línea 687...
692
    <tr id="tr_behavior_id_{{:id}}">
687
    <tr id="tr_behavior_id_{{:id}}">