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
5e1db259
Commit
5e1db259
authored
Jan 14, 2020
by
Tony Inuma Dahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX: Tabla de Merito docentes - validacion campo PUESTO para correcto registro
parent
44f26167
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
131 additions
and
118 deletions
+131
-118
registroTablaEvaluacionDocente.jsp
web/vista/registroTablaEvaluacionDocente.jsp
+131
-118
No files found.
web/vista/registroTablaEvaluacionDocente.jsp
View file @
5e1db259
...
...
@@ -20,7 +20,7 @@
<link
href=
"css/snackbar.css"
rel=
"stylesheet"
type=
"text/css"
/>
<!-- inline scripts related to this page -->
<script
type=
"text/javascript"
language=
"javascript"
>
/*$(document).ready( function() {
jQuery("#registroEncuesta").validationEngine();
});*/
...
...
@@ -40,9 +40,9 @@
<div
class=
"navbar-container"
id=
"navbar-container"
>
<
%@
include
file=
"banner.jsp"
%
>
</div>
<!-- /.navbar-container -->
<p
id=
"lblUsuario"
><
%=
usuario
!=
null
?
usuario
.
getCodigoTipoUsuario
()
:
""%
></p>
<p
id=
"lblUsuario"
><
%=
usuario
!=
null
?
usuario
.
getCodigoTipoUsuario
()
:
""%
></p>
</div>
<div
id=
"snackbar"
>
Se registro correctamente..
</div>
<div
id=
"snackbar"
>
Se registro correctamente..
</div>
<!-- /section:basics/navbar.layout -->
<div
class=
"main-container"
id=
"main-container"
>
<script
type=
"text/javascript"
>
...
...
@@ -326,24 +326,24 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
<!-- inline scripts related to this page -->
<script
type=
"text/javascript"
>
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
$
(
document
).
ready
(
function
()
{
jQuery
(
"#formulario"
).
validationEngine
();
jQuery
(
"#listado"
).
validationEngine
();
});
function
conMayuscula
(
field
)
{
field
.
value
=
field
.
value
.
toUpperCase
();
}
function
cargando
()
{
$
.
blockUI
({
message
:
'<div class="thecube"> <div class="cube c1"></div> <div class="cube c2"></div> <div class="cube c4"></div> <div class="cube c3"></div> </div>'
,
// message: '
<
div
class
=
"loading"
id
=
"g-spinner"
style
=
"zoom: 1;"
><
div
class
=
"circle c1"
><
/div><div class="circle c2"></
div
><
div
class
=
"circle c3"
><
/div><div class="circle c4"></
div
><
/div>'
,
// message: '
<
div
class
=
"js-loading-indicator triple"
style
=
"width: 192px; height: 192px; top: 64px; left: 208px;"
><
/div>'
,
baseZ
:
9000
,
overlayCSS
:
{
backgroundColor
:
'#1b2024'
,
...
...
@@ -359,22 +359,22 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
}
});
}
function
cerrar_cargando
()
{
$
.
unblockUI
();
}
function
segundaCarga
()
{
cargarArea
();
}
function
cargarArea
()
{
var
accion
=
"cargarPlana();"
;
var
nombre
=
"cmbArea"
;
$
.
ajax
({
type
:
'POST'
,
url
:
'../ServletArea?Accion=cargarArea'
,
data
:
'accion='
+
accion
+
'&nombre='
+
nombre
,
data
:
'accion='
+
accion
+
'&nombre='
+
nombre
,
beforeSend
:
function
()
{
cargando
();
},
success
:
function
(
resultado
)
{
...
...
@@ -384,12 +384,12 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
}
});
}
function
cargarPlana
()
{
var
codArea
=
$
(
"#cmbArea"
).
val
();
var
accion
=
""
;
var
nombre
=
"cmbPlana"
;
$
.
ajax
({
type
:
'POST'
,
url
:
'../ServletPlana?Accion=cargarPlana'
,
...
...
@@ -402,18 +402,18 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
},
complete
:
function
()
{
}
});
}
function
validar
()
{
var
estado
=
$
(
"#formulario"
).
validationEngine
();
if
(
estado
)
{
listarRegistros
();
}
}
function
listarRegistros
()
{
let
name
=
''
let
name
=
''
var
nombrePlana
=
$
(
"#cmbPlana option:selected"
).
text
();
var
codigoPlana
=
$
(
"#cmbPlana"
).
val
();
var
codigoPeriodo
=
"<%=periodo!=null?periodo.getCodigoPeriodo():""%>"
;
...
...
@@ -426,46 +426,48 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
},
success
:
function
(
resultado
)
{
cerrar_cargando
();
$
(
"#divListado"
).
html
(
resultado
);
name
=
$
(
"#lblUsuario"
).
text
();
if
(
name
===
"6"
)
{
$
(
"#divListado #btnRegistrar"
).
hide
();
}
let
periodoEnc
=
$
(
"#divListado #codEnc"
).
val
();
name
=
$
(
"#lblUsuario"
).
text
();
if
(
name
===
"6"
)
{
$
(
"#divListado #btnRegistrar"
).
hide
();
}
let
periodoEnc
=
$
(
"#divListado #codEnc"
).
val
();
// $("#divListado #txtPuesto").keypress(function (e) {
// if (e.which == 13 || e.keyCode == 13) {
//// alert('enter key is pressed');
// registrarPuesto(periodoEnc);
// }
// });
},
complete
:
function
()
{
}
});
}
function
mostrarSnackBar
()
{
// Get the snackbar DIV
var
x
=
document
.
getElementById
(
"snackbar"
);
// Add the "show" class to DIV
x
.
className
=
"show"
;
// After 3 seconds, remove the show class from DIV
setTimeout
(
function
(){
x
.
className
=
x
.
className
.
replace
(
"show"
,
""
);
},
2000
);
}
function
mostrarSnackBar
()
{
// Get the snackbar DIV
var
x
=
document
.
getElementById
(
"snackbar"
);
// Add the "show" class to DIV
x
.
className
=
"show"
;
// After 3 seconds, remove the show class from DIV
setTimeout
(
function
()
{
x
.
className
=
x
.
className
.
replace
(
"show"
,
""
);
},
2000
);
}
// $("#search").on('click',function(){
// alert('You press enter');
// });
function
conformidadRegistrarNota
()
{
function
conformidadRegistrarNota
()
{
bootbox
.
dialog
({
headerClass
:
"modal-bg-primary"
,
title
:
"<i class='ace-icon fa fa-check-circle white'></i> <span class='white'>Conformidad</span>"
,
...
...
@@ -482,17 +484,17 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
label
:
"<i class='fa fa-times bigger-110'></i> No"
,
className
:
"btn-danger btn-sm"
,
callback
:
function
()
{
}
}
}
});
}
function
armarDatos
()
{
var
cantidad
=
$
(
"#cantidad"
).
val
();
var
datos
=
""
;
let
datos
=
""
;
for
(
var
i
=
0
;
i
<
cantidad
;
i
++
)
{
var
codigoDocente
=
$
(
"#codDoc_"
+
i
+
""
).
val
();
var
nombreDocente
=
$
(
"#nomDoc_"
+
i
+
""
).
val
();
...
...
@@ -501,79 +503,90 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
var
notaEncuesta
=
$
(
"#notaEncuesta_"
+
i
+
""
).
val
();
var
txtPuesto
=
$
(
"#txtPuesto_"
+
i
+
""
).
val
();
var
txtObservacion
=
$
(
"#txtObservacion_"
+
i
+
""
).
val
();
if
(
notaPlana
!=
""
&&
notaExa
!=
""
&&
txtPuesto
!=
""
&&
txtObservacion
!=
""
)
{
if
(
notaPlana
!=
""
&&
notaExa
!=
""
&&
txtPuesto
!=
""
&&
txtObservacion
!=
""
)
{
if
(
datos
==
""
)
{
datos
=
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
datos
=
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
}
else
{
datos
+=
"!"
+
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
datos
+=
"!"
+
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
}
}
else
if
(
notaPlana
==
""
&&
notaExa
!=
""
&&
txtPuesto
!=
""
&&
txtObservacion
!=
""
)
{
}
else
if
(
notaPlana
==
""
&&
notaExa
!=
""
&&
txtPuesto
!=
""
&&
txtObservacion
!=
""
)
{
notaPlana
=
"vacio"
;
if
(
datos
==
""
)
{
datos
=
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
datos
=
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
}
else
{
datos
+=
"!"
+
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
datos
+=
"!"
+
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
}
}
else
if
(
notaExa
==
""
&&
notaPlana
!=
""
&&
txtPuesto
!=
""
&&
txtObservacion
!=
""
)
{
}
else
if
(
notaExa
==
""
&&
notaPlana
!=
""
&&
txtPuesto
!=
""
&&
txtObservacion
!=
""
)
{
notaExa
=
"vacio"
;
if
(
datos
==
""
)
{
datos
=
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
datos
=
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
}
else
{
datos
+=
"!"
+
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
datos
+=
"!"
+
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
}
}
else
if
(
txtPuesto
==
""
&&
txtObservacion
!=
""
&&
notaExa
!=
""
&&
notaPlana
!=
""
){
}
else
if
(
txtPuesto
==
""
&&
txtObservacion
!=
""
&&
notaExa
!=
""
&&
notaPlana
!=
""
)
{
txtPuesto
=
"vacio"
;
if
(
datos
==
""
)
{
datos
=
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
if
(
datos
==
""
)
{
datos
=
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
}
else
{
datos
+=
"!"
+
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
datos
+=
"!"
+
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
}
}
else
if
(
txtObservacion
==
""
&&
txtPuesto
!=
""
&&
notaExa
!=
""
&&
notaPlana
!=
""
){
txtObservacion
=
"vacio"
;
}
else
if
(
txtPuesto
==
""
&&
txtObservacion
==
""
&&
notaExa
!=
""
&&
notaPlana
!=
""
)
{
txtPuesto
=
"vacio"
;
txtObservacion
=
"vacio"
;
if
(
datos
==
""
)
{
datos
=
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
}
else
{
datos
+=
"!"
+
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
}
if
(
datos
==
""
)
{
datos
=
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
}
else
if
(
txtObservacion
==
""
&&
txtPuesto
!=
""
&&
notaExa
!=
""
&&
notaPlana
!=
""
)
{
txtObservacion
=
"vacio"
;
if
(
datos
==
""
)
{
datos
=
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
}
else
{
datos
+=
"!"
+
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
datos
+=
"!"
+
codigoDocente
+
"#"
+
nombreDocente
+
"#"
+
notaPlana
+
"#"
+
notaExa
+
"#"
+
notaEncuesta
+
"#"
+
txtPuesto
+
"#"
+
txtObservacion
;
}
}
}
registrarMerito
(
datos
);
}
function
registrarMerito
(
datos
)
{
var
codigoPeriodo
=
"<%=periodo!=null?periodo.getCodigoPeriodo():""%>"
;
var
codigoPlana
=
$
(
"#cmbPlana"
).
val
();
var
codigoEncuesta
=
$
(
"#codEnc"
).
val
();
$
.
ajax
({
type
:
'POST'
,
url
:
'../ServletTablaMerito?Accion=registrarNotaTablaEvaluacion'
,
...
...
@@ -582,13 +595,13 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
cargando
();
},
success
:
function
(
resultado
)
{
cerrar_cargando
();
},
complete
:
function
()
{
notificarRegistroNota
();
}
});
}
function
notificarRegistroNota
()
{
bootbox
.
dialog
({
headerClass
:
"modal-bg-success"
,
...
...
@@ -609,31 +622,31 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
function
validaSoloNumericos
(
e
)
{
let
tecla
=
(
document
.
all
)
?
e
.
keyCode
:
e
.
which
;
//Tecla de retroceso para borrar, siempre la permite
if
(
tecla
==
8
)
{
return
true
;
}
patron
=
/
[
0-9
]
/
;
tecla_final
=
String
.
fromCharCode
(
tecla
);
return
patron
.
test
(
tecla_final
);
}
let
tecla
=
(
document
.
all
)
?
e
.
keyCode
:
e
.
which
;
//Tecla de retroceso para borrar, siempre la permite
if
(
tecla
==
8
)
{
return
true
;
}
patron
=
/
[
0-9
]
/
;
tecla_final
=
String
.
fromCharCode
(
tecla
);
return
patron
.
test
(
tecla_final
);
}
// -----------------------------------------------------------------
function
doSearch
()
{
var
tableReg
=
document
.
getElementById
(
'datos'
);
var
searchText
=
document
.
getElementById
(
'searchTerm'
).
value
.
toLowerCase
();
var
cellsOfRow
=
""
;
var
found
=
false
;
var
compareWith
=
""
;
// Recorremos todas las filas con contenido de la tabla
for
(
var
i
=
1
;
i
<
tableReg
.
rows
.
length
;
i
++
)
{
cellsOfRow
=
tableReg
.
rows
[
i
].
getElementsByTagName
(
'td'
);
found
=
false
;
// Recorremos todas las celdas
for
(
var
j
=
0
;
j
<
cellsOfRow
.
length
&&
!
found
;
j
++
)
{
...
...
@@ -652,27 +665,27 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
tableReg
.
rows
[
i
].
style
.
display
=
'none'
;
}
}
}
$
(
'[data-rel=tooltip]'
).
tooltip
();
$
(
'[data-rel=tooltip]'
).
tooltip
();
function
conMayusculas
(
field
)
{
field
.
value
=
field
.
value
.
toUpperCase
();
}
$
(
'input'
).
keypress
(
function
(
e
)
{
if
(
e
.
which
==
13
)
{
return
false
;
}
});
function
validarIngreso
(
event
,
id
,
condicion
)
{
$
(
id
).
mask
(
'00.00'
,
{
reverse
:
true
});
}
</script>
<!-- the following scripts are used in demo only for onpage help and you don't need them -->
...
...
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