Skip to content
Snippets Groups Projects
Commit 130521f8 authored by Fnac's avatar Fnac
Browse files

Merge origin/master

parents 381ff49e 44f48f82
No related branches found
No related tags found
No related merge requests found
......@@ -40,26 +40,3 @@ function pswigual(){
}
}
function Warn() {
alert ("This is a warning message!");
document.write ("This is a warning message!");
}
function confirmarBorarNook(){
confirm("mensaje");
var mensaje;
var opcion = confirm("Clicka en Aceptar o Cancelar");
if (opcion == true) {
mensaje = "Has clickado OK";
} else {
mensaje = "Has clickado Cancelar";
}
document.getElementById("borrar").innerHTML = mensaje;
}
\ No newline at end of file
......@@ -13,9 +13,14 @@ and open the template in the editor.
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="style.css" rel="stylesheet">
<script type='text/javascript' src='js/jquery-2.2.4.min.js'></script>
<script type='text/javascript' src='js/miscripts.js'></script>
<script>
warn();
<script type='text/javascript'>
function confirmar(url, mensaje){
if(confirm(mensaje)){
window.location.href=url;
}
}
</script>
</head>
<body >
......@@ -91,7 +96,7 @@ and open the template in the editor.
</form>
</div>
<div class="borrarNook">
<button type="submit" class="borrarNook" onclick="window.location.href='borrarNookSV?idNook=<%=misNooks.get(i).getIdNook()%>'">Borrar Nook</button>
<button type="submit" class="borrarNook" onclick="confirmar('borrarNookSV?idNook=<%=misNooks.get(i).getIdNook()%>','Seguro que quieres borrar el nook?');">Borrar Nook</button>
</div>
</div>
<%}%>
......
......@@ -15,6 +15,13 @@ and open the template in the editor.
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="style.css" rel="stylesheet">
<script type='text/javascript'>
function confirmar(url, mensaje){
if(confirm(mensaje)){
window.location.href=url;
}
}
</script>
</head>
<body >
<%
......@@ -154,7 +161,7 @@ and open the template in the editor.
</div>
<%if(userName.equals(comentarios.get(i).getAutor())){%>
<div class="borrarComentario">
<button type="submit" class="borrarComentario" onclick="window.location.href='borrarComentarioSV?idComentario=<%=comentarios.get(i).getIdComentario()%>&idNook=<%=nook.getIdNook()%>'">Borrar comentario</button>
<button type="submit" class="borrarComentario" onclick="confirmar('borrarComentarioSV?idComentario=<%=comentarios.get(i).getIdComentario()%>&idNook=<%=nook.getIdNook()%>', 'Seguro que quiere borrar el comentario?')"> Borrar comentario</button>
</div>
<%}%>
</div>
......
......@@ -759,4 +759,30 @@ margin:auto;
margin: 2rem auto auto;
}
.confirm {
display: none;
background-color: #F3F5F6;
color: #000000;
border: 1px solid #aaa;
position: fixed;
width: 300px;
height: 100px;
left: 50%;
margin-left: -100px;
padding: 10px 20px 10px;
box-sizing: border-box;
text-align: center;
}
.confirm button {
background-color: #FFFFFF;
display: inline-block;
border-radius: 12px;
border: 4px solid #aaa;
padding: 5px;
text-align: center;
width: 60px;
cursor: pointer;
}
.confirm .message {
text-align: left;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment