Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 861 Rev 862
Línea 402... Línea 402...
402
 
402
 
403
 
403
 
-
 
404
 
-
 
405
        $('#form #status').bootstrapToggle({'on' : 'LABEL_ACTIVE',  'off' : 'LABEL_INACTIVE', 'width' : '160px', 'height' : '40px'});
-
 
406
        CKEDITOR.replace( 'description' );
-
 
407
 
-
 
408
 
-
 
409
     /**
-
 
410
     * Clicked on add new conduct
-
 
411
     */
-
 
412
    $('body').on('click', 'button[id="btn-add-conduct"]', function(e) {
-
 
413
        e.preventDefault();
-
 
414
        validatorFormSection.resetForm();
-
 
415
        $('#form-conduct #conduct-id').val('');
-
 
416
        $('#form-conduct #conduct-description').val('');
-
 
417
        $('#form-conduct #conduct-level').val('0');
-
 
418
        $('#modal-conduct h4[class="modal-title"]').html('LABEL_ADD LABEL_CONDUCT');
-
 
419
        $('#modal-conduct').modal('show');
-
 
420
    });
-
 
421
    /**
-
 
422
     * Clicked on edit conduct
-
 
423
     */
-
 
424
    $('body').on('click', 'button.btn-edit-conduct', function(e) {
-
 
425
        e.preventDefault();
-
 
426
        var slug = $(this).data('conduct');
-
 
427
        var conduct;
-
 
428
        var showForm = false;
-
 
429
        for (i = 0; i < objFormGenerator.conducts.length; i++) {
-
 
430
            conduct = objFormGenerator.conducts[i];
-
 
431
            if (slug == conduct.slug_conduct) {
-
 
432
                validatorFormSection.resetForm();
-
 
433
                $('#form-conduct #conduct-id').val(conduct.slug_conduct);
-
 
434
                $('#form-conduct #conduct-description').val(conduct.description);
-
 
435
                $('#form-conduct #conduct-level').val(conduct.level);
-
 
436
                return;
-
 
437
            }
-
 
438
        }
-
 
439
        if (showForm) {
-
 
440
            $('#modal-conduct h4[class="modal-title"]').html('LABEL_EDIT LABEL_CONDUCT');
-
 
441
            $('#modal-conduct').modal('show');
-
 
442
        }
-
 
443
    });
-
 
444
    /**
-
 
445
     * Clicked on remove conduct
-
 
446
     */
-
 
447
    $('body').on('click', 'button.btn-delete-conduct', function(e) {
-
 
448
        e.preventDefault();
-
 
449
        var slug = $(this).data('conduct');
-
 
450
        bootbox.confirm({
-
 
451
            title: "LABEL_DELETE LABEL_CONDUCT",
-
 
452
            message: "LABEL_QUESTION_DELETE",
-
 
453
            buttons: {
-
 
454
                cancel: {
-
 
455
                    label: '<i class="fa fa-times"></i> LABEL_CANCEL'
-
 
456
                },
-
 
457
                confirm: {
-
 
458
                    label: '<i class="fa fa-check"></i> LABEL_ACCEPT'
-
 
459
                }
-
 
460
            },
-
 
461
            callback: function(result) {
-
 
462
                if (result) {
-
 
463
 
-
 
464
                }
-
 
465
            }
-
 
466
        });
404
 
467
    });
405
        $('#form #status').bootstrapToggle({'on' : 'LABEL_ACTIVE',  'off' : 'LABEL_INACTIVE', 'width' : '160px', 'height' : '40px'});
468
 
406
        CKEDITOR.replace( 'description' );
469
 
407
    });
470
    });
Línea 544... Línea 607...
544
                        </div>
607
                        </div>
545
                        <?php echo $this->form()->closeTag($form); ?>
608
                        <?php echo $this->form()->closeTag($form); ?>
546
                        <br/>
609
                        <br/>
547
                <div class="row">
610
                <div class="row">
548
                    <div class="col-xs-12 col-md-12 text-right">
611
                    <div class="col-xs-12 col-md-12 text-right">
549
                        <button class="btn btn-primary" id="btn-add-section" data-toggle="tooltip" title="LABEL_ADD LABEL_CONDUCT"><i class="fa fa-plus" aria-hidden="true"></i> LABEL_ADD LABEL_CONDUCT</button>
612
                        <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>
550
                    </div>
613
                    </div>
551
                </div>
614
                </div>
552
                <br />	
615
                <br />	
553
                <div class="row">
616
                <div class="row">
554
                    <div class="col-xs-12 col-md-12">
617
                    <div class="col-xs-12 col-md-12">
Línea 570... Línea 633...
570
 
633
 
571
 
634
 
572
<div  id="modal-conduct" class="modal" tabindex="-1" role="dialog">
635
<div  id="modal-conduct" class="modal" tabindex="-1" role="dialog">
573
   <div class="modal-dialog modal-lg" role="document">
636
   <div class="modal-dialog modal-lg" role="document">
574
      <form action="#" name="form-conduct" id="form-conduct">
637
      <form action="#" name="form-conduct" id="form-conduct">
575
         <input type="hidden" name="conduct-slug" id="conduct-slug" value="" />
638
         <input type="hidden" name="conduct-id" id="conduct-id" value="" />
576
         <div class="modal-content">
639
         <div class="modal-content">
577
            <div class="modal-header">
640
            <div class="modal-header">
578
               <h4 class="modal-title">LABEL_ADD LABEL_CONDUCT</h4>
641
               <h4 class="modal-title">LABEL_ADD LABEL_CONDUCT</h4>