Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
Asistencia
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
Billy Larru
Asistencia
Commits
e219a7f8
Commit
e219a7f8
authored
Aug 14, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "configurando para tener jsp dentro de directorios"
This reverts commit
219df09c
.
parent
cde77307
Show whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
424 additions
and
340 deletions
+424
-340
RequestFilter.java
src/main/java/asistencia/filters/RequestFilter.java
+233
-0
RequestsFilter.java
src/main/java/asistencia/filters/RequestsFilter.java
+19
-19
GeneralUtils.java
src/main/java/asistencia/utilities/GeneralUtils.java
+5
-21
general.js
src/main/webapp/js/general.js
+1
-1
navbar.js
src/main/webapp/js/pages/navbar.js
+1
-1
proyectar_asistencia_policias.js
src/main/webapp/js/pages/proyectar_asistencia_policias.js
+0
-14
sidebar.js
src/main/webapp/js/pages/sidebar.js
+15
-22
registrarhorario.jsp
src/main/webapp/registrarhorario.jsp
+0
-25
__template.jsp
src/main/webapp/vistas/__template.jsp
+5
-5
controlAsistencia.jsp
src/main/webapp/vistas/administrativos/controlAsistencia.jsp
+0
-25
toleranciaMasiva.jsp
src/main/webapp/vistas/administrativos/toleranciaMasiva.jsp
+0
-25
toleranciaParticular.jsp
...in/webapp/vistas/administrativos/toleranciaParticular.jsp
+0
-25
cierreAsistenciaPolicias.jsp
src/main/webapp/vistas/cierreAsistenciaPolicias.jsp
+4
-4
comparativoProyeccionPolicias.jsp
src/main/webapp/vistas/comparativoProyeccionPolicias.jsp
+10
-10
controlAsistenciaDocentes.jsp
src/main/webapp/vistas/controlAsistenciaDocentes.jsp
+11
-10
controlAsistenciaPolicias.jsp
src/main/webapp/vistas/controlAsistenciaPolicias.jsp
+11
-10
crearRolPolicia.jsp
src/main/webapp/vistas/crearRolPolicia.jsp
+14
-14
error.jsp
src/main/webapp/vistas/error/error.jsp
+3
-3
horarioPolicias.jsp
src/main/webapp/vistas/horarioPolicias.jsp
+4
-4
index.jsp
src/main/webapp/vistas/index.jsp
+23
-14
main.jsp
src/main/webapp/vistas/main.jsp
+9
-7
mantenimientoSede.jsp
src/main/webapp/vistas/mantenimientoSede.jsp
+4
-4
montoPolicias.jsp
src/main/webapp/vistas/montoPolicias.jsp
+6
-6
proyectarAsistenciaPolicias.jsp
src/main/webapp/vistas/proyectarAsistenciaPolicias.jsp
+12
-12
registrarhorario.jsp
src/main/webapp/vistas/registrarhorario.jsp
+0
-25
footer-body.jsp
src/main/webapp/vistas/templates/footer-body.jsp
+13
-14
header-body.jsp
src/main/webapp/vistas/templates/header-body.jsp
+4
-2
header.jsp
src/main/webapp/vistas/templates/header.jsp
+12
-14
navbar.jsp
src/main/webapp/vistas/templates/navbar.jsp
+2
-2
sidebar.jsp
src/main/webapp/vistas/templates/sidebar.jsp
+1
-1
validar.jsp
src/main/webapp/vistas/templates/validar.jsp
+2
-1
No files found.
src/main/java/asistencia/filters/RequestFilter.java
0 → 100644
View file @
e219a7f8
///*
// * To change this license header, choose License Headers in Project Properties.
// * To change this template file, choose Tools | Templates
// * and open the template in the editor.
// */
//package asistencia.filters;
//
//import java.io.IOException;
//import java.io.PrintStream;
//import java.io.PrintWriter;
//import java.io.StringWriter;
//import java.util.ArrayList;
//import java.util.List;
//import javax.servlet.Filter;
//import javax.servlet.FilterChain;
//import javax.servlet.FilterConfig;
//import javax.servlet.ServletException;
//import javax.servlet.ServletRequest;
//import javax.servlet.ServletResponse;
//import javax.servlet.annotation.WebFilter;
//import javax.servlet.http.Cookie;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import javax.servlet.http.HttpSession;
//import javax.ws.rs.WebApplicationException;
//import javax.ws.rs.core.Response;
//import org.json.JSONArray;
//import org.json.JSONObject;
//import asistencia.config.RequestPath;
//import asistencia.utilities.GeneralUtils;
//import asistencia.utilities.HttpRequest;
//
///**
// *
// * @author sistem08user
// */
//@WebFilter(filterName = "RequestFilter", urlPatterns = {"/*"})
//public class RequestFilter implements Filter {
//
// // The filter configuration object we are associated with. If
// // this value is null, this filter instance is not currently
// // configured.
// private FilterConfig filterConfig = null;
//
// public RequestFilter() {
// }
//
// private void doBeforeProcessing(ServletRequest req, ServletResponse resp, FilterChain chain)
// throws IOException, ServletException {
// HttpServletRequest request = (HttpServletRequest) req;
// HttpServletResponse response = (HttpServletResponse) resp;
// String uri = request.getRequestURI();
//
// if (uri.endsWith("Asistencia") || uri.endsWith("Asistencia/")
// || uri.contains("vistas/index.jsp")
// || uri.contains("plantilla/assets") || uri.endsWith(".js") || uri.endsWith(".css")
// || uri.endsWith(".png") || uri.endsWith(".jpg") || uri.endsWith(".gif")
// || uri.contains("/login") || uri.contains("vistas/redireccionarServlet")
// || uri.contains("vistas/interceptar")) {
// chain.doFilter(request, response);
// } else {
// if (request.getSession().getAttribute("codigo") != null) {
// if (uri.endsWith(".jsp")) {
// HttpSession session = request.getSession();
// HttpRequest httpRequest = new HttpRequest();
// JSONObject valid = null;
// String respuesta = "";
// String auth = "";
// try {
// if (session.getAttribute("Authorization") != null) {
// auth = (String) session.getAttribute("Authorization");
// } else {
// setError(response);
// }
// respuesta = httpRequest.getRespuesta(RequestPath.VERIFICAR_LOGIN, HttpRequest.POST, new JSONObject("{}"), auth);
// valid = new JSONObject(respuesta);
// if (valid.getBoolean("status")) {
// JSONObject menu = new JSONObject(valid.getString("menu"));//Obtiene el menu
// List<Object> vistas = new ArrayList<>();
// JSONObject rolvista = valid.getJSONObject("rolvista");
// JSONArray urls = rolvista.getJSONArray("vistas");
// for (int i = 0; i < urls.length(); i++) {
// vistas.add(urls.get(i));
// }
// vistas.add("main.jsp");
// String ruta = request.getRequestURI();
// int indice = GeneralUtils.obtenerIndex(ruta);
// String rutaJsp = ruta.substring(indice, ruta.length());
// boolean acceso = vistas.contains(rutaJsp);
// if (!acceso) {
// request.getSession().setAttribute("error", "no tiene acceso a la vista solicitada");//Esta session se elimina en el jsp (para que no ocupe memoria)
//// request.getRequestDispatcher("/vistas/error.jsp").forward(request, response);
// response.sendRedirect("error/error.jsp");
// return;
// }
// session.setAttribute("menu", menu.toString());
// } else {
// deleteCredenciales(response, request);
// request.getSession().setAttribute("error", "no tiene credenciales validas");
//// request.getRequestDispatcher("/vistas/error.jsp").forward(request, response);
// response.sendRedirect("error/error.jsp");
// return;
//// setError(response);
// }
// } catch (Exception ex) {
// request.getSession().setAttribute("error", ex.getMessage());
//// request.getRequestDispatcher("/vistas/error.jsp").forward(request, response);
// response.sendRedirect("error/error.jsp");
// return;
//// setError(response);
// }
// }
// chain.doFilter(request, response);
// } else {
// deleteCredenciales(response, request);
// response.sendRedirect("index.jsp");
// }
// }
// }
//
// private void deleteCredenciales(HttpServletResponse response, HttpServletRequest request) {
// Cookie cookieAuth = new Cookie("Authorization", "");
// cookieAuth.setMaxAge(0);
// request.getSession().invalidate();
// response.addCookie(cookieAuth);
// }
//
// private void sendError(HttpServletResponse response) throws IOException {
// response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
// response.sendError(401);
// }
//
// public void setError(HttpServletResponse response) throws IOException {
// Response.ResponseBuilder builder = null;
// sendError(response);
// builder = Response.status(Response.Status.UNAUTHORIZED).entity(response);
// throw new WebApplicationException(builder.build());
// }
//
// private void doAfterProcessing(ServletRequest request, ServletResponse response)
// throws IOException, ServletException {
//
// }
//
// public void doFilter(ServletRequest req, ServletResponse resp,
// FilterChain chain)
// throws IOException, ServletException {
// System.out.println("Entrando al filtro");
// doBeforeProcessing(req, resp, chain);
//
//// chain.doFilter(req, resp);
// doAfterProcessing(req, resp);
//
// }
//
// /**
// * Return the filter configuration object for this filter.
// */
// public FilterConfig getFilterConfig() {
// return (this.filterConfig);
// }
//
// /**
// * Set the filter configuration object for this filter.
// *
// * @param filterConfig The filter configuration object
// */
// public void setFilterConfig(FilterConfig filterConfig) {
// this.filterConfig = filterConfig;
// }
//
// /**
// * Destroy method for this filter
// */
// public void destroy() {
// }
//
// /**
// * Init method for this filter
// */
// public void init(FilterConfig filterConfig) {
//
// }
//
// private void sendProcessingError(Throwable t, ServletResponse response) {
// String stackTrace = getStackTrace(t);
//
// if (stackTrace != null && !stackTrace.equals("")) {
// try {
// response.setContentType("text/html");
// PrintStream ps = new PrintStream(response.getOutputStream());
// PrintWriter pw = new PrintWriter(ps);
// pw.print("<html>\n<head>\n<title>Error</title>\n</head>\n<body>\n"); //NOI18N
//
// // PENDING! Localize this for next official release
// pw.print("<h1>The resource did not process correctly</h1>\n<pre>\n");
// pw.print(stackTrace);
// pw.print("</pre></body>\n</html>"); //NOI18N
// pw.close();
// ps.close();
// response.getOutputStream().close();
// } catch (Exception ex) {
// }
// } else {
// try {
// PrintStream ps = new PrintStream(response.getOutputStream());
// t.printStackTrace(ps);
// ps.close();
// response.getOutputStream().close();
// } catch (Exception ex) {
// }
// }
// }
//
// public static String getStackTrace(Throwable t) {
// String stackTrace = null;
// try {
// StringWriter sw = new StringWriter();
// PrintWriter pw = new PrintWriter(sw);
// t.printStackTrace(pw);
// pw.close();
// sw.close();
// stackTrace = sw.getBuffer().toString();
// } catch (Exception ex) {
// }
// return stackTrace;
// }
//
// public void log(String msg) {
// filterConfig.getServletContext().log(msg);
// }
//
//}
src/main/java/asistencia/filters/RequestsFilter.java
View file @
e219a7f8
...
...
@@ -35,6 +35,7 @@ import org.json.JSONObject;
*/
public
class
RequestsFilter
implements
Filter
{
private
FilterConfig
filterConfig
=
null
;
public
RequestsFilter
()
{
...
...
@@ -45,13 +46,13 @@ public class RequestsFilter implements Filter {
HttpServletRequest
request
=
(
HttpServletRequest
)
req
;
HttpServletResponse
response
=
(
HttpServletResponse
)
resp
;
String
uri
=
request
.
getRequestURI
();
if
(
uri
.
endsWith
(
"vistas/index.jsp"
))
{
if
(
uri
.
endsWith
(
"vistas/index.jsp"
))
{
if
(
request
.
getSession
().
getAttribute
(
"codigo"
)
!=
null
)
{
response
.
sendRedirect
(
request
.
getContextPath
()
+
"/vistas/
main.jsp"
);
response
.
sendRedirect
(
"
main.jsp"
);
return
;
}
chain
.
doFilter
(
req
,
resp
);
}
else
{
}
else
{
if
(
request
.
getSession
().
getAttribute
(
"codigo"
)
!=
null
)
{
if
(
uri
.
endsWith
(
".jsp"
))
{
HttpSession
session
=
request
.
getSession
();
...
...
@@ -75,43 +76,38 @@ public class RequestsFilter implements Filter {
for
(
int
i
=
0
;
i
<
urls
.
length
();
i
++)
{
vistas
.
add
(
urls
.
get
(
i
));
}
vistas
.
add
(
"main.jsp"
);
String
ruta
=
request
.
getRequestURI
();
String
rutaJsp
=
GeneralUtils
.
obtenerURIvista
(
ruta
);
System
.
out
.
println
(
"Ruta: "
+
ruta
);
System
.
out
.
println
(
"rutajsp: "
+
rutaJsp
);
System
.
out
.
println
(
vistas
);
int
indice
=
GeneralUtils
.
obtenerIndex
(
ruta
);
String
rutaJsp
=
ruta
.
substring
(
indice
,
ruta
.
length
());
boolean
acceso
=
vistas
.
contains
(
rutaJsp
);
System
.
out
.
println
(
acceso
);
if
(!
acceso
)
{
request
.
getSession
().
setAttribute
(
"error"
,
"no tiene acceso a la vista solicitada"
);
//Esta session se elimina en el jsp (para que no ocupe memoria)
request
.
getRequestDispatcher
(
request
.
getContextPath
()
+
"/vistas/error.jsp"
).
forward
(
request
,
response
);
request
.
getRequestDispatcher
(
"/vistas/error.jsp"
).
forward
(
request
,
response
);
return
;
}
session
.
setAttribute
(
"menu"
,
menu
.
toString
());
}
else
{
deleteCredenciales
(
response
,
request
);
deleteCredenciales
(
response
,
request
);
request
.
getSession
().
setAttribute
(
"error"
,
"no tiene credenciales validas"
);
request
.
getRequestDispatcher
(
request
.
getContextPath
()
+
"/vistas/error.jsp"
).
forward
(
request
,
response
);
request
.
getRequestDispatcher
(
"/vistas/error.jsp"
).
forward
(
request
,
response
);
return
;
}
}
catch
(
Exception
ex
)
{
request
.
getSession
().
setAttribute
(
"error"
,
ex
.
getMessage
());
request
.
getRequestDispatcher
(
request
.
getContextPath
()
+
"/vistas/error.jsp"
).
forward
(
request
,
response
);
request
.
getRequestDispatcher
(
"/vistas/error.jsp"
).
forward
(
request
,
response
);
return
;
}
}
chain
.
doFilter
(
request
,
response
);
}
else
{
deleteCredenciales
(
response
,
request
);
request
.
getSession
().
setAttribute
(
"error"
,
"no tiene una sesion activa"
);
request
.
getRequestDispatcher
(
request
.
getContextPath
()
+
"/vistas/error.jsp"
).
forward
(
request
,
response
);
deleteCredenciales
(
response
,
request
);
request
.
getSession
().
setAttribute
(
"error"
,
"no tiene una sesion activa"
);
request
.
getRequestDispatcher
(
"/vistas/error.jsp"
).
forward
(
request
,
response
);
}
}
}
private
void
deleteCredenciales
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
private
void
deleteCredenciales
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
request
.
getSession
().
invalidate
();
Cookie
cookieAuth
=
new
Cookie
(
"Authorization"
,
""
);
cookieAuth
.
setMaxAge
(
0
);
...
...
@@ -129,7 +125,6 @@ public class RequestsFilter implements Filter {
builder
=
Response
.
status
(
Response
.
Status
.
UNAUTHORIZED
).
entity
(
response
);
throw
new
WebApplicationException
(
builder
.
build
());
}
private
void
doAfterProcessing
(
ServletRequest
request
,
ServletResponse
response
)
throws
IOException
,
ServletException
{
...
...
@@ -165,11 +160,16 @@ public class RequestsFilter implements Filter {
FilterChain
chain
)
throws
IOException
,
ServletException
{
doBeforeProcessing
(
request
,
response
,
chain
);
// chain.doFilter(request, response);
doAfterProcessing
(
request
,
response
);
}
/**
...
...
src/main/java/asistencia/utilities/GeneralUtils.java
View file @
e219a7f8
...
...
@@ -5,38 +5,22 @@
*/
package
asistencia
.
utilities
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
/**
*
* @author sistem08user
*/
public
class
GeneralUtils
{
public
static
int
obtenerIndex
(
String
ruta
)
{
public
static
int
obtenerIndex
(
String
ruta
){
char
[]
c
=
ruta
.
toCharArray
();
int
salida
=
0
;
for
(
int
i
=
c
.
length
-
1
;
i
>=
0
;
i
--)
{
String
help
=
c
[
i
]
+
""
;
if
(!
help
.
equals
(
"/"
))
{
for
(
int
i
=
c
.
length
-
1
;
i
>=
0
;
i
--)
{
String
help
=
c
[
i
]
+
""
;
if
(!
help
.
equals
(
"/"
))
{
salida
=
i
;
}
else
{
}
else
{
break
;
}
}
return
salida
;
}
public
static
String
obtenerURIvista
(
String
ruta
)
{
String
rutaVista
=
""
;
String
patron
=
".*/vistas/(.*)"
;
Pattern
pattern
=
Pattern
.
compile
(
patron
);
Matcher
matcher
=
pattern
.
matcher
(
ruta
);
if
(
matcher
.
find
())
{
rutaVista
=
matcher
.
group
(
1
);
}
return
rutaVista
;
}
}
src/main/webapp/js/general.js
View file @
e219a7f8
...
...
@@ -148,7 +148,7 @@ let block = () => {
let
logOut
=
()
=>
{
document
.
querySelector
(
'#logOut'
).
addEventListener
(
'click'
,
(
e
)
=>
{
window
.
location
.
href
=
`
${
contextPath
}
/vistas/logout`
;
window
.
location
.
href
=
'../vistas/logout'
;
});
};
...
...
src/main/webapp/js/pages/navbar.js
View file @
e219a7f8
...
...
@@ -37,7 +37,7 @@ let DOMNav = {
continue
;
}
html
+=
`<li><a target="_blank" href="
${
contextPath
}
vistas/interceptar?p=' + url + 'vistas/redireccionarServlet&cp=' + cp + '" class="redirect" > `
//<img src="assets/images/flags/de.png" alt="">
html
+=
'<li><a target="_blank" href="../vistas/interceptar?p='
+
url
+
'vistas/redireccionarServlet&cp='
+
cp
+
'" class="redirect" > '
//<img src="assets/images/flags/de.png" alt="">
+
/*'<i class="glyphicon glyphicon-arrow-right"></i>'+*/
proyectos
[
i
].
nombre
+
'</a></li>'
;
}
document
.
getElementById
(
"proyectos"
).
innerHTML
=
html
;
...
...
src/main/webapp/js/pages/proyectar_asistencia_policias.js
View file @
e219a7f8
...
...
@@ -8,20 +8,6 @@ function initializeData() {
"fecha_entrada"
:
"16/06/2018"
,
"marcacion_entrada"
:
"06:59"
,
"marcacion_salida"
:
"00:00"
,
"fecha_salida"
:
"16/06/2018"
});
data
.
push
({
"dni"
:
"12345678"
,
"nombres"
:
"DELGADO CHOZO JUAN FRANCISCO"
,
"sede"
:
"CANTA CALLAO 2"
,
"horario"
:
"07:00 - 07:00"
,
"tipo_horario"
:
"AMANECIDA 24h"
,
"fecha_entrada"
:
"17/06/2018"
,
"marcacion_entrada"
:
"06:59"
,
"marcacion_salida"
:
"00:00"
,
"fecha_salida"
:
"18/06/2018"
});
data
.
push
({
"dni"
:
"12345678"
,
"nombres"
:
"DELGADO CHOZO JUAN FRANCISCO"
,
"sede"
:
"CANTA CALLAO 2"
,
"horario"
:
"07:00 - 07:00"
,
"tipo_horario"
:
"AMANECIDA 24h"
,
"fecha_entrada"
:
"17/06/2018"
,
"marcacion_entrada"
:
"06:59"
,
"marcacion_salida"
:
"00:00"
,
"fecha_salida"
:
"18/06/2018"
});
data
.
push
({
"dni"
:
"12345678"
,
"nombres"
:
"DELGADO CHOZO JUAN FRANCISCO"
,
"sede"
:
"CANTA CALLAO 2"
,
"horario"
:
"07:00 - 07:00"
,
"tipo_horario"
:
"AMANECIDA 24h"
,
"fecha_entrada"
:
"17/06/2018"
,
"marcacion_entrada"
:
"06:59"
,
"marcacion_salida"
:
"00:00"
,
"fecha_salida"
:
"18/06/2018"
});
data
.
push
({
"dni"
:
"12345678"
,
"nombres"
:
"DELGADO CHOZO JUAN FRANCISCO"
,
"sede"
:
"CANTA CALLAO 2"
,
"horario"
:
"07:00 - 07:00"
,
"tipo_horario"
:
"AMANECIDA 24h"
,
"fecha_entrada"
:
"17/06/2018"
,
"marcacion_entrada"
:
"06:59"
,
"marcacion_salida"
:
"00:00"
,
"fecha_salida"
:
"18/06/2018"
});
data
.
push
({
"dni"
:
"12345678"
,
"nombres"
:
"DELGADO CHOZO JUAN FRANCISCO"
,
"sede"
:
"CANTA CALLAO 2"
,
"horario"
:
"07:00 - 07:00"
,
"tipo_horario"
:
"AMANECIDA 24h"
,
"fecha_entrada"
:
"17/06/2018"
,
"marcacion_entrada"
:
"06:59"
,
"marcacion_salida"
:
"00:00"
,
"fecha_salida"
:
"18/06/2018"
});
data
.
push
({
"dni"
:
"12345678"
,
"nombres"
:
"DELGADO CHOZO JUAN FRANCISCO"
,
"sede"
:
"CANTA CALLAO 2"
,
"horario"
:
"07:00 - 07:00"
,
"tipo_horario"
:
"AMANECIDA 24h"
,
"fecha_entrada"
:
"17/06/2018"
,
"marcacion_entrada"
:
"06:59"
,
"marcacion_salida"
:
"00:00"
,
"fecha_salida"
:
"18/06/2018"
});
data
.
push
({
"dni"
:
"12345678"
,
"nombres"
:
"DELGADO CHOZO JUAN FRANCISCO"
,
"sede"
:
"CANTA CALLAO 2"
,
"horario"
:
"07:00 - 07:00"
,
"tipo_horario"
:
"AMANECIDA 24h"
,
"fecha_entrada"
:
"17/06/2018"
,
"marcacion_entrada"
:
"06:59"
,
"marcacion_salida"
:
"00:00"
,
"fecha_salida"
:
"18/06/2018"
});
data
.
push
({
"dni"
:
"12345678"
,
"nombres"
:
"DELGADO CHOZO JUAN FRANCISCO"
,
"sede"
:
"CANTA CALLAO 2"
,
"horario"
:
"07:00 - 07:00"
,
"tipo_horario"
:
"AMANECIDA 24h"
,
"fecha_entrada"
:
"17/06/2018"
,
"marcacion_entrada"
:
"06:59"
,
"marcacion_salida"
:
"00:00"
,
"fecha_salida"
:
"18/06/2018"
});
sedes
=
[
"LINCE"
,
"MONTESORI"
,
"AREQUIPA"
,
"ARENALES"
,
"CUBA"
,
"COCALENOS"
,
"BELISARIO"
,
"BERTONELLI"
,
"VILLA EL SALVADOR"
];
...
...
src/main/webapp/js/pages/sidebar.js
View file @
e219a7f8
...
...
@@ -6,9 +6,8 @@ const DOMSideBar = {
},
setMenu
()
{
let
location
=
window
.
location
;
// let position = getUrl(location.pathname, "/");
// let path = location.pathname.substring(position + 1);//obtiene el nombre de la vista jsp para activar la clase .active
let
path
=
getUrl
(
location
.
href
);
let
position
=
getUrl
(
location
.
pathname
,
"/"
);
let
path
=
location
.
pathname
.
substring
(
position
+
1
);
//obtiene el nombre de la vista jsp para activar la clase .active
let
menu
=
document
.
getElementById
(
"MENU"
);
let
c
=
window
.
sidebar
;
//obtiene el menu
console
.
log
(
c
)
...
...
@@ -16,7 +15,6 @@ const DOMSideBar = {
let
html
=
""
;
let
active
=
""
;
/* Recorrer titulos */
debugger
;
for
(
var
i
in
contenido
)
{
let
titulo
=
contenido
[
i
].
titulo
;
html
+=
`<li class="navigation-header"><span><i class="fa
${
titulo
.
ico
}
fa-lg" title="Main pages"></i>
${
titulo
.
nombre
}
</span></li>`
;
...
...
@@ -45,16 +43,16 @@ const DOMSideBar = {
}
else
{
active
=
''
;
}
html
+=
`<li class="
${
active
}
"><a href="
${
contextPath
}
vistas/
${
subcategoria
[
l
].
url
}
"><span>
${
primeraLetraMayuscula
(
subcategoria
[
l
].
nombre
)}
</span></a></li>`
;
html
+=
`<li class="
${
active
}
"><a href="
${
subcategoria
[
l
].
url
}
"><span>
${
primeraLetraMayuscula
(
subcategoria
[
l
].
nombre
)}
</span></a></li>`
;
}
html
+=
`</li></ul>`
;
}
else
{
html
+=
`<li class="
${
active
}
"><a href="
${
c
ontextPath
}
vistas/
${
c
ategoria
[
k
].
url
}
"><span>
${
primeraLetraMayuscula
(
categoria
[
k
].
nombre
)}
</span></a></li>`
;
html
+=
`<li class="
${
active
}
"><a href="
${
categoria
[
k
].
url
}
"><span>
${
primeraLetraMayuscula
(
categoria
[
k
].
nombre
)}
</span></a></li>`
;
}
}
html
+=
`</li></ul>`
;
}
else
{
html
+=
`<li class="
${
active
}
"><a href="
${
contextPath
}
vistas/
${
modulo
[
j
].
url
}
"><i class="fa
${
modulo
[
j
].
ico
}
fa-lg"></i><span>
${
primeraLetraMayuscula
(
modulo
[
j
].
nombre
)}
</span></a></li>`
;
html
+=
`<li class="
${
active
}
"><a href="
${
modulo
[
j
].
url
}
"><i class="fa
${
modulo
[
j
].
ico
}
fa-lg"></i><span>
${
primeraLetraMayuscula
(
modulo
[
j
].
nombre
)}
</span></a></li>`
;
}
}
}
...
...
@@ -70,21 +68,15 @@ const DOMSideBar = {
logOut
();
}
}
//let getUrl = (pathname, caracter) => {
// let position = 0;
// for (let i = pathname.length - 1; i > 0; i--) {
// if (pathname[i] === caracter) {
// position = i;
// break;
// }
// }
// return position;
//}
let
getUrl
=
path
=>
{
let
pattern
=
"^(?:.*)/vistas/(.*)$"
;
let
match
=
path
.
match
(
pattern
);
return
match
[
1
];
let
getUrl
=
(
pathname
,
caracter
)
=>
{
let
position
=
0
;
for
(
let
i
=
pathname
.
length
-
1
;
i
>
0
;
i
--
)
{
if
(
pathname
[
i
]
===
caracter
)
{
position
=
i
;
break
;
}
}
return
position
;
}
DOMSideBar
.
init
();
\ No newline at end of file
src/main/webapp/registrarhorario.jsp
deleted
100644 → 0
View file @
cde77307
<jsp:include
page=
"/vistas/templates/validar.jsp"
/>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<jsp:include
page=
"/vistas/templates/header.jsp"
/>
<!--template-core-->
<!--css de la pagina-->
<!--css-->
</head>
<body>
<jsp:include
page=
"/vistas/templates/header-body.jsp"
/>
<!-- content -->
<!-- / content -->
<jsp:include
page=
"/vistas/templates/footer-body.jsp"
/>
<!--js de la pagina-->
<!--<script src="${pageContext.request.contextPath}/plantilla/assets/js/plugins/tables/datatables/datatables.min.js" type="text/javascript"></script>-->
<!--js-->
</body>
</html>
\ No newline at end of file
src/main/webapp/vistas/__template.jsp
View file @
e219a7f8
<
jsp:include
page=
"/vistas/templates/validar.jsp"
/
>
<
%@
include
file=
"templates/validar.jsp"
%
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<
jsp:include
page=
"/vistas/templates/header.jsp"
/
>
<
%@
include
file=
"templates/header.jsp"
%
>
<!--template-core-->
<!--css de la pagina-->
<!--css-->
</head>
<body>
<
jsp:include
page=
"/vistas/templates/header-body.jsp"
/
>
<
%@
include
file=
"templates/header-body.jsp"
%
>
<!-- content -->
<!-- / content -->
<
jsp:include
page=
"/vistas/templates/footer-body.jsp"
/
>
<
%@
include
file=
"templates/footer-body.jsp"
%
>
<!--js de la pagina-->
<!--<script src="${pageContext.request.contextPath}/plantilla/assets/js/plugins/tables/datatables/datatables.min.js" type="text/javascript"></script>-->
<!--js-->
</body>
...
...
src/main/webapp/vistas/administrativos/controlAsistencia.jsp
deleted
100644 → 0
View file @
cde77307
<jsp:include
page=
"/vistas/templates/validar.jsp"
/>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<jsp:include
page=
"/vistas/templates/header.jsp"
/>
<!--template-core-->
<!--css de la pagina-->
<!--css-->
</head>
<body>
<jsp:include
page=
"/vistas/templates/header-body.jsp"
/>
<!-- content -->
<!-- / content -->
<jsp:include
page=
"/vistas/templates/footer-body.jsp"
/>
<!--js de la pagina-->
<!--<script src="${pageContext.request.contextPath}/plantilla/assets/js/plugins/tables/datatables/datatables.min.js" type="text/javascript"></script>-->
<!--js-->
</body>
</html>
\ No newline at end of file
src/main/webapp/vistas/administrativos/toleranciaMasiva.jsp
deleted
100644 → 0
View file @
cde77307
<jsp:include
page=
"/vistas/templates/validar.jsp"
/>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<jsp:include
page=
"/vistas/templates/header.jsp"
/>
<!--template-core-->
<!--css de la pagina-->
<!--css-->
</head>
<body>
<jsp:include
page=
"/vistas/templates/header-body.jsp"
/>
<!-- content -->
<!-- / content -->
<jsp:include
page=
"/vistas/templates/footer-body.jsp"
/>
<!--js de la pagina-->
<!--<script src="${pageContext.request.contextPath}/plantilla/assets/js/plugins/tables/datatables/datatables.min.js" type="text/javascript"></script>-->
<!--js-->
</body>
</html>
\ No newline at end of file
src/main/webapp/vistas/administrativos/toleranciaParticular.jsp
deleted
100644 → 0
View file @
cde77307
<jsp:include
page=
"/vistas/templates/validar.jsp"
/>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<jsp:include
page=
"/vistas/templates/header.jsp"
/>
<!--template-core-->
<!--css de la pagina-->
<!--css-->
</head>
<body>
<jsp:include
page=
"/vistas/templates/header-body.jsp"
/>
<!-- content -->
<!-- / content -->
<jsp:include
page=
"/vistas/templates/footer-body.jsp"
/>
<!--js de la pagina-->
<!--<script src="${pageContext.request.contextPath}/plantilla/assets/js/plugins/tables/datatables/datatables.min.js" type="text/javascript"></script>-->
<!--js-->
</body>
</html>
\ No newline at end of file
src/main/webapp/vistas/
policias/
cierreAsistenciaPolicias.jsp
→
src/main/webapp/vistas/cierreAsistenciaPolicias.jsp
View file @
e219a7f8
<
jsp:include
page=
"/vistas/templates/validar.jsp"
/
>
<
%@
include
file=
"templates/validar.jsp"
%
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<
jsp:include
page=
"/vistas/templates/header.jsp"
/
>
<
%@
include
file=
"templates/header.jsp"
%
>
<!--template-core-->
<!--css de la pagina-->
<!--css-->
</head>
<body>
<
jsp:include
page=
"/vistas/templates/header-body.jsp"
/
>
<
%@
include
file=
"templates/header-body.jsp"
%
>
<!-- content -->
<!-- / content -->
<
jsp:include
page=
"/vistas/templates/footer-body.jsp"
/
>
<
%@
include
file=
"templates/footer-body.jsp"
%
>
<!--js de la pagina-->
<!--js-->
...
...
src/main/webapp/vistas/
policias/
comparativoProyeccionPolicias.jsp
→
src/main/webapp/vistas/comparativoProyeccionPolicias.jsp
View file @
e219a7f8
<
jsp:include
page=
"/vistas/templates/validar.jsp"
/
>
<
%@
include
file=
"templates/validar.jsp"
%
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<
jsp:include
page=
"/vistas/templates/header.jsp"
/
>
<
%@
include
file=
"templates/header.jsp"
%
>
<!--template-core-->
<!--css de la pagina-->
<!--css-->
</head>
<body>
<
jsp:include
page=
"/vistas/templates/header-body.jsp"
/
>
<
%@
include
file=
"templates/header-body.jsp"
%
>
<!-- content -->
<div
class=
"col-md-4 col-md-offset-4"
>
<div
class=
"panel panel-primary"
>
...
...
@@ -100,14 +100,14 @@
<!-- / content -->
<
jsp:include
page=
"/vistas/templates/footer-body.jsp"
/
>
<
%@
include
file=
"templates/footer-body.jsp"
%
>
<!--js de la pagina-->
<script
src=
"
${pageContext.request.contextPath}
/plantilla/assets/js/plugins/tables/datatables/datatables.min.js"
type=
"text/javascript"
></script>
<script
src=
"
${pageContext.request.contextPath}
/plantilla/assets/js/plugins/ui/moment/moment.min.js"
type=
"text/javascript"
></script>
<script
src=
"${pageContext.request.contextPath}/plantilla/assets/js/plugins/pickers/daterangepicker.js"
type=
"text/javascript
"
></script>
<script
src=
"${pageContext.request.contextPath}/plantilla/assets/js/core/libraries/jquery_ui/widgets.min.js"
type=
"text/javascript
"
></script>
<script
src=
"
${pageContext.request.contextPath}
/js/lib/lodash.js"
type=
"text/javascript"
></script>
<script
src=
"
${pageContext.request.contextPath}
/js/pages/comparativo_proyeccion_policias.js"
type=
"text/javascript"
></script>
<script
src=
"
..
/plantilla/assets/js/plugins/tables/datatables/datatables.min.js"
type=
"text/javascript"
></script>
<script
src=
"
..
/plantilla/assets/js/plugins/ui/moment/moment.min.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/pickers/daterangepicker.js
"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/core/libraries/jquery_ui/widgets.min.js
"
></script>
<script
src=
"
..
/js/lib/lodash.js"
type=
"text/javascript"
></script>
<script
src=
"
..
/js/pages/comparativo_proyeccion_policias.js"
type=
"text/javascript"
></script>
<!--js-->
</body>
...
...
src/main/webapp/vistas/
docentes/
controlAsistenciaDocentes.jsp
→
src/main/webapp/vistas/controlAsistenciaDocentes.jsp
View file @
e219a7f8
<
jsp:include
page=
"/vistas/templates/validar.jsp"
/
>
<
%@
include
file=
"templates/validar.jsp"
%
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<
jsp:include
page=
"/vistas/templates/header.jsp"
/
>
<
%@
include
file=
"templates/header.jsp"
%
>
<!--template-core-->
<!--css de la pagina-->
<!--<link href="../css/lib/bootstrap-select/bootstrap-select.min.css" rel="stylesheet" type="text/css"/>-->
<!--css-->
</head>
<body>
<
jsp:include
page=
"/vistas/templates/header-body.jsp"
/
>
<
%@
include
file=
"templates/header-body.jsp"
%
>
<!-- content -->
<div
class=
"col-md-6 col-md-offset-3"
>
...
...
@@ -253,14 +253,14 @@
<!-- / content -->
<
jsp:include
page=
"/vistas/templates/footer-body.jsp"
/
>
<
%@
include
file=
"templates/footer-body.jsp"
%
>
<!--js de la pagina-->
<script
src=
"https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"
type=
"text/javascript
"
></script>
<script
src=
"https://cdn.datatables.net/1.10.16/js/dataTables.bootstrap.min.js"
type=
"text/javascript
"
></script>
<script
src=
"
${pageContext.request.contextPath}
/js/lib/bootstrap-select/bootstrap-select.min.js"
type=
"text/javascript"
></script>
<script
src=
"${pageContext.request.contextPath}/plantilla/assets/js/plugins/pickers/daterangepicker.js"
type=
"text/javascript
"
></script>
<script
src=
"${pageContext.request.contextPath}/plantilla/assets/js/core/libraries/jquery_ui/widgets.min.js"
type=
"text/javascript
"
></script>
<script
src=
"
${pageContext.request.contextPath}
/js/pages/controlAsistenciaDocentes.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
src=
"https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js
"
></script>
<script
type=
"text/javascript"
src=
"https://cdn.datatables.net/1.10.16/js/dataTables.bootstrap.min.js
"
></script>
<script
src=
"
..
/js/lib/bootstrap-select/bootstrap-select.min.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/pickers/daterangepicker.js
"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/core/libraries/jquery_ui/widgets.min.js
"
></script>
<script
src=
"
..
/js/pages/controlAsistenciaDocentes.js"
type=
"text/javascript"
></script>
<!--js-->
</body>
</html>
\ No newline at end of file
src/main/webapp/vistas/
policias/
controlAsistenciaPolicias.jsp
→
src/main/webapp/vistas/controlAsistenciaPolicias.jsp
View file @
e219a7f8
<
jsp:include
page=
"/vistas/templates/validar.jsp"
/
>
<
%@
include
file=
"templates/validar.jsp"
%
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<
jsp:include
page=
"/vistas/templates/header.jsp"
/
>
<
%@
include
file=
"templates/header.jsp"
%
>
<!--template-core-->
<!--css de la pagina-->
<!--css-->
</head>
<body>
<
jsp:include
page=
"/vistas/templates/header-body.jsp"
/
>
<
%@
include
file=
"templates/header-body.jsp"
%
>
<!-- content -->
<div
class=
"col-md-6 col-md-offset-3"
>
<div
class=
"panel panel-primary"
>
...
...
@@ -372,16 +372,16 @@
<!-- / content -->
<
jsp:include
page=
"/vistas/templates/footer-body.jsp"
/
>
<
%@
include
file=
"templates/footer-body.jsp"
%
>
<!--js de la pagina-->
<script
src=
"https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"
type=
"text/javascript
"
></script>
<script
src=
"https://cdn.datatables.net/1.10.16/js/dataTables.bootstrap.min.js"
type=
"text/javascript
"
></script>
<script
src=
"
${pageContext.request.contextPath}
/js/lib/bootstrap-select/bootstrap-select.min.js"
type=
"text/javascript"
></script>
<script
src=
"${pageContext.request.contextPath}/plantilla/assets/js/plugins/pickers/daterangepicker.js"
type=
"text/javascript
"
></script>
<script
src=
"${pageContext.request.contextPath}/plantilla/assets/js/core/libraries/jquery_ui/widgets.min.js"
type=
"text/javascript
"
></script>
<script
src=
"
${pageContext.request.contextPath}
/js/pages/control_asistencia_policias.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
src=
"https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js
"
></script>
<script
type=
"text/javascript"
src=
"https://cdn.datatables.net/1.10.16/js/dataTables.bootstrap.min.js
"
></script>
<script
src=
"
..
/js/lib/bootstrap-select/bootstrap-select.min.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/pickers/daterangepicker.js
"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/core/libraries/jquery_ui/widgets.min.js
"
></script>
<script
src=
"
..
/js/pages/control_asistencia_policias.js"
type=
"text/javascript"
></script>
<!--js-->
</body>
</html>
\ No newline at end of file
src/main/webapp/vistas/
policias/
crearRolPolicia.jsp
→
src/main/webapp/vistas/crearRolPolicia.jsp
View file @
e219a7f8
<
jsp:include
page=
"/vistas/templates/validar.jsp"
/
>
<
%@
include
file=
"templates/validar.jsp"
%
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<
jsp:include
page=
"/vistas/templates/header.jsp"
/
>
<
%@
include
file=
"templates/header.jsp"
%
>
<!--template-core-->
<!--css de la pagina-->
<link
href=
"
${pageContext.request.contextPath}
/plantilla/assets/css/extras/animate.min.css"
rel=
"stylesheet"
type=
"text/css"
>
<link
href=
"
..
/plantilla/assets/css/extras/animate.min.css"
rel=
"stylesheet"
type=
"text/css"
>
<!--css-->
</head>
<body>
<
jsp:include
page=
"/vistas/templates/header-body.jsp"
/
>
<
%@
include
file=
"templates/header-body.jsp"
%
>
<!-- content -->
<div
class=
"col-md-5 col-md-offset-3"
>
<div
class=
"panel panel-primary"
>
...
...
@@ -899,22 +899,22 @@
</div>
<!-- / content -->
<
jsp:include
page=
"/vistas/templates/footer-body.jsp"
/
>
<
%@
include
file=
"templates/footer-body.jsp"
%
>
<!--js de la pagina-->
<script
src=
"${pageContext.request.contextPath}/plantilla/assets/js/core/libraries/jquery_ui/interactions.min.js"
type=
"text/javascript
"
></script>
<script
src=
"${pageContext.request.contextPath}/plantilla/assets/js/core/libraries/jquery_ui/widgets.min.js"
type=
"text/javascript
"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/core/libraries/jquery_ui/interactions.min.js
"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/core/libraries/jquery_ui/widgets.min.js
"
></script>
<script
src=
"
${pageContext.request.contextPath}
/js/lib/bootstrap-select/bootstrap-select.min.js"
type=
"text/javascript"
></script>
<script
src=
"${pageContext.request.contextPath}/plantilla/assets/js/plugins/forms/selects/select2.min.js"
type=
"text/javascript
"
></script>
<script
src=
"
..
/js/lib/bootstrap-select/bootstrap-select.min.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/forms/selects/select2.min.js
"
></script>
<script
src=
"${pageContext.request.contextPath}/plantilla/assets/js/plugins/ui/moment/moment.min.js"
type=
"text/javascript
"
></script>
<script
src=
"${pageContext.request.contextPath}/plantilla/assets/js/plugins/pickers/daterangepicker.js"
type=
"text/javascript
"
></script>
<script
src=
"
${pageContext.request.contextPath}
/js/lib/jquery-ui.multidatespicker.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/ui/moment/moment.min.js
"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/pickers/daterangepicker.js
"
></script>
<script
src=
"
..
/js/lib/jquery-ui.multidatespicker.js"
type=
"text/javascript"
></script>
<script
src=
"${pageContext.request.contextPath}/plantilla/assets/js/plugins/extensions/contextmenu.js"
type=
"text/javascript
"
></script>
<script
src=
"
${pageContext.request.contextPath}
/js/pages/crearRolPolicia.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/extensions/contextmenu.js
"
></script>
<script
src=
"
..
/js/pages/crearRolPolicia.js"
type=
"text/javascript"
></script>
<!--js-->
...
...
src/main/webapp/vistas/error/error.jsp
View file @
e219a7f8
...
...
@@ -6,8 +6,8 @@
<meta
charset=
"utf-8"
>
<title>
Trismegisto Asistencia
</title>
<link
href=
"https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"
rel=
"stylesheet"
/
>
<link
href=
"
${pageContext.request.contextPath}
/css/pages/error.css"
rel=
"stylesheet"
type=
"text/css"
/>
<link
rel=
"stylesheet"
href=
"https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"
>
<link
href=
"
..
/css/pages/error.css"
rel=
"stylesheet"
type=
"text/css"
/>
<style>
@import
"https://fonts.googleapis.com/css?family=Inconsolata"
;
html
{
...
...
@@ -132,7 +132,7 @@
%
>
</p>
<p
class=
"output"
>
Haga click aquí para
<a
href=
"
${pageContext.request.contextPath}
/vistas/index.jsp"
>
volver a la página principal
</a></p>
<p
class=
"output"
>
Haga click aquí para
<a
href=
"
..
/vistas/index.jsp"
>
volver a la página principal
</a></p>
</div>
</body>
...
...
src/main/webapp/vistas/
policias/
horarioPolicias.jsp
→
src/main/webapp/vistas/horarioPolicias.jsp
View file @
e219a7f8
<
jsp:include
page=
"/vistas/templates/validar.jsp"
/
>
<
%@
include
file=
"templates/validar.jsp"
%
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<
jsp:include
page=
"/vistas/templates/header.jsp"
/
>
<
%@
include
file=
"templates/header.jsp"
%
>
<!--template-core-->
<!--css de la pagina-->
<!--css-->
</head>
<body>
<
jsp:include
page=
"/vistas/templates/header-body.jsp"
/
>
<
%@
include
file=
"templates/header-body.jsp"
%
>
<!-- content -->
<!-- / content -->
<
jsp:include
page=
"/vistas/templates/footer-body.jsp"
/
>
<
%@
include
file=
"templates/footer-body.jsp"
%
>
<!--js de la pagina-->
<!--js-->
...
...
src/main/webapp/vistas/index.jsp
View file @
e219a7f8
<jsp:include
page=
"templates/validar.jsp"
/>
<
%
response
.
setHeader
("
Cache-Control
",
"
no-cache
");
//
Forces
caches
to
obtain
a
new
copy
of
the
page
from
the
origin
server
response
.
setHeader
("
Cache-Control
",
"
no-store
");
//
Directs
caches
not
to
store
the
page
under
any
circumstance
response
.
setDateHeader
("
Expires
",
0
);
//
Causes
the
proxy
cache
to
see
the
page
as
"
stale
"
response
.
setHeader
("
Pragma
",
"
no-cache
");
//
HTTP
1
.
0
backward
compatibility
if
(
session
.
getAttribute
("
usuario
")
!=
null
)
{
response
.
sendRedirect
("
main
.
jsp
");
}
%
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
...
...
@@ -83,28 +92,28 @@
<script>
((
window
)
=>
{
window
.
history
.
replaceState
({},
''
,
'index.jsp'
);
window
.
history
.
replaceState
(
{}
,
''
,
'index.jsp'
);
})(
window
);
</script>
<!--javascript template-->
<!-- Core JS files -->
<script
src=
"../plantilla/assets/js/plugins/loaders/pace.min.js"
type=
"text/javascript
"
></script>
<script
src=
"../plantilla/assets/js/core/libraries/jquery.min.js"
type=
"text/javascript
"
></script>
<script
src=
"../plantilla/assets/js/core/libraries/bootstrap.min.js"
type=
"text/javascript
"
></script>
<script
src=
"../plantilla/assets/js/plugins/forms/validation/validate.min.js"
type=
"text/javascript
"
></script>
<script
src=
"../js/lib/jquery-validation-config.js"
type=
"text/javascript
"
></script>
<script
src=
"../plantilla/assets/js/plugins/notifications/sweet_alert.min.js"
type=
"text/javascript
"
></script>
<script
src=
"../js/general.js"
type=
"text/javascript
"
></script>
<script
src=
"../plantilla/assets/js/plugins/loaders/blockui.min.js"
type=
"text/javascript
"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/loaders/pace.min.js
"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/core/libraries/jquery.min.js
"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/core/libraries/bootstrap.min.js
"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/forms/validation/validate.min.js
"
></script>
<script
type=
"text/javascript"
src=
"../js/lib/jquery-validation-config.js
"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/notifications/sweet_alert.min.js
"
></script>
<script
type=
"text/javascript"
src=
"../js/general.js
"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/loaders/blockui.min.js
"
></script>
<!-- /core JS files -->
<!-- Theme JS files -->
<script
src=
"../plantilla/assets/js/plugins/forms/styling/uniform.min.js"
type=
"text/javascript
"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/forms/styling/uniform.min.js
"
></script>
<script
src=
"../plantilla/assets/js/core/app.js"
type=
"text/javascript
"
></script>
<script
src=
"../plantilla/assets/js/pages/login.js"
type=
"text/javascript
"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/core/app.js
"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/pages/login.js
"
></script>
<!-- /theme JS files -->
<!--javascript template-->
<script
src=
"../js/lib/cookies.js"
type=
"text/javascript"
></script>
...
...
src/main/webapp/vistas/main.jsp
View file @
e219a7f8
<
jsp:include
page=
"/vistas/templates/validar.jsp"
/
>
<
%@
include
file=
"templates/validar.jsp"
%
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<
jsp:include
page=
"/vistas/templates/header.jsp"
/
>
<
%@
include
file=
"templates/header.jsp"
%
>
<!--template-core-->
<!--css-->
...
...
@@ -11,22 +11,24 @@
</head>
<body>
<
jsp:include
page=
"/vistas/templates/header-body.jsp"
/
>
<
%@
include
file=
"templates/header-body.jsp"
%
>
<!-- content -->
<!-- / content -->
<jsp:include
page=
"/vistas/templates/footer-body.jsp"
/>
<
%@
include
file=
"templates/footer-body.jsp"
%
>
<!--js-->
<script
src=
"${pageContext.request.contextPath}/plantilla/assets/js/plugins/forms/selects/bootstrap_select.min.js"
type=
"text/javascript
"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/forms/selects/bootstrap_select.min.js
"
></script>
<script
src=
"${pageContext.request.contextPath}/plantilla/assets/js/pages/form_bootstrap_select.js"
type=
"text/javascript
"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/pages/form_bootstrap_select.js
"
></script>
<script>
((
window
)
=>
{
window
.
history
.
replaceState
({},
''
,
contextPath
+
'vistas/
main.jsp'
);
window
.
history
.
replaceState
({},
''
,
'
main.jsp'
);
})(
window
);
</script>
</body>
...
...
src/main/webapp/vistas/
policias/
mantenimientoSede.jsp
→
src/main/webapp/vistas/mantenimientoSede.jsp
View file @
e219a7f8
<
jsp:include
page=
"/vistas/templates/validar.jsp"
/
>
<
%@
include
file=
"templates/validar.jsp"
%
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<
jsp:include
page=
"/vistas/templates/header.jsp"
/
>
<
%@
include
file=
"templates/header.jsp"
%
>
<!--template-core-->
<!--css de la pagina-->
<!--css-->
</head>
<body>
<
jsp:include
page=
"/vistas/templates/header-body.jsp"
/
>
<
%@
include
file=
"templates/header-body.jsp"
%
>
<!-- content -->
<div
class=
"col-md-4 col-md-offset-4"
>
...
...
@@ -172,7 +172,7 @@
<!-- / content -->
<
jsp:include
page=
"/vistas/templates/footer-body.jsp"
/
>
<
%@
include
file=
"templates/footer-body.jsp"
%
>
<!--js de la pagina-->
<!--js-->
...
...
src/main/webapp/vistas/
policias/
montoPolicias.jsp
→
src/main/webapp/vistas/montoPolicias.jsp
View file @
e219a7f8
<
jsp:include
page=
"/vistas/templates/validar.jsp"
/
>
<
%@
include
file=
"templates/validar.jsp"
%
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<
jsp:include
page=
"/vistas/templates/header.jsp"
/
>
<
%@
include
file=
"templates/header.jsp"
%
>
<!--template-core-->
<!--css de la pagina-->
<!--css-->
</head>
<body>
<
jsp:include
page=
"/vistas/templates/header-body.jsp"
/
>
<
%@
include
file=
"templates/header-body.jsp"
%
>
<!-- content -->
<div
class=
"col-md-4 col-md-offset-4"
>
<div
class=
"panel panel-primary"
>
...
...
@@ -307,10 +307,10 @@
<!-- / content -->
<
jsp:include
page=
"/vistas/templates/footer-body.jsp"
/
>
<
%@
include
file=
"templates/footer-body.jsp"
%
>
<!--js de la pagina-->
<script
src=
"
${pageContext.request.contextPath}
/plantilla/assets/js/plugins/tables/datatables/datatables.min.js"
type=
"text/javascript"
></script>
<script
src=
"${pageContext.request.contextPath}/plantilla/assets/js/plugins/forms/styling/switch.min.js"
type=
"text/javascript
"
></script>
<script
src=
"
..
/plantilla/assets/js/plugins/tables/datatables/datatables.min.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/forms/styling/switch.min.js
"
></script>
<script>
$
(
".styled, .multiselect-container input"
).
uniform
({
radioClass
:
'choice'
...
...
src/main/webapp/vistas/p
olicias/p
royectarAsistenciaPolicias.jsp
→
src/main/webapp/vistas/proyectarAsistenciaPolicias.jsp
View file @
e219a7f8
<
jsp:include
page=
"/vistas/templates/validar.jsp"
/
>
<
%@
include
file=
"templates/validar.jsp"
%
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<
jsp:include
page=
"/vistas/templates/header.jsp"
/
>
<
%@
include
file=
"templates/header.jsp"
%
>
<!--template-core-->
<!--css de la pagina-->
<!--css-->
</head>
<body>
<
jsp:include
page=
"/vistas/templates/header-body.jsp"
/
>
<
%@
include
file=
"templates/header-body.jsp"
%
>
<!-- content -->
<div
class=
"col-md-6 col-md-offset-3"
>
<div
class=
"panel panel-primary"
>
...
...
@@ -95,17 +95,17 @@
<!-- / content -->
<
jsp:include
page=
"/vistas/templates/footer-body.jsp"
/
>
<
%@
include
file=
"templates/footer-body.jsp"
%
>
<!--js de la pagina-->
<script
src=
"
${pageContext.request.contextPath}
/plantilla/assets/js/plugins/ui/moment/moment.min.js"
type=
"text/javascript"
></script>
<script
src=
"${pageContext.request.contextPath}/plantilla/assets/js/plugins/pickers/daterangepicker.js"
type=
"text/javascript
"
></script>
<script
src=
"${pageContext.request.contextPath}/plantilla/assets/js/core/libraries/jquery_ui/widgets.min.js"
type=
"text/javascript"
></script>
<script
src=
"
${pageContext.request.contextPath}
/plantilla/assets/js/plugins/tables/datatables/datatables.min.js"
type=
"text/javascript"
></script>
<script
src=
"
${pageContext.request.contextPath}
/js/lib/dataTables.rowsGroup.js"
type=
"text/javascript"
></script>
<script
src=
"${pageContext.request.contextPath}/plantilla/assets/js/plugins/tables/handsontable/handsontable.min.js"
type=
"text/javascript"
></script>
<script
src=
"
${pageContext.request.contextPath}
/js/lib/jquery.inputmask.bundle.min.js"
type=
"text/javascript"
></script>
<script
src=
"
${pageContext.request.contextPath}
/js/pages/proyectar_asistencia_policias.js"
type=
"text/javascript"
></script>
<script
src=
"
..
/plantilla/assets/js/plugins/ui/moment/moment.min.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/pickers/daterangepicker.js
"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/core/libraries/jquery_ui/widgets.min.js"
></script>
<script
src=
"
..
/plantilla/assets/js/plugins/tables/datatables/datatables.min.js"
type=
"text/javascript"
></script>
<script
src=
"
..
/js/lib/dataTables.rowsGroup.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/tables/handsontable/handsontable.min.js"
></script>
<script
src=
"
..
/js/lib/jquery.inputmask.bundle.min.js"
type=
"text/javascript"
></script>
<script
src=
"
..
/js/pages/proyectar_asistencia_policias.js"
type=
"text/javascript"
></script>
<!--js-->
</body>
...
...
src/main/webapp/vistas/registrarhorario.jsp
deleted
100644 → 0
View file @
cde77307
<jsp:include
page=
"/vistas/templates/validar.jsp"
/>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<jsp:include
page=
"/vistas/templates/header.jsp"
/>
<!--template-core-->
<!--css de la pagina-->
<!--css-->
</head>
<body>
<jsp:include
page=
"/vistas/templates/header-body.jsp"
/>
<!-- content -->
<!-- / content -->
<jsp:include
page=
"/vistas/templates/footer-body.jsp"
/>
<!--js de la pagina-->
<!--<script src="${pageContext.request.contextPath}/plantilla/assets/js/plugins/tables/datatables/datatables.min.js" type="text/javascript"></script>-->
<!--js-->
</body>
</html>
\ No newline at end of file
src/main/webapp/vistas/templates/footer-body.jsp
View file @
e219a7f8
...
...
@@ -15,22 +15,21 @@
<!-- /page content -->
</div>
<!-- /page container -->
<!-- Core JS files -->
<script
src="${pageContext.request.contextPath}/plantilla/assets/js/plugins/loaders/pace.min.js" type="text/javascript
"></script>
<script
src="${pageContext.request.contextPath}/plantilla/assets/js/core/libraries/jquery.min.js" type="text/javascript"
></script>
<script src="
${pageContext.request.contextPath}
/js/lib/jquery.cookie.js" type="text/javascript"></script>
<script
src="${pageContext.request.contextPath}/plantilla/assets/js/core/libraries/bootstrap.min.js" type="text/javascript"
></script>
<script
src="${pageContext.request.contextPath}/plantilla/assets/js/plugins/loaders/blockui.min.js" type="text/javascript"
></script>
<script
src="${pageContext.request.contextPath}/plantilla/assets/js/plugins/forms/styling/switchery.min.js" type="text/javascript
"></script>
<script
src="${pageContext.request.contextPath}/plantilla/assets/js/plugins/forms/styling/uniform.min.js" type="text/javascript
"></script>
<script
type="text/javascript" src="../plantilla/assets/js/plugins/loaders/pace.min.js
"></script>
<script
type="text/javascript" src="../plantilla/assets/js/core/libraries/jquery.min.js"
></script>
<script src="
..
/js/lib/jquery.cookie.js" type="text/javascript"></script>
<script
type="text/javascript" src="../plantilla/assets/js/core/libraries/bootstrap.min.js"
></script>
<script
type="text/javascript" src="../plantilla/assets/js/plugins/loaders/blockui.min.js"
></script>
<script
type="text/javascript" src="../plantilla/assets/js/plugins/forms/styling/switchery.min.js
"></script>
<script
type="text/javascript" src="../plantilla/assets/js/plugins/forms/styling/uniform.min.js
"></script>
<!--<script type="text/javascript" src="../plantilla/assets/js/plugins/forms/selects/bootstrap_multiselect.js"></script>-->
<script
src="${pageContext.request.contextPath}/plantilla/assets/js/core/app.js" type="text/javascript
"></script>
<script
type="text/javascript" src="../plantilla/assets/js/core/app.js
"></script>
<!-- /core JS files -->
<!-- /Generales -->
<script src="${pageContext.request.contextPath}/js/general.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/pages/navbar.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/pages/sidebar.js" type="text/javascript"></script>
\ No newline at end of file
<script src="../js/general.js" type="text/javascript"></script>
<script src="../js/pages/navbar.js" type="text/javascript"></script>
<script src="../js/pages/sidebar.js" type="text/javascript"></script>
\ No newline at end of file
src/main/webapp/vistas/templates/header-body.jsp
View file @
e219a7f8
<jsp:include page="navbar.jsp" />
<%@include file="navbar.jsp" %>
<!-- Page container -->
<div class="page-container">
...
...
@@ -6,7 +7,8 @@
<!-- Page content -->
<div class="page-content">
<jsp:include page="sidebar.jsp" />
<%@include file="sidebar.jsp" %>
<!-- Main content -->
<div class="content-wrapper">
...
...
src/main/webapp/vistas/templates/header.jsp
View file @
e219a7f8
...
...
@@ -4,23 +4,20 @@
<title>Trismegisto Asistencia</title>
<!-- Global stylesheets -->
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/plantilla/assets/css/icons/icomoon/styles.css" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/plantilla/assets/css/icons/fontawesome/styles.min.css" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/plantilla/assets/css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/plantilla/assets/css/core.css" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/plantilla/assets/css/components.css" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/plantilla/assets/css/colors.css" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/css/general.css" rel="stylesheet" type="text/css"/>
<!--<link href="${pageContext.request.contextPath}/num/num.css" rel="stylesheet" type="text/css"/>-->
<link href="../plantilla/assets/css/icons/icomoon/styles.css" rel="stylesheet" type="text/css">
<link href="../plantilla/assets/css/icons/fontawesome/styles.min.css" rel="stylesheet" type="text/css">
<link href="../plantilla/assets/css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="../plantilla/assets/css/core.css" rel="stylesheet" type="text/css">
<link href="../plantilla/assets/css/components.css" rel="stylesheet" type="text/css">
<link href="../plantilla/assets/css/colors.css" rel="stylesheet" type="text/css">
<link href="../css/general.css" rel="stylesheet" type="text/css"/>
<!-- /global stylesheets -->
<script src="
${pageContext.request.contextPath}
/js/lib/cookies.js" type="text/javascript"></script>
<script src="
..
/js/lib/cookies.js" type="text/javascript"></script>
<!--<script src="../js/pages/validate.js" type="text/javascript"></script>-->
<script>
var sidebar
= <%=(String)
request.getSession().getAttribute("menu")%>;
var sidebar
= <%=(String)
request.getSession().getAttribute("menu")%>;
var nombreUsuario
= "<%=(String)
request.getSession().getAttribute("nombre")%>";
var nombreUsuario
= "<%=(String)
request.getSession().getAttribute("nombre")%>";
var rolesUsuario = "<%=(String) request.getSession().getAttribute("roles")%>";
var contextPath = "${pageContext.request.contextPath}/";
var rolesUsuario = "<%=(String)request.getSession().getAttribute("roles")%>";
</script>
\ No newline at end of file
src/main/webapp/vistas/templates/navbar.jsp
View file @
e219a7f8
<!-- Main navbar -->
<div class="navbar navbar-default header-highlight">
<div class="navbar-header">
<a class="navbar-brand" href="
${pageContext.request.contextPath}/vistas/main.jsp"><img src="${pageContext.request.contextPath}
/plantilla/assets/images/logo_light.png" alt=""></a>
<a class="navbar-brand" href="
../vistas/main.jsp"><img src="..
/plantilla/assets/images/logo_light.png" alt=""></a>
<ul class="nav navbar-nav visible-xs-block">
<li><a data-toggle="collapse" data-target="#navbar-mobile"><i class="icon-tree5"></i></a></li>
...
...
@@ -17,7 +17,7 @@
<ul class="nav navbar-nav navbar-right">
<li class="dropdown language-switch">
<a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<img src="
${pageContext.request.contextPath}/plantilla/
assets/images/flags/gb.png" class="position-left " alt="">
<img src="assets/images/flags/gb.png" class="position-left " alt="">
Sistemas
<span class="caret"></span>
</a>
...
...
src/main/webapp/vistas/templates/sidebar.jsp
View file @
e219a7f8
...
...
@@ -5,7 +5,7 @@
<!-- User menu -->
<div class="sidebar-user">
<div class="category-content tp-sidebar-category-content">
<a href="
${pageContext.request.contextPath}/
main.jsp" class="media-left" style="padding-right: 0px;">
<a href="main.jsp" class="media-left" style="padding-right: 0px;">
<!--box-shadow: 0px 0px 13px 0px rgba(0,0,0,0.75);-->
<img alt="Avatar usuario" class="avatar" style=" border-radius: 50%; border:2px solid white;">
</a>
...
...
src/main/webapp/vistas/templates/validar.jsp
View file @
e219a7f8
...
...
@@ -6,6 +6,6 @@
System.out.println("Validando...");
if (session.getAttribute("usuario") == null) {
response.sendRedirect(
request.getContextPath() + "/vistas/
main.jsp");
response.sendRedirect(
"
main.jsp");
}
%>
\ No newline at end of file
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