Skip to content

Commit

Permalink
Añadido refresco de los campos actualizados #45
Browse files Browse the repository at this point in the history
  • Loading branch information
dpeite committed Apr 11, 2017
1 parent 0313b5f commit b76fc7c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 6 additions & 2 deletions app/static/js/sesiones.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ $('.editar').click(function(event){
<form id="editar"> \
<div class="form-group"> \
<label for="editar-nombre">Nombre</label> \
<input type="text" name="nombre" class="form-control" id="editar-nombre" placeholder="Email"> \
<input type="text" name="nombre" class="form-control" id="editar-nombre" placeholder="Nombre"> \
</div> \
<div class="form-group"> \
<label for="editar-descripcion">Descripción</label> \
Expand Down Expand Up @@ -178,7 +178,11 @@ $('.editar').click(function(event){
$(".cortar-vueltas-correcto").fadeTo(2000, 500).slideUp(500, function(){
$(".cortar-vueltas-correcto").slideUp(500);
});
// $('.tr-'+id).load(location.href + ' .tr-'+id);
$('#nombre'+id).load(location.href + ' #nombre'+id);
$('#fecha'+id).load(location.href + ' #fecha'+id);
$('#tiempo'+id).load(location.href + ' #tiempo'+id);
$('#metros'+id).load(location.href + ' #metros'+id);
$('#descripcion'+id).load(location.href + ' #descripcion'+id+" .panel-body");

})
.fail(function(response) {
Expand Down
10 changes: 5 additions & 5 deletions app/templates/sesiones.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ <h4 class="modal-title" id="myModalLabel"></h4>
<!-- </div> -->
</div>
</td>
<td data-toggle="collapse" data-parent="#accordion" href="#{{ post.id }}">{{ post.fecha }}</td>
<td data-toggle="collapse" data-parent="#accordion" href="#{{ post.id }}">{{ post.nombre }}</td>
<td data-toggle="collapse" data-parent="#accordion" href="#{{ post.id }}">{{ post.tiempo }}</td>
<td data-toggle="collapse" data-parent="#accordion" href="#{{ post.id }}">{{ post.metros }}</td>
<td id="fecha{{ post.id }}" data-toggle="collapse" data-parent="#accordion" href="#descripcion{{ post.id }}">{{ post.fecha }}</td>
<td id="nombre{{ post.id }}" data-toggle="collapse" data-parent="#accordion" href="#descripcion{{ post.id }}">{{ post.nombre }}</td>
<td id="tiempo{{ post.id }}"data-toggle="collapse" data-parent="#accordion" href="#descripcion{{ post.id }}">{{ post.tiempo }}</td>
<td id="metros{{ post.id }}"data-toggle="collapse" data-parent="#accordion" href="#descripcion{{ post.id }}">{{ post.metros }}</td>
</tr>
<tr>
<td colspan="4" class="hiddenRow">
<div id="{{ post.id }}" class="panel-collapse collapse">
<div id="descripcion{{ post.id }}" class="panel-collapse collapse">
<div class="panel-body">
{{ post.descripcion }}
</div>
Expand Down

0 comments on commit b76fc7c

Please sign in to comment.