Cambiado checkbox por boton para agregar/eliminar curso.

add-license-1
Araozu 2020-06-02 19:17:05 -05:00
parent ee552d45e5
commit 5b1e387e91
3 changed files with 37 additions and 6 deletions

View File

@ -495,6 +495,11 @@ años:
- Lu1640 - Lu1640
- Lu1740 - Lu1740
Laboratorio: Laboratorio:
A:
Docente: Juan C. Juarez
Horas:
- Lu0850
- Lu0940
C: C:
Docente: T. Ramires (?) Docente: T. Ramires (?)
Horas: Horas:

View File

@ -1,10 +1,9 @@
<template lang="pug"> <template lang="pug">
div.info_curso div.info_curso(:style="estiloCurso")
h4.titulo_curso(@mouseenter="resaltarTodasCeldas" @mouseleave="quitarResaltadoCeldas" h4.titulo_curso(@mouseenter="resaltarTodasCeldas" @mouseleave="quitarResaltadoCeldas"
:title="cursoAgregado? 'Remover de mi horario': 'Agregar curso a mi horario'"
@click.stop="agregarCursoAMiHorario"
) )
input.marcador_curso(type="checkbox" v-model="cursoAgregado") // input.marcador_curso(type="checkbox" v-model="cursoAgregado")
span.ancho {{ curso.abreviado }} >&nbsp; span.ancho {{ curso.abreviado }} >&nbsp;
| {{ curso.nombre }} | {{ curso.nombre }}
table.datos table.datos
@ -32,6 +31,11 @@
td td
span.ancho | _ span.ancho | _
div.acciones-cursos
span.material-icons(@click.stop="agregarCursoAMiHorario" :title="cursoAgregado? 'Quitar': 'Agregar'")
| {{ cursoAgregado? "remove": "add" }}
// //
</template> </template>
@ -103,6 +107,9 @@
if idCurso is @idCurso then return true if idCurso is @idCurso then return true
false false
estiloCurso: ->
if @cursoAgregado then { backgroundColor: "var(--colorHover)" }
else {}
methods: methods:
agregarCursoAMiHorario: -> agregarCursoAMiHorario: ->
if @cursoAgregado if @cursoAgregado
@ -171,6 +178,21 @@
<style scoped lang="sass"> <style scoped lang="sass">
.acciones-cursos
margin-top: 0.15rem
display: inline-table
.material-icons
display: table-cell
user-select: none
cursor: pointer
font-size: 1.5rem
border: solid 1px transparent
border-radius: 2px
&:hover
border: solid 1px var(--colorTexto)
background-color: var(--colorHover)
.marcador_curso .marcador_curso
display: inline-block display: inline-block
margin-right: 0.45rem margin-right: 0.45rem
@ -186,11 +208,14 @@
.info_curso .info_curso
display: inline-block display: inline-block
padding: 1rem padding: 0.5rem 0.75rem
vertical-align: top vertical-align: top
border-radius: 2px
margin-right: 0.2rem
margin-bottom: 0.2rem
h4 h4
margin-top: 1rem margin-top: 0.5rem
margin-bottom: 0.25rem margin-bottom: 0.25rem
.teoria, .laboratorio, .datos .teoria, .laboratorio, .datos

View File

@ -16,6 +16,7 @@
br br
anio(:año="horarioUsuario" nombreAño="Mi horario") anio(:año="horarioUsuario" nombreAño="Mi horario")
anio(v-for="(año, i) in datos.años" :key="i" anio(v-for="(año, i) in datos.años" :key="i"
:año="año" :nombreAño="i" :año="año" :nombreAño="i"
) )