-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rafael
committed
Jun 12, 2018
1 parent
9c33f3f
commit 604a0ea
Showing
294 changed files
with
769 additions
and
521 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"instrucciones": "El paciente tendrá que soplar para que el globo no explote al tocar un pico." | ||
"instrucciones": "El paciente tendrá que soplar para obtener la mayor cantidad de monedas." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"instrucciones": "En esta sección se mostrará una lista de opciones con los 8 puntos de vista de cada cámara. El problema consiste en descifrar cuál es la imágen que corresponde a la cámara seleccionada." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<html lang="es"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Puntos de vista</title> | ||
|
||
<style type="text/css"> | ||
img { | ||
max-width: 100%; | ||
max-height: 100%; | ||
} | ||
</style> | ||
<link rel="stylesheet" type="text/css" href="./public/css/extra_fa.css"> | ||
|
||
<% include ../../src/views/layouts/header %> | ||
<script src="/public/common/js/d3/d3.min.js"></script> | ||
<script src="/public/common/js/react.js"></script> | ||
<script src="/public/common/js/react-dom.js"></script> | ||
<!-- <script src="/public/common/js/browser.js"></script> --> | ||
</head> | ||
|
||
<body class="bg-light text-dark"> | ||
<% include ../../src/views/layouts/nav %> | ||
|
||
<div class="container"> | ||
<div class="row my-3"> | ||
<div class="col-md-12"> | ||
<h3><b class="text-accent">Paciente actual: </b><span id="paciente_actual"></span></h3> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="col-12"> | ||
<div id="main"></div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script type="text/javascript" src="./public/js/Main.min.js"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"nombre": "Puntos de vista 2", | ||
"img": "thumbnail.jpg", | ||
"categorias": ["O"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import Img from '../../../../public/common/js/juegos/compiled/Img.jsx'; | ||
|
||
class Ejercicio extends React.Component{ | ||
render(){ | ||
return(<div className="row"> | ||
<div className="col-6"> | ||
<Img url="./../../../../public/common/img/puntosVista/1/1/0.png" /> | ||
</div> | ||
|
||
<div className="col-6"> | ||
<svg viewBox="0 0 100 60"> | ||
<image y="4" | ||
width="100" height="50" | ||
href="./../../../../public/common/img/puntosVista/1/1/aereo.png" /> | ||
<circle fill="red" cx={23} cy={4} r={2} /> | ||
<circle fill="red" cx={50} cy={4} r={2} /> | ||
<circle fill="red" cx={77} cy={4} r={2} /> | ||
|
||
<circle fill="red" cx={23} cy={29} r={2} /> | ||
<circle fill="red" cx={77} cy={29} r={2} /> | ||
|
||
<circle fill="red" cx={23} cy={54} r={2} /> | ||
<circle fill="red" cx={50} cy={54} r={2} /> | ||
<circle fill="red" cx={77} cy={54} r={2} /> | ||
</svg> | ||
</div> | ||
</div>); | ||
} | ||
} | ||
|
||
export default Ejercicio; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
import Bloque from '../../../../public/common/js/juegos/compiled/Bloque.jsx'; | ||
import Instrucciones from '../../../../public/common/js/juegos/compiled/Instrucciones.jsx'; | ||
import Nivel from '../../../../public/common/js/juegos/compiled/Nivel.jsx'; | ||
import Fin from '../../../../public/common/js/juegos/compiled/Fin.jsx'; | ||
import Ejercicio from './Ejercicio.jsx'; | ||
|
||
class Main extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
this.juego = "puntosVista2"; | ||
|
||
this.state = { | ||
inicio: true, | ||
fin: false, | ||
seleccionNivel: false, | ||
porcentaje: null, | ||
} | ||
|
||
this.iniciar = this.iniciar.bind(this); | ||
this.seleccionarNivel = this.seleccionarNivel.bind(this); | ||
this.terminar = this.terminar.bind(this); | ||
this.reiniciar = this.reiniciar.bind(this); | ||
} | ||
|
||
iniciar() { | ||
this.setState({ | ||
seleccionNivel: false, | ||
inicio: true, | ||
}); | ||
} | ||
|
||
reiniciar(){ | ||
this.setState({ | ||
inicio: false, | ||
fin: false, | ||
seleccionNivel: true, | ||
porcentaje: null | ||
}); | ||
} | ||
|
||
terminar(porcentaje) { | ||
this.setState({ | ||
fin: true, | ||
porcentaje: porcentaje | ||
}); | ||
} | ||
|
||
seleccionarNivel(nivel) { | ||
this.nivel = nivel; | ||
this.setState({ | ||
seleccionNivel: false | ||
}); | ||
} | ||
|
||
render() { | ||
if (this.state.seleccionNivel) { | ||
return ( | ||
<Bloque nombre={this.props.nombre}> | ||
<Nivel seleccionar={this.seleccionarNivel} /> | ||
</Bloque> | ||
); | ||
} else if (this.state.fin) { | ||
return( | ||
<Bloque nombre={this.props.nombre}> | ||
<Fin | ||
juego={this.juego} | ||
fechaInicio={this.fechaInicio} | ||
nivel={this.nivel} | ||
paciente={this.props.paciente} | ||
reiniciar={this.reiniciar} | ||
porcentaje={this.state.porcentaje} /> | ||
</Bloque> | ||
); | ||
} else if (this.state.inicio) { | ||
return ( | ||
<Bloque nombre={this.props.nombre}> | ||
<Ejercicio nivel={this.nivel} terminar={this.terminar}/> | ||
</Bloque> | ||
); | ||
} else { | ||
return ( | ||
<Bloque nombre={this.props.nombre}> | ||
<Instrucciones | ||
iniciar={this.iniciar} | ||
instrucciones={this.props.instrucciones} /> | ||
</Bloque> | ||
); | ||
} | ||
} | ||
} | ||
|
||
function getInfo(callback) { | ||
d3.json("./data/info.json", function(error, instrucciones) { | ||
d3.json("./meta.json", function(error, nombre) { | ||
Consulta.get('/paciente/actual/', function(data) { | ||
if (data["id"] != null) { | ||
mostrarPerfil(data); | ||
callback(data["id"],nombre["nombre"], instrucciones["instrucciones"]); | ||
} else { | ||
toastr("No has seleccionado un paciente"); | ||
} | ||
}); | ||
}); | ||
}); | ||
} | ||
|
||
$(document).ready(function(){ | ||
getInfo(function(paciente, nombre, instrucciones, datos) { | ||
ReactDOM.render(<Main | ||
paciente={paciente} | ||
nombre={nombre} | ||
instrucciones={instrucciones}/>, document.getElementById('main')); | ||
}) | ||
}); |
Oops, something went wrong.