Ahora se actualiza el nombre y la imagen nueva de forma dinámica
This commit is contained in:
+6
-6
@@ -50,10 +50,9 @@ function cambiarNombre() {
|
|||||||
$("#nuevoNombre").val("");
|
$("#nuevoNombre").val("");
|
||||||
|
|
||||||
|
|
||||||
if (typeof comprobarEstadoSesion === "function") {
|
comprobarSesion();
|
||||||
comprobarEstadoSesion();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,6 +70,7 @@ function borrarNombre() {
|
|||||||
|
|
||||||
function seleccionarFoto() {
|
function seleccionarFoto() {
|
||||||
$("#inputFoto").click();
|
$("#inputFoto").click();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#inputFoto").change(function () {
|
$("#inputFoto").change(function () {
|
||||||
@@ -79,6 +79,7 @@ $("#inputFoto").change(function () {
|
|||||||
if (!archivo) {
|
if (!archivo) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Comprobamos que sea una imagen
|
// Comprobamos que sea una imagen
|
||||||
if (!archivo.type.startsWith("image/")) {
|
if (!archivo.type.startsWith("image/")) {
|
||||||
@@ -110,9 +111,8 @@ $("#inputFoto").change(function () {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Actualizamos también el avatar superior en la cabecera
|
// Actualizamos también el avatar superior en la cabecera
|
||||||
if (typeof comprobarEstadoSesion === "function") {
|
|
||||||
comprobarEstadoSesion();
|
comprobarSesion();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user