Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
horario
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Juan Guevara Mayta
horario
Commits
3b4c1317
Commit
3b4c1317
authored
Jan 20, 2020
by
sistem26user
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avance de add,edit HCD al 95 %
parent
0f29acbb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
42 deletions
+55
-42
ServletAula.java
src/java/pe/siso/horario/Servlets/ServletAula.java
+1
-1
arm_hor_gen.jsp
web/vista/arm_hor_gen.jsp
+54
-41
No files found.
src/java/pe/siso/horario/Servlets/ServletAula.java
View file @
3b4c1317
...
...
@@ -2706,7 +2706,7 @@ public class ServletAula extends HttpServlet {
PrintWriter
pw
=
response
.
getWriter
();
pw
.
println
(
"<select id='"
+
nombre
+
"' class=' form-control validate[required]'>"
);
pw
.
println
(
"<option value=''>[SELECCIONE]</option> "
);
pw
.
println
(
"<option value='
0
'>[SELECCIONE]</option> "
);
for
(
int
i
=
0
;
i
<
lista
.
size
();
i
++)
{
pw
.
println
(
"<option value='"
+
lista
.
get
(
i
).
getCodigoAula
()+
"'>"
+
lista
.
get
(
i
).
getNombreLocal
()+
":: "
+
lista
.
get
(
i
).
getNombreGrado
()+
"::"
+
lista
.
get
(
i
).
getNombreSeccion
()+
"::"
+
lista
.
get
(
i
).
getNombreTurno
()+
"::"
+
lista
.
get
(
i
).
getNombre
()+
"</option>"
);
}
...
...
web/vista/arm_hor_gen.jsp
View file @
3b4c1317
...
...
@@ -1152,12 +1152,7 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
success
:
function
(
data
,
textStatus
,
jqXHR
)
{
$
(
"#spanNombreAula"
).
text
(
data
);
}
});
}
function
close_carga
()
{
...
...
@@ -1173,26 +1168,18 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
}
function
agregarAula
(
codigoSede
){
var
nombre
=
"cboAulasXsede"
var
codperiodo
=
"<%=periodo!=null?periodo.getCodigoPeriodo():""%>"
;
$
.
ajax
({
type
:
'POST'
,
url
:
'../ServletAula?Accion=listarAulaPorSede'
,
data
:
'nombre='
+
nombre
+
'&codSede='
+
codigoSede
+
'&codperiodo='
+
codperiodo
,
beforeSend
:
function
(
xhr
)
{
cargando_cubo
()
},
success
:
function
(
resultado
){
$
(
'#divListadoAulasSede'
).
html
(
resultado
);
},
complete
:
function
(){
cerrar_cargando_cubo
()
//MOSTRAR DIALOGO CUANDO SE COMPLETE LA CARGA DE AULAS POR SEDE
$
(
"#dialog-agregarAula"
).
removeClass
(
'hide'
).
dialog
({
let
select
=
$
(
"#cboAulasXsede"
).
val
()
if
(
typeof
(
select
)
==
"undefined"
){
cargarComboAula
(
codigoSede
);
}
else
{
mostrarModalAgregarAula
(
codigoSede
)
$
(
"#cboAulasXsede"
).
val
(
"0"
)
}
}
function
mostrarModalAgregarAula
(
codigoSede
){
$
(
"#dialog-agregarAula"
).
removeClass
(
'hide'
).
dialog
({
resizable
:
false
,
modal
:
true
,
width
:
400
,
...
...
@@ -1207,11 +1194,8 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
let
codAula
=
$
(
"#cboAulasXsede"
).
val
()
//GUARDAR EN SESSION EL CODIGO DEL AULA
sessionStorage
.
setItem
(
"aulaAgregada"
,
codAula
)
agregarAulaAlGrupo
(
codAula
,
codigoSede
);
$
(
this
).
dialog
(
"close"
);
}
},{
html
:
"<i class='ace-icon fa fa-times bigger-110'></i> NO"
,
...
...
@@ -1223,15 +1207,35 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
}
]
});
}
});
}
function
cargarComboAula
(
codigoSede
){
var
nombre
=
"cboAulasXsede"
var
codperiodo
=
"<%=periodo!=null?periodo.getCodigoPeriodo():""%>"
;
$
.
ajax
({
type
:
'POST'
,
url
:
'../ServletAula?Accion=listarAulaPorSede'
,
data
:
'nombre='
+
nombre
+
'&codSede='
+
codigoSede
+
'&codperiodo='
+
codperiodo
,
beforeSend
:
function
(
xhr
)
{
cargando_cubo
()
},
success
:
function
(
resultado
){
$
(
'#divListadoAulasSede'
).
html
(
resultado
);
sessionStorage
.
setItem
(
"comboAulasCargado"
,
true
)
},
complete
:
function
(){
cerrar_cargando_cubo
()
mostrarModalAgregarAula
(
codigoSede
);
}
});
}
function
agregarAulaAlGrupo
(
nuevoAula
,
codigoSede
){
var
periodo
=
"<%=periodo!=null?periodo.getCodigoPeriodo():""%>"
;
var
cantidad
=
"<%=armandoHorario!=null?armandoHorario.getArmarHoraio_cantidad():""%>"
;
var
codAulas
=
"<%=armandoHorario!=null?armandoHorario.getArmarHoraio_codAulas():""%>"
;
var
periodo
=
"<%=periodo!=null?periodo.getCodigoPeriodo():""%>"
;
var
cantidad
=
"<%=armandoHorario!=null?armandoHorario.getArmarHoraio_cantidad():""%>"
;
var
codAulas
=
"<%=armandoHorario!=null?armandoHorario.getArmarHoraio_codAulas():""%>"
;
var
codAulasAntiguo
=
codAulas
var
codigoAulasFinal
=
codAulas
+
"#"
+
nuevoAula
var
cantidadFinal
=
parseInt
(
cantidad
)
+
1
...
...
@@ -1293,11 +1297,21 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
}
else
{
if
(
cursoEliminado
==
"1"
){
//se agrego antes 1 aula ?
let
aulaAgregada
=
sessionStorage
.
getItem
(
"aulaAgregada"
)
if
(
aulaAgregada
==
null
||
aulaAgregada
==
""
){
recibeQuery
=
codAulas
recibeCadenaAula
=
cadenaAulas
recibeCantidad
=
cantidad
recibeCantidad
=
parseInt
(
cantidad
)
}
else
{
recibeQuery
=
codAulas
+
"#"
+
aulaAgregada
recibeCadenaAula
=
cadenaAulas
recibeCantidad
=
parseInt
(
cantidad
)
+
1
}
}
else
{
recibeQuery
=
query
recibeQuery
=
query
if
(
recibeQuery
.
indexOf
(
"#"
)
>
-
1
){
recibeCadenaAula
=
cadenaAulas
recibeCantidad
=
cantidad
;
...
...
@@ -1306,6 +1320,8 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
recibeCantidad
=
1
;
}
}
}
//alert("cantidad= "+cantidad+"\n codAulas= "+codAulas+"\n cadena= "+cadena+"\n codigo= "+codigo+"\n cadenaAulas= "+cadenaAulas);
...
...
@@ -2150,11 +2166,8 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
popup_confimacion
(
codigaGrupoHorario
,
bloq
,
dia
,
Hini
,
Hfin
,
codaula
,
opcion
,
Turno
,
contGeneral
,
codigoDocente
,
historial
,
json
);
}
else
{
alertaVacios
();
//
//
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment