Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 1112 Rev 1113
Línea 475... Línea 475...
475
    });
475
    });
476
    /**
476
    /**
477
     * Add Behavior to array
477
     * Add Behavior to array
478
     */
478
     */
479
    const addBehavior = (description) => {
479
    const addBehavior = (description) => {
-
 
480
 
-
 
481
        $.ajax({
-
 
482
                    'dataType': 'json',
-
 
483
                    'accept': 'application/json',
-
 
484
                    'method': 'post',
-
 
485
                    'url': '$routeAddBehavior',
-
 
486
                    'data': {
-
 
487
                        'description': description
-
 
488
                    }
-
 
489
                }).done(function(response) {
-
 
490
                    NProgress.start();
-
 
491
                    if (response['success']) {
480
        behaviors.push({
492
                        behaviors.push({
481
            'id': new Date().getTime(),
493
            'id': new Date().getTime(),
482
            'description': description
494
            'description': description
483
        });
495
        });
484
        renderData(behaviors);
496
        renderData(behaviors);
-
 
497
                    } else {
-
 
498
 
-
 
499
                        $.fn.showError(response['message'] || 'ERROR_UNKNOWN');
-
 
500
 
-
 
501
                       
-
 
502
                    }
-
 
503
                })
485
    }
504
    }
486
    /**
505
    /**
487
     * Edit item behavior
506
     * Edit item behavior
488
     */
507
     */
489
    const editBehavior = (id, description) => {
508
    const editBehavior = (id, description) => {
Línea 629... Línea 648...
629
                           <div class="col-md-4 col-sm-4 col-xs-12">
648
                           <div class="col-md-4 col-sm-4 col-xs-12">
630
                              <select name="select-conduct" class="form-control">
649
                              <select name="select-conduct" class="form-control">
631
                              </select>
650
                              </select>
632
                           </div>
651
                           </div>
633
                           <div class="col-md-4 col-sm-4 col-xs-12">
652
                           <div class="col-md-4 col-sm-4 col-xs-12">
634
                              <button class="btn btn-primary" id="btn-select-conduct" data-toggle="tooltip" title="LABEL_ADD LABEL_CONDUCT"><i class="fa fa-plus" aria-hidden="true"></i> LABEL_ADD LABEL_CONDUCT</button>
653
                              <button class="btn btn-primary" id="btn-select-conduct" data-toggle="tooltip" title="LABEL_SELECT LABEL_CONDUCT"></button>
635
                           </div>
654
                           </div>
636
                           <div class="col-md-4 col-sm-4 col-xs-12 text-right">
655
                           <div class="col-md-4 col-sm-4 col-xs-12 text-right">
637
                              <button class="btn btn-primary" id="btn-add-conduct" data-toggle="tooltip" title="LABEL_ADD LABEL_CONDUCT"><i class="fa fa-plus" aria-hidden="true"></i> LABEL_ADD LABEL_CONDUCT</button>
656
                              <button class="btn btn-primary" id="btn-add-conduct" data-toggle="tooltip" title="LABEL_ADD LABEL_CONDUCT"><i class="fa fa-plus" aria-hidden="true"></i> LABEL_ADD LABEL_CONDUCT</button>
638
                           </div>
657
                           </div>
639
                        </div>
658
                        </div>