Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 17092 Rev 17093
Línea 423... Línea 423...
423
 
423
 
424
 
424
 
-
 
425
 
425
 
426
        $('body').on('click', 'button.btn-add', function(e) {
-
 
427
            e.preventDefault();
-
 
428
            NProgress.start();
-
 
429
 
-
 
430
            $.ajax({
-
 
431
                'dataType': 'json',
-
 
432
                'method': 'get',
-
 
433
                'url': '$routeAdd',
-
 
434
            }).done(function(response) {
-
 
435
                if (response['success']) {
-
 
436
 
-
 
437
                    $('#table-behaviors tbody').empty();
-
 
438
                    
-
 
439
                    $('#select-capsule').children().not(':first').remove();
-
 
440
                    $.each(response['data']['capsules'], function(index, element) {
-
 
441
                        $('#select-capsule').append($('<option>', {
-
 
442
                            value: element.id,
-
 
443
                            text: element.name
426
        $('body').on('click', 'button.btn-add', function(e) {
444
                        }));
427
            e.preventDefault();
445
                    });
428
    
446
    
429
            $('#form-add #name').val('');
447
                    $('#form-add #name').val('');
430
            $('#form-add #order').val('1');
448
                    $('#form-add #order').val('1');
431
            $('#form-add #name').val('');
449
                    $('#form-add #name').val('');
432
    
450
            
-
 
451
                    $('#form-add #status').val('');
-
 
452
                    $('#form-add #file').fileinput('reset');
-
 
453
                    $('#form-add #file').val('');
-
 
454
                    
-
 
455
 
-
 
456
            
-
 
457
                    CKEDITOR.instances.description_add.setData('');
-
 
458
                    validatorAdd.resetForm();
-
 
459
                
-
 
460
                    $('#row-edit').hide();
-
 
461
                    $('#row-listing').hide();
-
 
462
                    $('#row-add').show();
-
 
463
                } else {
-
 
464
                    $.fn.showError(response['data']);
-
 
465
                }
-
 
466
            }).fail(function(jqXHR, textStatus, errorThrown) {
-
 
467
                $.fn.showError(textStatus);
433
            $('#form-add #status').val('');
468
            }).always(function() {
Línea 434... Línea -...
434
            $('#form-add #file').fileinput('reset');
-
 
435
            $('#form-add #file').val('');
-
 
436
             
-
 
437
 
-
 
438
    
-
 
439
            CKEDITOR.instances.description_add.setData('');
-
 
440
            validatorAdd.resetForm();
-
 
Línea 441... Línea 469...
441
           
469
                NProgress.done();
442
            $('#row-edit').hide();
470
            });
Línea 572... Línea 600...
572
	<div class="card" id="row-listing">
600
	<div class="card" id="row-listing">
573
	 	<div class="card-header">
601
	 	<div class="card-header">
574
	 		<h6 class="card-title">LABEL_TOPICS</h6>
602
	 		<h6 class="card-title">LABEL_TOPICS</h6>
575
	 	</div>
603
	 	</div>
576
	 	<div class="card-body">
604
	 	<div class="card-body">
577
            <?php
-
 
578
				$form = $this->form;
-
 
579
				$form->setAttributes([
-
 
580
					'name'    => 'form-filter',
-
 
581
					'id'      => 'form-filter',
-
 
582
				]);
-
 
583
				$form->prepare();
-
 
584
				echo $this->form()->openTag($form);
-
 
585
            ?>
-
 
586
				<div class="row">
-
 
587
	 	            <div class="col-12 mt-3">
-
 
588
						<?php
-
 
589
						    $element = $form->get('capsule_uuid');
-
 
590
						    $element->setAttributes(['class' => 'form-control']);
-
 
591
						    $element->setLabel('LABEL_CAPSULES');
-
 
592
						    echo $this->formLabel($element);
-
 
593
						    echo $this->formSelect($element);
-
 
594
						?>
-
 
595
	 	            </div>
-
 
596
	 	        </div>
-
 
597
		    <?php echo $this->form()->closeTag($form); ?>
-
 
598
	 		<div class="row">
605
	 		<div class="row">
599
	 	         <div class="col-12 mt-3">
606
	 	         <div class="col-12 mt-3">
Línea 600... Línea 607...
600
	 	         
607
	 	         
601
	 	         						<table id="gridTable" class="table   table-bordered">
608
	 	         						<table id="gridTable" class="table   table-bordered">
Línea 703... Línea 710...
703
                            echo $this->formLabel($element);
710
                            echo $this->formLabel($element);
704
                            echo $this->formFile($element);
711
                            echo $this->formFile($element);
705
                            ?>
712
                            ?>
706
                	</div>
713
                	</div>
707
         	</div> 
714
         	</div> 
-
 
715
 
-
 
716
             <div class="row">
-
 
717
	 	         <div class="col-8 mt-3">
-
 
718
					<select name="select-capsule" id="select-capsule" >
-
 
719
                   		<option value="">LABEL_SELECT</option>
-
 
720
                  	</select>
-
 
721
         		</div>
-
 
722
         		<div class="col-4 mt-3">
-
 
723
                 	<button type="button" class="btn btn-primary" id="btn-select-capsule" data-toggle="tooltip" title="LABEL_ADD LABEL_CAPSULE">LABEL_ADD LABEL_CAPSULE</button>
-
 
724
       			</div>
-
 
725
            </div>
-
 
726
 
708
	 	</div>
727
	 	</div>
709
	 	<div class="card-footer text-right">
728
	 	<div class="card-footer text-right">
710
	 	     <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
729
	 	     <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
711
      		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
730
      		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
712
	 	</div>
731
	 	</div>