Commit 332fecdd by sistem02 user

[ADD] cambios en seguridad mostrando activos e inactivos

parent c0c776aa
/dist/
\ No newline at end of file
.asterisk{
color: #FF2E3E;
font-weight: bold;
color: #FF2E3E;
font-weight: bold;
}
/* Error */
input.error{
border: 1px solid #f00
border: 1px solid #f00
}
select.error{
border: 1px solid #f00
border: 1px solid #f00
}
.error {
color: #e5603b;
color: #e5603b;
}
textArea.error{
border: 1px solid #f00
border: 1px solid #f00
}
span .error{
border: 1px solid #f00
border: 1px solid #f00
}
/* Color bootbox */
.modal-bg-blue{
background-color: #2D72AD;
color: #fff;
background-color: #2D72AD;
color: #fff;
}
.modal-bg-success {
color: #fff;
background-color: #6BC53B;
color: #fff;
background-color: #6BC53B;
}
.modal-bg-primary{
color: #fff;
background-color: #2196F3;
color: #fff;
background-color: #2196F3;
}
.modal-bg-warning{
color: #fff;
background-color: #FFBD2B;
color: #fff;
background-color: #FFBD2B;
}
.modal-bg-danger{
color: #fff;
background-color: #F44336;
color: #fff;
background-color: #F44336;
}
.dialogExtraSmall > .modal-dialog {
width: 325px !important;
height: 170px !important;
margin-left: auto;
margin-right: auto;
width: 325px !important;
height: 170px !important;
margin-left: auto;
margin-right: auto;
}
.col-centered{
float: none;
margin: 0 auto;
float: none;
margin: 0 auto;
}
.password{
font-family: password;
font-size: 16px;
font-family: password;
font-size: 16px;
}
textarea {
resize: none;
resize: none;
}
label {
font-size: small;
font-size: small;
}
.so-input-login:focus{
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}
.so-input-login:hover{
box-shadow: 0 15px 25px rgba(0,0,0,0.22), 0 6px 6px rgba(0,0,0,0.23);
box-shadow: 0 15px 25px rgba(0,0,0,0.22), 0 6px 6px rgba(0,0,0,0.23);
}
.card-1 {
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}
.card-2 {
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}
.card-3 {
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}
.card-4 {
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}
.card-5 {
box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);
box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);
}
.cards:hover {
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}
@media screen and (max-width: 769px){
.button-plus{
padding-top: 11px;
}
.button-plus{
padding-top: 11px;
}
}
#txtBusqProductos::-webkit-search-cancel-button{
position:relative;
padding: 2px;
position:relative;
padding: 2px;
}
@media (min-width: 768px){
.sidebar{
width: 200px;
}
.sidebar{
width: 200px;
}
.navbar-header {
min-width: 200px;
}
.navbar-brand {
padding-left: 10px;
padding-right: 10px;
}
.navbar-header {
min-width: 200px;
}
.navbar-brand {
padding-left: 10px;
padding-right: 10px;
}
.navbar-brand > img {
margin-top: -9px;
height: 36px;
}
.navbar-brand > img {
margin-top: -9px;
height: 36px;
}
}
.tp-sidebar-category-content {
display: flex;
flex-direction: column;
text-align: center;
/* background: url(../img/bgLogin2.jpg) no-repeat center; */
background-size: cover;
/*box-shadow: inset 0px 0px 13px 0px rgba(0,0,0,0.85);*/
display: flex;
flex-direction: column;
text-align: center;
/* background: url(../img/bgLogin2.jpg) no-repeat center; */
background-size: cover;
/*box-shadow: inset 0px 0px 13px 0px rgba(0,0,0,0.85);*/
}
.row {
padding-left: 0px;
padding-right: 0px;
padding-left: 0px;
padding-right: 0px;
}
.datatable-scroll{
border-top: 1px solid #bbbbbb9c;
border-bottom: 0px;
border-top: 1px solid #bbbbbb9c;
border-bottom: 0px;
}
.panel-heading .visible-elements {
margin: 7px -15px -10px -15px;
margin: 7px -15px -10px -15px;
}
.dataTables_paginate {
margin: 5px 0 5px 0;
margin: 5px 0 5px 0;
}
.dataTables_info {
float: left;
padding: 13px 0;
margin-bottom: 0px;
float: left;
padding: 13px 0;
margin-bottom: 0px;
}
.tp-animation-button{
transform: scale(1);
transition: all ease-in-out 0.15s;
transform: scale(1);
transition: all ease-in-out 0.15s;
}
.tp-animation-button:hover{
transform: scale(1.04)
transform: scale(1.04)
}
.tp-animation-button:active{
transform: scale(0.96);
transform: scale(0.96);
}
.table-xxs > thead > tr > th, .table-xxs > tbody > tr > th, .table-xxs > tfoot > tr > th, .table-xxs > thead > tr > td, .table-xxs > tbody > tr > td, .table-xxs > tfoot > tr > td {
padding: 3px 15px;
padding: 3px 15px;
}
.table{
width: 100% !important;
width: 100% !important;
}
.morecontent span {
display: none;
display: none;
}
.morelink {
display: inline;
display: inline;
}
a.disabled {
pointer-events: none;
cursor: not-allowed;
pointer-events: none;
cursor: not-allowed;
}
.navigation > li ul li a{
padding: 8px 52px;
min-height: 36px;
padding: 8px 52px;
min-height: 36px;
}
.navigation > li > a{
padding: 8px 20px 8px 16px;
min-height: 36px;
padding: 8px 20px 8px 16px;
min-height: 36px;
}
.navigation .navigation-header{
padding: 10px 16px;
padding: 10px 16px;
}
/* ACTIVE LINK */
.navigation > li > ul li:first-child{
padding-top: 0;
padding-top: 0;
}
/* ACTIVE LINK */
.navigation > li > ul li:last-child{
padding-bottom: 0;
padding-bottom: 0;
}
@media (min-width: 769px){
.sidebar-xs .header-highlight .navbar-header .navbar-brand {
padding-left: 0;
padding-right: 0;
/*background: url(../img/av.png) no-repeat center center;*/
background-position-x: 45%;
background-size: 40px;
float: none;
display: block;
}
.sidebar-xs .header-highlight .navbar-header .navbar-brand {
padding-left: 0;
padding-right: 0;
/*background: url(../img/av.png) no-repeat center center;*/
background-position-x: 45%;
background-size: 40px;
float: none;
display: block;
}
}
.ffooter {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 1000;
padding: 10px 20px;
background: white;
border-top: 1px solid #e7eaec;
margin-left: 200px;
}
.ffooter-xl{
margin-left: 56px;
}
@media (max-width:768px) {
.ffooter {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 1000;
padding: 10px 20px;
padding: 8px 10px;
background: white;
border-top: 1px solid #e7eaec;
margin-left: 200px;
}
.ffooter-xl{
margin-left: 56px;
}
@media (max-width:768px) {
.ffooter {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 1000;
padding: 8px 10px;
background: white;
border-top: 1px solid #e7eaec;
margin-left: 0px;
font-size: 11px;
text-align: center;
}
margin-left: 0px;
font-size: 11px;
text-align: center;
}
}
.table-sm > thead > tr > th, .table-sm > tbody > tr > th, .table-sm > tfoot > tr > th, .table-sm > thead > tr > td, .table-sm > tbody > tr > td, .table-sm > tfoot > tr > td {
padding: 4px 20px;
padding: 4px 20px;
}
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
padding: 4px 20px;
padding: 4px 20px;
}
.modal-body {
position: relative;
padding: 20px
position: relative;
padding: 20px
}
.panel {
margin-bottom: 0px !important;
margin-bottom: 0px !important;
}
.row {
margin-left: 0px;
margin-left: 0px;
}
table.display tbody tr:hover td {
background-color: #AAB7D1 !important;
background-color: #AAB7D1 !important;
}
.modulo {
padding-left: 120px;
padding-left: 120px;
}
.categoria{
padding-left: 240px;
padding-left: 240px;
}
.subcategoria{
padding-left: 360px;
padding-left: 360px;
}
.modal-header[class*=bg-] {
padding: 10px 15px;
padding: 10px 15px;
}
.frm {
margin-bottom: 15px;
margin-bottom: 15px;
}
.tooltip.top .tooltip-inner{
max-width:310px;
padding:3px 8px;
text-align:center;
/*background-color:#333;*/
-webkit-border-radius:5px;
-moz-border-radius:5px;
border-radius:5px;
max-width:310px;
padding:3px 8px;
text-align:center;
/*background-color:#333;*/
-webkit-border-radius:5px;
-moz-border-radius:5px;
border-radius:5px;
}
.glyphicon {
font-size: 13px;
}
[class^="icon-"], [class*=" icon-"] {
font-size: 14px;
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
<context-root>/moduloSeguridad</context-root>
<class-loader delegate="true"/>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java code.</description>
</property>
</jsp-config>
</glassfish-web-app>
......@@ -379,9 +379,9 @@
}
function validCaracForm() {
new Input({el: '#editarUrl', param: 'text'}).validate();
new Input({el: '#editarNombre', param: 'text'}).validate();
new Input({el: '#editarIcono', param: 'text'}).validate();
// new Input({el: '#editarUrl', param: 'text'}).validate();
// new Input({el: '#editarNombre', param: 'text'}).validate();
// s Input({el: '#editarIcono', param: 'text'}).validate();
}
function validarFormulario(jerarquia) {
......@@ -684,7 +684,7 @@
validarInput();
validarFormulario(apunta);
submitKey('formCrearMenu', '.buttonOk');
soloLetras('editarUrl');
// soloLetras('editarUrl');
if (tipo === 1) {
rellenarFormulario(datos, apunta);
}
......
......@@ -7,91 +7,94 @@
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
<%@include file="templates/header.jsp" %>
<!--template-core-->
<head>
<%@include file="templates/header.jsp" %>
<!--template-core-->
<!--css-->
<link href="../css/general.css" rel="stylesheet" type="text/css"/>
<!--css-->
</head>
<body onload="segundaCarga();">
<%@include file="templates/header-body.jsp" %>
<!-- content -->
<div class="row animated fadeIn">
<div class="col-sm-12 col-md-12 col-lg-4 col-centered">
<div class="panel panel-primary card-3" style="margin-top: 30px">
<div class="panel-heading" style="padding: 8px 15px">
<h6 class="panel-title" style="font-size: 15px; font-family: inherit"><i class="icon icon-search4"></i>&nbsp; Búsqueda de Proyectos</h6>
<div class="heading-elements">
<ul class="icons-list">
<li><a data-action="collapse"></a></li>
</ul>
</div>
</div>
<div class="panel-body" id="panelSearch">
<form id="formProyecto" onsubmit="return false" autocomplete="off">
<div class="row">
<div class='col-md-12' id="div-busq-tipo">
<div class="form-group">
<label>
Proyecto:
</label>
<span class="asterisk">(*)</span>
<input type="text" id="txtProyecto" name="txtBusqueda" class="form-control" value="" placeholder="INGRESE NOMBRE DEL PROYECTO" style="text-transform:uppercase;">
</div>
</div>
</div>
</form>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<div class="text-right">
<span class="text-danger">(*) </span> Campo obligatorio
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="text-right">
<button class="btn bg-primary border-primary-600 btn-xs" type="button" id="btnBuscar"><i class="fa fa-search"></i> Buscar</button>
<button class="btn bg-orange border-orange-600 btn-xs" type="button" id="btnLimpiar"><i class="fa fa-refresh"></i> Limpiar</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-8 col-centered">
<div class="panel panel-primary card-3" style="margin-top: 30px">
<div class="panel-heading" style="padding: 8px 15px">
<h6 class="panel-title" style="font-size: 15px; font-family: inherit"><i class="fa fa-list"></i>&nbsp; Listado de Proyectos</h6>
<div class="heading-elements">
<button type="button" id="btnNuevoProyecto" class="btn bg-slate border-slate-600 btn-xs"><i class="glyphicon glyphicon-plus"></i>&nbsp; Nuevo Proyecto</button>
</div>
</div>
<div class="table-responsive">
<table class="table dataTable table-striped table-hover table-sm table-bordered display" id="tblProyecto">
<thead>
<tr>
<th class="text-center"></th>
<th class="text-center">NOMBRE</th>
<th class="text-center" >URL</th>
<th class="text-center">ESTADO</th>
<th class="text-center">ACCIONES</th>
</tr>
</thead>
</table>
</div>
<!--css-->
<link href="../css/general.css" rel="stylesheet" type="text/css"/>
<!--css-->
</head>
<body onload="segundaCarga();">
<%@include file="templates/header-body.jsp" %>
<!-- content -->
<div class="row animated fadeIn">
<div class="col-sm-12 col-md-12 col-lg-4 col-centered">
<div class="panel panel-primary card-3" style="margin-top: 30px">
<div class="panel-heading" style="padding: 8px 15px">
<h6 class="panel-title" style="font-size: 15px; font-family: inherit"><i class="icon icon-search4"></i>&nbsp; Búsqueda de Proyectos</h6>
<div class="heading-elements">
<div class="checkbox checkbox-switchery">
<label>
<input type="checkbox" id="cbkEstado">
MOSTRAR INACTIVOS
</label>
</div>
</div>
</div>
<div class="panel-body" id="panelSearch">
<form id="formProyecto" onsubmit="return false" autocomplete="off">
<div class="row">
<div class='col-md-12' id="div-busq-tipo">
<div class="form-group">
<label>
Proyecto:
</label>
<span class="asterisk">(*)</span>
<input type="text" id="txtProyecto" name="txtBusqueda" class="form-control" value="" placeholder="INGRESE NOMBRE DEL PROYECTO" style="text-transform:uppercase;">
</div>
</div>
</div>
</form>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<div class="text-right">
<span class="text-danger">(*) </span> Campo obligatorio
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="text-right">
<button class="btn bg-primary border-primary-600 btn-xs" type="button" id="btnBuscar"><i class="fa fa-search"></i> Buscar</button>
<button class="btn bg-orange border-orange-600 btn-xs" type="button" id="btnLimpiar"><i class="fa fa-refresh"></i> Limpiar</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-10 col-centered">
<div class="panel panel-primary card-3" style="margin-top: 30px">
<div class="panel-heading" style="padding: 8px 15px">
<h6 class="panel-title" style="font-size: 15px; font-family: inherit"><i class="fa fa-list"></i>&nbsp; Listado de Proyectos</h6>
<div class="heading-elements">
<button type="button" id="btnNuevoProyecto" class="btn bg-slate border-slate-600 btn-xs"><i class="glyphicon glyphicon-plus"></i>&nbsp; Nuevo Proyecto</button>
</div>
</div>
<div class="table-responsive">
<table class="table dataTable table-striped table-hover table-sm table-bordered display" id="tblProyecto">
<thead>
<tr>
<th class="text-center">CÓDIGO</th>
<th class="text-center">NOMBRE</th>
<th class="text-center" >URL</th>
<th class="text-center">ESTADO</th>
<th class="text-center">ACCIONES</th>
</tr>
</thead>
</table>
</div>
</div>
<!-- / content -->
<%@include file="templates/footer-body.jsp" %>
<!--js-->
<script src="../js/pages/proyecto.js" type="text/javascript"></script>
<!--js-->
</body>
</div>
</div>
<!-- / content -->
<%@include file="templates/footer-body.jsp" %>
<!--js-->
<script src="../js/pages/proyecto.js" type="text/javascript"></script>
<!--js-->
</body>
</html>
......@@ -64,7 +64,7 @@
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-5 col-centered">
<div class="col-sm-12 col-md-12 col-lg-9 col-centered">
<div class="panel panel-primary card-3" style="margin-top: 30px">
<div class="panel-heading" style="padding: 8px 15px">
<h6 class="panel-title" style="font-size: 15px; font-family: inherit"><i class="fa fa-list"></i>&nbsp; Listado de Tipos de Usuario</h6>
......
<!-- Footer -->
<div class="ffooter">
<label id="footerDate" style="margin-bottom: 0px">&copy; </label><a href="#">&nbsp; MDULO DE SEGURIDAD</a> POR <a href="#">REA SISTEMAS TIC</a>
<label id="footerDate" style="margin-bottom: 0px">&copy; </label><a href="#">&nbsp; MDULO DE SEGURIDAD</a> POR <a href="#">REA SISTEMAS TIC</a>
</div>
<!-- /footer -->
......@@ -22,8 +22,9 @@
<script type="text/javascript" src="../assets/js/core/libraries/bootstrap.min.js"></script>
<script type="text/javascript" src="../assets/js/plugins/loaders/blockui.min.js"></script>
<script type="text/javascript" src="../assets/js/plugins/forms/styling/switchery.min.js"></script>
<script src="../assets/js/plugins/forms/styling/uniform.min.js" type="text/javascript"></script>
<script type="text/javascript" src="../assets/js/plugins/forms/styling/switchery.min.js"></script>
<script src="../assets/js/plugins/forms/styling/switch.min.js" type="text/javascript"></script>
<script type="text/javascript" src="../assets/js/core/app.js"></script>
<script type="text/javascript" src="../assets/js/bootbox.min.js"></script>
<script src="../assets/js/plugins/tables/datatables/datatables.min.js" type="text/javascript"></script>
......@@ -31,6 +32,7 @@
<script src="../assets/js/validate_inputs.js" type="text/javascript"></script>
<script src="../js/lib/validateAlfi.js" type="text/javascript"></script>
<script src="../assets/js/fontawesome-iconpicker.js" type="text/javascript"></script>
<script src="../assets/js/plugins/forms/selects/select2.min.js" type="text/javascript"></script>
<!--<script src="../assets/js/fontawesome-iconpicker.min.js" type="text/javascript"></script>-->
<!-- /core JS files -->
<!-- /Generales -->
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
<system systemId="http://app9.sacooliveros.edu.pe:8080/PlanillaWS/TipoDocumentoService?WSDL" uri="src/conf/xml-resources/web-service-references/TipoDocumentoService/wsdl/app9.sacooliveros.edu.pe_8080/PlanillaWS/TipoDocumentoService.wsdl"/>
<system systemId="http://app9.sacooliveros.edu.pe:8080/PlanillaWS/TipoDocumentoService?xsd=1" uri="src/conf/xml-resources/web-service-references/TipoDocumentoService/wsdl/app9.sacooliveros.edu.pe_8080/PlanillaWS/TipoDocumentoService.xsd_1.xsd"/>
<system systemId="http://app9.sacooliveros.edu.pe:8080/PlanillaWS/PersonalService?WSDL" uri="src/conf/xml-resources/web-service-references/PersonalService/wsdl/app9.sacooliveros.edu.pe_8080/PlanillaWS/PersonalService.wsdl"/>
<system systemId="http://app9.sacooliveros.edu.pe:8080/PlanillaWS/PersonalService?xsd=1" uri="src/conf/xml-resources/web-service-references/PersonalService/wsdl/app9.sacooliveros.edu.pe_8080/PlanillaWS/PersonalService.xsd_1.xsd"/>
<system systemId="http://app9.sacooliveros.edu.pe:8080/PlanillaWS/TipoDocumentoService?WSDL" uri="src/conf/xml-resources/web-service-references/TipoDocumentoService/wsdl/app9.sacooliveros.edu.pe_8080/PlanillaWS/TipoDocumentoService.wsdl"/>
<system systemId="http://app9.sacooliveros.edu.pe:8080/PlanillaWS/TipoDocumentoService?xsd=1" uri="src/conf/xml-resources/web-service-references/TipoDocumentoService/wsdl/app9.sacooliveros.edu.pe_8080/PlanillaWS/TipoDocumentoService.xsd_1.xsd"/>
</catalog>
\ No newline at end of file
No preview for this file type
......@@ -998,16 +998,16 @@ exists or setup the property manually. For example like this:
</target>
<target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
<target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
<copyfiles files="${file.reference.json-20171018.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
<copyfiles files="${file.reference.sqljdbc42.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
<copyfiles files="${file.reference.commons-codec-1.10.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
<copyfiles files="${file.reference.json-20160212.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
<mkdir dir="${build.web.dir}/META-INF"/>
<manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
</target>
<target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
<copyfiles files="${file.reference.json-20171018.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.sqljdbc42.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.commons-codec-1.10.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.json-20160212.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
</target>
<target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
<delete dir="${build.web.dir}/WEB-INF/lib"/>
......@@ -1418,32 +1418,32 @@ exists or setup the property manually. For example like this:
<target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
<!--
CLEANUP SECTION
-->
<target depends="init" name="deps-clean" unless="no.deps"/>
<target depends="init" name="do-clean">
<condition property="build.dir.to.clean" value="${build.web.dir}">
<isset property="dist.ear.dir"/>
</condition>
<property name="build.dir.to.clean" value="${build.web.dir}"/>
<delete includeEmptyDirs="true" quiet="true">
<fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
</delete>
<delete dir="${build.dir}"/>
<available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
<delete dir="${dist.dir}"/>
</target>
<target depends="do-clean" if="status.clean-failed" name="check-clean">
<echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
<echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
</target>
<target depends="init" if="netbeans.home" name="undeploy-clean">
<nbundeploy failOnError="false" startServer="false"/>
</target>
<target name="-post-clean">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
<target depends="clean" description="Clean build products." name="clean-ear"/>
CLEANUP SECTION
-->
<target depends="init" name="deps-clean" unless="no.deps"/>
<target depends="init" name="do-clean">
<condition property="build.dir.to.clean" value="${build.web.dir}">
<isset property="dist.ear.dir"/>
</condition>
<property name="build.dir.to.clean" value="${build.web.dir}"/>
<delete includeEmptyDirs="true" quiet="true">
<fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
</delete>
<delete dir="${build.dir}"/>
<available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
<delete dir="${dist.dir}"/>
</target>
<target depends="do-clean" if="status.clean-failed" name="check-clean">
<echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
<echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
</target>
<target depends="init" if="netbeans.home" name="undeploy-clean">
<nbundeploy failOnError="false" startServer="false"/>
</target>
<target name="-post-clean">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
<target depends="clean" description="Clean build products." name="clean-ear"/>
</project>
build.xml.data.CRC32=7d0c3fff
build.xml.data.CRC32=e2509847
build.xml.script.CRC32=c7931e0f
build.xml.stylesheet.CRC32=651128d4@1.77.1.1
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=7d0c3fff
nbproject/build-impl.xml.script.CRC32=fae72e77
nbproject/build-impl.xml.data.CRC32=e2509847
nbproject/build-impl.xml.script.CRC32=a2a0b985
nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.77.1.1
nbproject/jaxws-build.xml.stylesheet.CRC32=6608c2cf
deploy.ant.properties.file=C:\\Users\\sistem17user\\AppData\\Roaming\\NetBeans\\8.2\\config\\GlassFishEE6\\Properties\\gfv3-399171337.properties
deploy.ant.properties.file=C:\\Users\\sistem02user\\AppData\\Roaming\\NetBeans\\8.2\\config\\GlassFishEE6\\Properties\\gfv3258829979.properties
file.reference.commons-codec-1.10.jar=D:\\LIBRERIAS\\commons-codec-1.10.jar
file.reference.json-20171018.jar=D:\\LIBRERIAS\\json-20171018.jar
file.reference.json-20171018.jar=D:\\LIBRERIAS\\json-20160810.jar
file.reference.sqljdbc42.jar=D:\\LIBRERIAS\\sqljdbc42.jar
j2ee.platform.is.jsr109=true
j2ee.server.domain=C:/Users/sistem17user/AppData/Roaming/NetBeans/8.2/config/GF_4.1.1/domain1
j2ee.server.domain=C:/Users/sistem02user/AppData/Roaming/NetBeans/8.2/config/GF_4.1.1/domain1
j2ee.server.home=C:/Program Files/glassfish-4.1.1/glassfish
j2ee.server.instance=[C:\\Program Files\\glassfish-4.1.1\\glassfish;C:\\Program Files\\glassfish-4.1.1\\glassfish\\domains\\domain1]deployer:gfv3ee6wc:localhost:4848
j2ee.server.middleware=C:/Program Files/glassfish-4.1.1
javac.debug=true
javadoc.preview=true
selected.browser=Chrome.INTEGRATED
user.properties.file=C:\\Users\\sistem17user\\AppData\\Roaming\\NetBeans\\8.2\\build.properties
selected.browser=Chrome
user.properties.file=C:\\Users\\sistem02user\\AppData\\Roaming\\NetBeans\\8.2\\build.properties
......@@ -28,6 +28,7 @@ dist.war=${dist.dir}/${war.name}
endorsed.classpath=\
${libs.javaee-endorsed-api-7.0.classpath}
excludes=
file.reference.json-20160212.jar=D:\\LIBRERIAS\\json-20160212.jar
includes=**
j2ee.compile.on.save=true
j2ee.copy.static.files.on.save=true
......@@ -44,7 +45,8 @@ jar.compress=false
javac.classpath=\
${file.reference.json-20171018.jar}:\
${file.reference.sqljdbc42.jar}:\
${file.reference.commons-codec-1.10.jar}
${file.reference.commons-codec-1.10.jar}:\
${file.reference.json-20160212.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.debug=true
......
......@@ -23,6 +23,10 @@
<file>${file.reference.commons-codec-1.10.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library dirs="200">
<file>${file.reference.json-20160212.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
</web-module-libraries>
<web-module-additional-libraries/>
<source-roots>
......
......@@ -14,37 +14,39 @@ import org.json.JSONObject;
*/
public interface ProyectoDAO {
public JSONObject listarProyecto(String datos, int vstart, int vlength, String draw) throws Exception;
public JSONObject listarProyecto(JSONObject datos, int vstart, int vlength, String draw) throws Exception;
public int editarProyecto(int codigo, String nombre, String url) throws Exception;
public int editarProyecto(int codigo, String nombre, String url) throws Exception;
public int crearProyecto(String nombre, String url) throws Exception;
public int crearProyecto(String nombre, String url) throws Exception;
public int activarProyecto(int codigo) throws Exception;
public int activarProyecto(int codigo) throws Exception;
public int desactivarProyecto(int codigo) throws Exception;
public int desactivarProyecto(int codigo) throws Exception;
public JSONObject asignarDetalle(int proyecto, int tipoUsuario) throws Exception;
public JSONObject asignarDetalle(int proyecto, int tipoUsuario) throws Exception;
public JSONObject listarDetalle(String filtro, int vstart, int vlength, String draw) throws Exception;
public JSONObject listarDetalle(String filtro, int vstart, int vlength, String draw) throws Exception;
public int activarDetalle(int codigo) throws Exception;
public int activarDetalle(int codigo) throws Exception;
public int desactivarDetalle(int codigo) throws Exception;
public int desactivarDetalle(int codigo) throws Exception;
public JSONArray listarTipoUsuario(int proyecto) throws Exception;
public JSONArray listarTipoUsuario(int proyecto) throws Exception;
public int eliminarDetalle(int codigoDetalle) throws Exception;
public int eliminarDetalle(int codigoDetalle) throws Exception;
public int validarProyecto(int codigo) throws Exception;
public JSONArray validarProyecto(int codigo) throws Exception;
public int validarNombreProyecto(String nombreNuevo, String nombreActual, int tipo) throws Exception;
public int validarNombreProyecto(String nombreNuevo, String nombreActual, int tipo) throws Exception;
public int validarUrlProyecto(String urlNuevo, String urlActual, int tipo) throws Exception;
public int validarUrlProyecto(String urlNuevo, String urlActual, int tipo) throws Exception;
public int validarDetalle(int codigo) throws Exception;
public int validarDetalle(int codigo) throws Exception;
public int validarMenuDetalle(int codigo) throws Exception;
public int validarMenuDetalle(int codigo) throws Exception;
public int eliminarMenuDetalle(int codigo) throws Exception;
public int eliminarMenuDetalle(int codigo) throws Exception;
public int desactivarUsuarioDetalle(int codigo) throws Exception;
}
......@@ -14,39 +14,41 @@ import org.json.JSONObject;
*/
public interface UsuarioDAO {
public JSONArray listarUsuario(JSONObject datos, int vstart, int vlength) throws Exception;
public JSONArray listarUsuario(JSONObject datos, int vstart, int vlength) throws Exception;
public int cantidadRegistros(JSONObject datos) throws Exception;
public int cantidadRegistros(JSONObject datos) throws Exception;
public int editarUsuario(int codigo, String usuario, String clave) throws Exception;
public int editarUsuario(int codigo, String usuario, String clave) throws Exception;
public int activarUsuario(int codigo) throws Exception;
public int activarUsuario(int codigo) throws Exception;
public int desactivarUsuario(int codigo) throws Exception;
public int desactivarUsuario(int codigo) throws Exception;
public int crearUsuario(String codigoTrabajador, String usuario, String clave) throws Exception;
public int crearUsuario(String codigoTrabajador, String usuario, String clave) throws Exception;
public int validarUsuario(String codigoTrabajador) throws Exception;
public int validarUsuario(String codigoTrabajador) throws Exception;
public int eliminarUsuario(int codigo) throws Exception;
public int eliminarUsuario(int codigo) throws Exception;
public JSONObject listarUsuarioDetalle(String filtro, int vstart, int vlength, String draw) throws Exception;
public JSONObject listarUsuarioDetalle(String filtro, int vstart, int vlength, String draw) throws Exception;
public int eliminarUsuarioDetalle(int codigo) throws Exception;
public int eliminarUsuarioDetalle(int codigo) throws Exception;
public int activarUsuarioDetalle(int codigo) throws Exception;
public int activarUsuarioDetalle(int codigo) throws Exception;
public int desactivarUsuarioDetalle(int codigo) throws Exception;
public int desactivarUsuarioDetalle(int codigo) throws Exception;
public int asignarProyectoUsuario(int usuario, int proyectoDetalle) throws Exception;
public int asignarProyectoUsuario(int usuario, int proyectoDetalle) throws Exception;
public JSONArray listarProyecto() throws Exception;
public JSONArray listarProyecto() throws Exception;
public JSONArray listarTipoDeUsuario(int proyecto, int usuario) throws Exception;
public JSONArray listarTipoDeUsuario(int proyecto, int usuario) throws Exception;
public int validarUsuarioDependencia(int codigo) throws Exception;
public int validarUsuarioDependencia(int codigo) throws Exception;
public int validarNombreUsuario(String nombre) throws Exception;
public int validarNombreUsuario(String nombre) throws Exception;
public int validarAsignacion(int codigo) throws Exception;
public int validarAsignacion(int codigo) throws Exception;
public JSONObject listarUsuarioManual(JSONObject datos) throws Exception;
}
......@@ -19,7 +19,7 @@ public class ProyectoService {
DAOFactory fabrica = DAOFactory.getDAOFactory(DAOFactory.SQLSERVER);
ProyectoDAO dao = fabrica.getProyectoDAO();
public JSONObject listarProyecto(String filtro, int vstart, int vlength, String draw) {
public JSONObject listarProyecto(JSONObject filtro, int vstart, int vlength, String draw) {
JSONObject obj = null;
try {
obj = dao.listarProyecto(filtro, vstart, vlength, draw);
......@@ -129,8 +129,8 @@ public class ProyectoService {
return rs;
}
public int validarProyecto(int codigo) {
int rs = 0;
public JSONArray validarProyecto(int codigo) {
JSONArray rs = null;
try {
rs = dao.validarProyecto(codigo);
} catch (Exception e) {
......@@ -189,4 +189,14 @@ public class ProyectoService {
return rs;
}
public int desactivarUsuarioDetalle(int codigo) {
int rs = 0;
try {
rs = dao.desactivarUsuarioDetalle(codigo);
} catch (Exception e) {
e.printStackTrace();
}
return rs;
}
}
......@@ -198,4 +198,14 @@ public class UsuarioService {
}
return rs;
}
public JSONObject listarUsuarioManual(JSONObject datos) {
JSONObject obj = null;
try {
obj = dao.listarUsuarioManual(datos);
} catch (Exception e) {
e.printStackTrace();
}
return obj;
}
}
......@@ -77,6 +77,9 @@ public class ProyectoServlet extends HttpServlet {
case "eliminarMenuDetalle":
eliminarMenuDetalle(request, response);
break;
case "desactivarUsuarioDetalle":
desactivarUsuarioDetalle(request, response);
break;
default:
break;
}
......@@ -86,11 +89,12 @@ public class ProyectoServlet extends HttpServlet {
response.setContentType("application/json");
PrintWriter out = response.getWriter();
ProyectoService service = new ProyectoService();
String filtro = request.getParameter("filtro");
String jsonString = request.getParameter("json");
System.out.println("CADENA JSON " + jsonString);
String draw = request.getParameter("draw");
int vstart = Integer.parseInt(request.getParameter("start"));
int vlength = Integer.parseInt(request.getParameter("length"));
JSONObject json = service.listarProyecto(filtro, vstart, vlength, draw);
JSONObject json = service.listarProyecto(new JSONObject(jsonString), vstart, vlength, draw);
out.println(json);
}
......@@ -196,7 +200,7 @@ public class ProyectoServlet extends HttpServlet {
PrintWriter out = response.getWriter();
ProyectoService service = new ProyectoService();
int proyecto = Integer.parseInt(request.getParameter("codigo"));
int rs = service.validarProyecto(proyecto);
JSONArray rs = service.validarProyecto(proyecto);
out.println(rs);
}
......@@ -249,4 +253,13 @@ public class ProyectoServlet extends HttpServlet {
out.println(rs);
}
private void desactivarUsuarioDetalle(HttpServletRequest request, HttpServletResponse response) throws IOException {
response.setContentType("application/json");
PrintWriter out = response.getWriter();
ProyectoService service = new ProyectoService();
int codigo = Integer.parseInt(request.getParameter("codigo"));
int rs = service.desactivarUsuarioDetalle(codigo);
out.println(rs);
}
}
......@@ -7,6 +7,7 @@ package moduloSeguridad.servlets;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
......@@ -96,6 +97,12 @@ public class UsuarioServlet extends HttpServlet {
case "validarAsignacion":
validarAsignacion(request, response);
break;
case "listarUsuarioManual":
listarUsuarioManual(request, response);
break;
case "listarCargosDeUsuario":
listarCargosDeUsuario(request, response);
break;
default:
break;
}
......@@ -116,27 +123,17 @@ public class UsuarioServlet extends HttpServlet {
for (int i = 0; i < json.length(); i++) {
JSONObject objeto = new JSONObject();
JSONObject obj = json.getJSONObject(i);
int codigoUsuario = obj.getInt("codigoUsuario");
int numeral = obj.getInt("numeral");
String codigoTrabajador = obj.getString("codigoTrabajador");
String usuario = obj.getString("usuario");
int estadoUsuario = obj.getInt("estadoUsuario");
JSONObject prs = new JSONObject(listarPersonalPorCodigo(codigoTrabajador));
String nombreSede = prs.getString("nomSed");
String nombreArea = prs.getString("nomAre");
String nombreCargo = prs.getString("nomCar");
String nombrePer = prs.getString("nomPer");
String nombreApeMat = prs.getString("apeMatPer");
String nombreApePat = prs.getString("apePatPer");
objeto.put("codigoUsuario", codigoUsuario);
objeto.put("numeral", numeral);
objeto.put("usuario", usuario);
objeto.put("estadoUsuario", estadoUsuario);
objeto.put("nombreArea", nombreArea);
objeto.put("nombreCargo", nombreCargo);
objeto.put("nombreUsuario", nombrePer + " " + nombreApePat + " " + nombreApeMat);
objeto.put("nombreSede", nombreSede);
objeto.put("codigoUsuario", obj.getInt("codigoUsuario"));
objeto.put("numeral", obj.getInt("numeral"));
objeto.put("usuario", obj.getString("usuario"));
objeto.put("estadoUsuario", obj.getInt("estadoUsuario"));
objeto.put("nombreArea", prs.getString("nomAre"));
objeto.put("nombreCargo", prs.getString("nomCar"));
objeto.put("nombreUsuario", prs.getString("nomPer") + " " + prs.getString("apePatPer") + " " + prs.getString("apeMatPer"));
objeto.put("nombreSede", prs.getString("nomSed"));
lista.put(objeto);
}
......@@ -258,8 +255,18 @@ public class UsuarioServlet extends HttpServlet {
response.setContentType("application/json");
PrintWriter out = response.getWriter();
UsuarioService srv = new UsuarioService();
int codigo = Integer.parseInt(request.getParameter("codigo"));
int rs = srv.activarUsuarioDetalle(codigo);
int rs = 0;
boolean array = Boolean.parseBoolean(request.getParameter("array"));
if (array) {
JSONArray lista = new JSONArray(request.getParameter("lista"));
for (int i = 0; i < lista.length(); i++) {
int codigo = lista.getInt(i);
rs += srv.activarUsuarioDetalle(codigo);
}
} else {
int codigo = Integer.parseInt(request.getParameter("codigo"));
rs = srv.activarUsuarioDetalle(codigo);
}
out.println(rs);
}
......@@ -348,4 +355,63 @@ public class UsuarioServlet extends HttpServlet {
return port.listarPersonalPorCodigo(tipoDocumento);
}
private void listarUsuarioManual(HttpServletRequest request, HttpServletResponse response) throws IOException {
response.setContentType("application/json");
PrintWriter out = response.getWriter();
String jsonString = request.getParameter("json");
JSONObject jsonObject = new JSONObject(jsonString);
String busqueda = jsonObject.getString("busqueda");
int tipo = jsonObject.getInt("tipo");
UsuarioService srv = new UsuarioService();
JSONObject json = srv.listarUsuarioManual(jsonObject);
JSONArray listaFinal = new JSONArray();
JSONArray lista = json.getJSONArray("results");
for (int i = 0; i < lista.length(); i++) {
JSONObject _final = new JSONObject();
JSONObject obj = lista.getJSONObject(i);
String codigoTrabajador = obj.getString("codigoTrabajador");
JSONObject prs = new JSONObject(listarPersonalPorCodigo(codigoTrabajador));
String nombreCompleto = prs.getString("nomPer") + " " + prs.getString("apePatPer") + " " + prs.getString("apeMatPer");
String cargo = prs.getString("nomCar");
if (tipo == 4 && (nombreCompleto.toUpperCase()).contains(busqueda.toUpperCase())) {
_final.put("codigoUsuario", obj.getInt("codigoUsuario"));
_final.put("numeral", obj.getInt("numeral"));
_final.put("usuario", obj.getString("usuario"));
_final.put("estadoUsuario", obj.getInt("estadoUsuario"));
_final.put("nombreArea", prs.getString("nomAre"));
_final.put("nombreCargo", prs.getString("nomCar"));
_final.put("nombreUsuario", prs.getString("nomPer") + " " + prs.getString("apePatPer") + " " + prs.getString("apeMatPer"));
_final.put("nombreSede", prs.getString("nomSed"));
listaFinal.put(_final);
} else if (tipo == 5 && (cargo.toUpperCase()).equals(busqueda.toUpperCase())) {
_final.put("codigoUsuario", obj.getInt("codigoUsuario"));
_final.put("numeral", obj.getInt("numeral"));
_final.put("usuario", obj.getString("usuario"));
_final.put("estadoUsuario", obj.getInt("estadoUsuario"));
_final.put("nombreArea", prs.getString("nomAre"));
_final.put("nombreCargo", prs.getString("nomCar"));
_final.put("nombreUsuario", prs.getString("nomPer") + " " + prs.getString("apePatPer") + " " + prs.getString("apeMatPer"));
_final.put("nombreSede", prs.getString("nomSed"));
listaFinal.put(_final);
}
}
out.println(listaFinal);
}
private void listarCargosDeUsuario(HttpServletRequest request, HttpServletResponse response) throws IOException {
response.setContentType("application/json");
PrintWriter out = response.getWriter();
UsuarioService srv = new UsuarioService();
JSONObject json = srv.listarUsuarioManual(new JSONObject());
ArrayList<String> cargos = new ArrayList<>();
JSONArray lista = json.getJSONArray("results");
for (int i = 0; i < lista.length(); i++) {
JSONObject obj = lista.getJSONObject(i);
JSONObject prs = new JSONObject(listarPersonalPorCodigo(obj.getString("codigoTrabajador")));
if (!cargos.contains(prs.getString("nomCar"))) {
cargos.add(prs.getString("nomCar"));
}
}
out.print(new JSONArray(cargos));
}
}
......@@ -9,6 +9,8 @@ import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import moduloSeguridad.dao.UsuarioDAO;
import moduloSeguridad.utilities.GeneralVariables;
import moduloSeguridad.utilities.ResponseHelper;
import org.json.JSONArray;
import org.json.JSONObject;
......@@ -42,6 +44,11 @@ public class UsuarioSqlServerDAO implements UsuarioDAO {
busqueda01 = "";
break;
}
if (!datos.getBoolean("estado")) {
busqueda01 += " and a.est = 1 ";
} else {
busqueda01 += " and a.est = 0 ";
}
query = " SELECT a.cod_usuario, a.cod_trabajador, a.usu, a.est FROM usuario AS a "
+ " LEFT JOIN usuario_detalle AS ud ON ud.cod_usuario = a.cod_usuario "
+ " LEFT JOIN proyecto_detalle AS pd ON pd.cod_proyecto_detalle = ud.cod_proyecto_detalle "
......@@ -64,7 +71,6 @@ public class UsuarioSqlServerDAO implements UsuarioDAO {
lista.put(obj);
conta++;
}
System.out.println("cantidad ---> " + lista.length());
} catch (Exception e) {
e.printStackTrace();
} finally {
......@@ -98,6 +104,11 @@ public class UsuarioSqlServerDAO implements UsuarioDAO {
busqueda = "";
break;
}
if (!datos.getBoolean("estado")) {
busqueda += " and a.est = 1 ";
} else {
busqueda += " and a.est = 0 ";
}
query = " SELECT COUNT(*) as cant FROM usuario AS a "
+ " LEFT JOIN usuario_detalle AS ud ON ud.cod_usuario = a.cod_usuario "
+ " LEFT JOIN proyecto_detalle AS pd ON pd.cod_proyecto_detalle = ud.cod_proyecto_detalle "
......@@ -174,18 +185,26 @@ public class UsuarioSqlServerDAO implements UsuarioDAO {
String query = "";
try {
query = " update usuario "
+ " set est = 0,"
+ " set est = 0 "
+ " where cod_usuario = " + codigo + "";
con = SqlServerDAOFactory.getConnectionSQL(base);
pst = con.prepareStatement(query);
rs = pst.executeUpdate();
if (rs == 1) {
query = " update usuario_detalle "
+ " set est = 0 "
+ " where cod_usuario = " + codigo;
}
con = SqlServerDAOFactory.getConnectionSQL(base);
pst = con.prepareStatement(query);
rs = pst.executeUpdate();
} catch (Exception e) {
e.printStackTrace();
} finally {
con.close();
pst.close();
}
return rs;
return 1;
}
@Override
......@@ -293,7 +312,7 @@ public class UsuarioSqlServerDAO implements UsuarioDAO {
int cantRegistro = 0;
String query2 = " select count(*) as cant "
+ " from usuario_detalle "
+ " where cod_usuario = " + filtro + "";
+ " where cod_usuario = " + filtro;
PreparedStatement pst2 = null;
ResultSet rs2 = null;
pst2 = con.prepareStatement(query2);
......@@ -451,7 +470,8 @@ public class UsuarioSqlServerDAO implements UsuarioDAO {
+ " ud.cod_proyecto_detalle "
+ " FROM "
+ " usuario_detalle AS ud "
+ " WHERE ud.cod_usuario = " + usuario + " "
+ " WHERE ud.cod_usuario = " + usuario + ""
+ " AND ud.est = 1 "
+ " ) ";
} else {
valid = "";
......@@ -466,6 +486,7 @@ public class UsuarioSqlServerDAO implements UsuarioDAO {
+ "WHERE "
+ " cod_proyecto = " + proyecto + " "
+ valid;
System.out.println("LISTADO TIPO USUARIO ---> " + query);
con = SqlServerDAOFactory.getConnectionSQL(base);
pst = con.prepareStatement(query);
rs = pst.executeQuery();
......@@ -545,7 +566,7 @@ public class UsuarioSqlServerDAO implements UsuarioDAO {
try {
query = " select count(*) as cant from auditoria "
+ " where cod_usuario_detalle = " + codigo + "";
con = SqlServerDAOFactory.getConnectionSQL(base);
con = SqlServerDAOFactory.getConnectionSQL(GeneralVariables.nameDB);
pst = con.prepareStatement(query);
rs = pst.executeQuery();
rs.next();
......@@ -558,4 +579,64 @@ public class UsuarioSqlServerDAO implements UsuarioDAO {
}
return cant;
}
@Override
public JSONObject listarUsuarioManual(JSONObject datos) throws Exception {
JSONObject jreturn;
JSONArray lista = new JSONArray();
JSONObject data = new JSONObject();
Connection con = null;
PreparedStatement pst = null;
ResultSet rSet = null;
int rs = 0;
String sql = "";
String condicion = "";
ResponseHelper response = new ResponseHelper();
try {
if (datos.has("estado")) {
if (datos.getBoolean("estado")) {
condicion = " where a.est = 0";
} else {
condicion = " where a.est = 1";
}
}
con = SqlServerDAOFactory.getConnectionSQL(GeneralVariables.nameDB);
sql = " SELECT a.cod_usuario, a.cod_trabajador, a.usu, a.est FROM usuario as a" + condicion;
pst = con.prepareStatement(sql);
rSet = pst.executeQuery();
int conta = 1;
while (rSet.next()) {
JSONObject obj = new JSONObject();
obj.put("numeral", conta++);
obj.put("codigoUsuario", rSet.getInt(1));
obj.put("codigoTrabajador", rSet.getString(2));
obj.put("usuario", rSet.getString(3));
obj.put("estadoUsuario", rSet.getInt(4));
lista.put(obj);
}
response.setResults(lista);
response.setStatus(true);
} catch (Exception e) {
e.printStackTrace();
response.setStatus(false);
response.setMessage("Error --->" + e.getMessage());
} finally {
try {
if (rSet != null) {
rSet.close();
}
if (pst != null) {
pst.close();
}
if (con != null) {
con.close();
}
} catch (Exception e) {
e.printStackTrace();
response.setStatus(false);
response.setMessage("Error --->" + e.getMessage());
}
}
return new JSONObject(response);
}
}
......@@ -11,6 +11,6 @@ package moduloSeguridad.utilities;
*/
public class GeneralVariables {
public static final String nameDB = "moodle";
public static final String nameDB = "security";
}
.asterisk{
color: #FF2E3E;
font-weight: bold;
color: #FF2E3E;
font-weight: bold;
}
/* Error */
input.error{
border: 1px solid #f00
border: 1px solid #f00
}
select.error{
border: 1px solid #f00
border: 1px solid #f00
}
.error {
color: #e5603b;
color: #e5603b;
}
textArea.error{
border: 1px solid #f00
border: 1px solid #f00
}
span .error{
border: 1px solid #f00
border: 1px solid #f00
}
/* Color bootbox */
.modal-bg-blue{
background-color: #2D72AD;
color: #fff;
background-color: #2D72AD;
color: #fff;
}
.modal-bg-success {
color: #fff;
background-color: #6BC53B;
color: #fff;
background-color: #6BC53B;
}
.modal-bg-primary{
color: #fff;
background-color: #2196F3;
color: #fff;
background-color: #2196F3;
}
.modal-bg-warning{
color: #fff;
background-color: #FFBD2B;
color: #fff;
background-color: #FFBD2B;
}
.modal-bg-danger{
color: #fff;
background-color: #F44336;
color: #fff;
background-color: #F44336;
}
.dialogExtraSmall > .modal-dialog {
width: 325px !important;
height: 170px !important;
margin-left: auto;
margin-right: auto;
width: 325px !important;
height: 170px !important;
margin-left: auto;
margin-right: auto;
}
.col-centered{
float: none;
margin: 0 auto;
float: none;
margin: 0 auto;
}
.password{
font-family: password;
font-size: 16px;
font-family: password;
font-size: 16px;
}
textarea {
resize: none;
resize: none;
}
label {
font-size: small;
font-size: small;
}
.so-input-login:focus{
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}
.so-input-login:hover{
box-shadow: 0 15px 25px rgba(0,0,0,0.22), 0 6px 6px rgba(0,0,0,0.23);
box-shadow: 0 15px 25px rgba(0,0,0,0.22), 0 6px 6px rgba(0,0,0,0.23);
}
.card-1 {
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}
.card-2 {
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}
.card-3 {
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}
.card-4 {
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}
.card-5 {
box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);
box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);
}
.cards:hover {
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}
@media screen and (max-width: 769px){
.button-plus{
padding-top: 11px;
}
.button-plus{
padding-top: 11px;
}
}
#txtBusqProductos::-webkit-search-cancel-button{
position:relative;
padding: 2px;
position:relative;
padding: 2px;
}
@media (min-width: 768px){
.sidebar{
width: 200px;
}
.sidebar{
width: 200px;
}
.navbar-header {
min-width: 200px;
}
.navbar-brand {
padding-left: 10px;
padding-right: 10px;
}
.navbar-header {
min-width: 200px;
}
.navbar-brand {
padding-left: 10px;
padding-right: 10px;
}
.navbar-brand > img {
margin-top: -9px;
height: 36px;
}
.navbar-brand > img {
margin-top: -9px;
height: 36px;
}
}
.tp-sidebar-category-content {
display: flex;
flex-direction: column;
text-align: center;
/* background: url(../img/bgLogin2.jpg) no-repeat center; */
background-size: cover;
/*box-shadow: inset 0px 0px 13px 0px rgba(0,0,0,0.85);*/
display: flex;
flex-direction: column;
text-align: center;
/* background: url(../img/bgLogin2.jpg) no-repeat center; */
background-size: cover;
/*box-shadow: inset 0px 0px 13px 0px rgba(0,0,0,0.85);*/
}
.row {
padding-left: 0px;
padding-right: 0px;
padding-left: 0px;
padding-right: 0px;
}
.datatable-scroll{
border-top: 1px solid #bbbbbb9c;
border-bottom: 0px;
border-top: 1px solid #bbbbbb9c;
border-bottom: 0px;
}
.panel-heading .visible-elements {
margin: 7px -15px -10px -15px;
margin: 7px -15px -10px -15px;
}
.dataTables_paginate {
margin: 5px 0 5px 0;
margin: 5px 0 5px 0;
}
.dataTables_info {
float: left;
padding: 13px 0;
margin-bottom: 0px;
float: left;
padding: 13px 0;
margin-bottom: 0px;
}
.tp-animation-button{
transform: scale(1);
transition: all ease-in-out 0.15s;
transform: scale(1);
transition: all ease-in-out 0.15s;
}
.tp-animation-button:hover{
transform: scale(1.04)
transform: scale(1.04)
}
.tp-animation-button:active{
transform: scale(0.96);
transform: scale(0.96);
}
.table-xxs > thead > tr > th, .table-xxs > tbody > tr > th, .table-xxs > tfoot > tr > th, .table-xxs > thead > tr > td, .table-xxs > tbody > tr > td, .table-xxs > tfoot > tr > td {
padding: 3px 15px;
padding: 3px 15px;
}
.table{
width: 100% !important;
width: 100% !important;
}
.morecontent span {
display: none;
display: none;
}
.morelink {
display: inline;
display: inline;
}
a.disabled {
pointer-events: none;
cursor: not-allowed;
pointer-events: none;
cursor: not-allowed;
}
.navigation > li ul li a{
padding: 8px 52px;
min-height: 36px;
padding: 8px 52px;
min-height: 36px;
}
.navigation > li > a{
padding: 8px 20px 8px 16px;
min-height: 36px;
padding: 8px 20px 8px 16px;
min-height: 36px;
}
.navigation .navigation-header{
padding: 10px 16px;
padding: 10px 16px;
}
/* ACTIVE LINK */
.navigation > li > ul li:first-child{
padding-top: 0;
padding-top: 0;
}
/* ACTIVE LINK */
.navigation > li > ul li:last-child{
padding-bottom: 0;
padding-bottom: 0;
}
@media (min-width: 769px){
.sidebar-xs .header-highlight .navbar-header .navbar-brand {
padding-left: 0;
padding-right: 0;
/*background: url(../img/av.png) no-repeat center center;*/
background-position-x: 45%;
background-size: 40px;
float: none;
display: block;
}
.sidebar-xs .header-highlight .navbar-header .navbar-brand {
padding-left: 0;
padding-right: 0;
/*background: url(../img/av.png) no-repeat center center;*/
background-position-x: 45%;
background-size: 40px;
float: none;
display: block;
}
}
.ffooter {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 1000;
padding: 10px 20px;
background: white;
border-top: 1px solid #e7eaec;
margin-left: 200px;
}
.ffooter-xl{
margin-left: 56px;
}
@media (max-width:768px) {
.ffooter {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 1000;
padding: 10px 20px;
padding: 8px 10px;
background: white;
border-top: 1px solid #e7eaec;
margin-left: 200px;
}
.ffooter-xl{
margin-left: 56px;
}
@media (max-width:768px) {
.ffooter {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 1000;
padding: 8px 10px;
background: white;
border-top: 1px solid #e7eaec;
margin-left: 0px;
font-size: 11px;
text-align: center;
}
margin-left: 0px;
font-size: 11px;
text-align: center;
}
}
.table-sm > thead > tr > th, .table-sm > tbody > tr > th, .table-sm > tfoot > tr > th, .table-sm > thead > tr > td, .table-sm > tbody > tr > td, .table-sm > tfoot > tr > td {
padding: 4px 20px;
padding: 4px 20px;
}
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
padding: 4px 20px;
padding: 4px 20px;
}
.modal-body {
position: relative;
padding: 20px
position: relative;
padding: 20px
}
.panel {
margin-bottom: 0px !important;
margin-bottom: 0px !important;
}
.row {
margin-left: 0px;
margin-left: 0px;
}
table.display tbody tr:hover td {
background-color: #AAB7D1 !important;
background-color: #AAB7D1 !important;
}
.modulo {
padding-left: 120px;
padding-left: 120px;
}
.categoria{
padding-left: 240px;
padding-left: 240px;
}
.subcategoria{
padding-left: 360px;
padding-left: 360px;
}
.modal-header[class*=bg-] {
padding: 10px 15px;
padding: 10px 15px;
}
.frm {
margin-bottom: 15px;
margin-bottom: 15px;
}
.tooltip.top .tooltip-inner{
max-width:310px;
padding:3px 8px;
text-align:center;
/*background-color:#333;*/
-webkit-border-radius:5px;
-moz-border-radius:5px;
border-radius:5px;
max-width:310px;
padding:3px 8px;
text-align:center;
/*background-color:#333;*/
-webkit-border-radius:5px;
-moz-border-radius:5px;
border-radius:5px;
}
.glyphicon {
font-size: 13px;
}
[class^="icon-"], [class*=" icon-"] {
font-size: 14px;
}
\ No newline at end of file
......@@ -379,9 +379,9 @@
}
function validCaracForm() {
new Input({el: '#editarUrl', param: 'text'}).validate();
new Input({el: '#editarNombre', param: 'text'}).validate();
new Input({el: '#editarIcono', param: 'text'}).validate();
// new Input({el: '#editarUrl', param: 'text'}).validate();
// new Input({el: '#editarNombre', param: 'text'}).validate();
// s Input({el: '#editarIcono', param: 'text'}).validate();
}
function validarFormulario(jerarquia) {
......@@ -684,7 +684,7 @@
validarInput();
validarFormulario(apunta);
submitKey('formCrearMenu', '.buttonOk');
soloLetras('editarUrl');
// soloLetras('editarUrl');
if (tipo === 1) {
rellenarFormulario(datos, apunta);
}
......
......@@ -7,91 +7,94 @@
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
<%@include file="templates/header.jsp" %>
<!--template-core-->
<head>
<%@include file="templates/header.jsp" %>
<!--template-core-->
<!--css-->
<link href="../css/general.css" rel="stylesheet" type="text/css"/>
<!--css-->
</head>
<body onload="segundaCarga();">
<%@include file="templates/header-body.jsp" %>
<!-- content -->
<div class="row animated fadeIn">
<div class="col-sm-12 col-md-12 col-lg-4 col-centered">
<div class="panel panel-primary card-3" style="margin-top: 30px">
<div class="panel-heading" style="padding: 8px 15px">
<h6 class="panel-title" style="font-size: 15px; font-family: inherit"><i class="icon icon-search4"></i>&nbsp; Búsqueda de Proyectos</h6>
<div class="heading-elements">
<ul class="icons-list">
<li><a data-action="collapse"></a></li>
</ul>
</div>
</div>
<div class="panel-body" id="panelSearch">
<form id="formProyecto" onsubmit="return false" autocomplete="off">
<div class="row">
<div class='col-md-12' id="div-busq-tipo">
<div class="form-group">
<label>
Proyecto:
</label>
<span class="asterisk">(*)</span>
<input type="text" id="txtProyecto" name="txtBusqueda" class="form-control" value="" placeholder="INGRESE NOMBRE DEL PROYECTO" style="text-transform:uppercase;">
</div>
</div>
</div>
</form>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<div class="text-right">
<span class="text-danger">(*) </span> Campo obligatorio
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="text-right">
<button class="btn bg-primary border-primary-600 btn-xs" type="button" id="btnBuscar"><i class="fa fa-search"></i> Buscar</button>
<button class="btn bg-orange border-orange-600 btn-xs" type="button" id="btnLimpiar"><i class="fa fa-refresh"></i> Limpiar</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-8 col-centered">
<div class="panel panel-primary card-3" style="margin-top: 30px">
<div class="panel-heading" style="padding: 8px 15px">
<h6 class="panel-title" style="font-size: 15px; font-family: inherit"><i class="fa fa-list"></i>&nbsp; Listado de Proyectos</h6>
<div class="heading-elements">
<button type="button" id="btnNuevoProyecto" class="btn bg-slate border-slate-600 btn-xs"><i class="glyphicon glyphicon-plus"></i>&nbsp; Nuevo Proyecto</button>
</div>
</div>
<div class="table-responsive">
<table class="table dataTable table-striped table-hover table-sm table-bordered display" id="tblProyecto">
<thead>
<tr>
<th class="text-center"></th>
<th class="text-center">NOMBRE</th>
<th class="text-center" >URL</th>
<th class="text-center">ESTADO</th>
<th class="text-center">ACCIONES</th>
</tr>
</thead>
</table>
</div>
<!--css-->
<link href="../css/general.css" rel="stylesheet" type="text/css"/>
<!--css-->
</head>
<body onload="segundaCarga();">
<%@include file="templates/header-body.jsp" %>
<!-- content -->
<div class="row animated fadeIn">
<div class="col-sm-12 col-md-12 col-lg-4 col-centered">
<div class="panel panel-primary card-3" style="margin-top: 30px">
<div class="panel-heading" style="padding: 8px 15px">
<h6 class="panel-title" style="font-size: 15px; font-family: inherit"><i class="icon icon-search4"></i>&nbsp; Búsqueda de Proyectos</h6>
<div class="heading-elements">
<div class="checkbox checkbox-switchery">
<label>
<input type="checkbox" id="cbkEstado">
MOSTRAR INACTIVOS
</label>
</div>
</div>
</div>
<div class="panel-body" id="panelSearch">
<form id="formProyecto" onsubmit="return false" autocomplete="off">
<div class="row">
<div class='col-md-12' id="div-busq-tipo">
<div class="form-group">
<label>
Proyecto:
</label>
<span class="asterisk">(*)</span>
<input type="text" id="txtProyecto" name="txtBusqueda" class="form-control" value="" placeholder="INGRESE NOMBRE DEL PROYECTO" style="text-transform:uppercase;">
</div>
</div>
</div>
</form>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<div class="text-right">
<span class="text-danger">(*) </span> Campo obligatorio
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="text-right">
<button class="btn bg-primary border-primary-600 btn-xs" type="button" id="btnBuscar"><i class="fa fa-search"></i> Buscar</button>
<button class="btn bg-orange border-orange-600 btn-xs" type="button" id="btnLimpiar"><i class="fa fa-refresh"></i> Limpiar</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-10 col-centered">
<div class="panel panel-primary card-3" style="margin-top: 30px">
<div class="panel-heading" style="padding: 8px 15px">
<h6 class="panel-title" style="font-size: 15px; font-family: inherit"><i class="fa fa-list"></i>&nbsp; Listado de Proyectos</h6>
<div class="heading-elements">
<button type="button" id="btnNuevoProyecto" class="btn bg-slate border-slate-600 btn-xs"><i class="glyphicon glyphicon-plus"></i>&nbsp; Nuevo Proyecto</button>
</div>
</div>
<div class="table-responsive">
<table class="table dataTable table-striped table-hover table-sm table-bordered display" id="tblProyecto">
<thead>
<tr>
<th class="text-center">CÓDIGO</th>
<th class="text-center">NOMBRE</th>
<th class="text-center" >URL</th>
<th class="text-center">ESTADO</th>
<th class="text-center">ACCIONES</th>
</tr>
</thead>
</table>
</div>
</div>
<!-- / content -->
<%@include file="templates/footer-body.jsp" %>
<!--js-->
<script src="../js/pages/proyecto.js" type="text/javascript"></script>
<!--js-->
</body>
</div>
</div>
<!-- / content -->
<%@include file="templates/footer-body.jsp" %>
<!--js-->
<script src="../js/pages/proyecto.js" type="text/javascript"></script>
<!--js-->
</body>
</html>
......@@ -64,7 +64,7 @@
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-5 col-centered">
<div class="col-sm-12 col-md-12 col-lg-9 col-centered">
<div class="panel panel-primary card-3" style="margin-top: 30px">
<div class="panel-heading" style="padding: 8px 15px">
<h6 class="panel-title" style="font-size: 15px; font-family: inherit"><i class="fa fa-list"></i>&nbsp; Listado de Tipos de Usuario</h6>
......
<!-- Footer -->
<div class="ffooter">
<label id="footerDate" style="margin-bottom: 0px">&copy; </label><a href="#">&nbsp; MDULO DE SEGURIDAD</a> POR <a href="#">REA SISTEMAS TIC</a>
<label id="footerDate" style="margin-bottom: 0px">&copy; </label><a href="#">&nbsp; MDULO DE SEGURIDAD</a> POR <a href="#">REA SISTEMAS TIC</a>
</div>
<!-- /footer -->
......@@ -22,8 +22,9 @@
<script type="text/javascript" src="../assets/js/core/libraries/bootstrap.min.js"></script>
<script type="text/javascript" src="../assets/js/plugins/loaders/blockui.min.js"></script>
<script type="text/javascript" src="../assets/js/plugins/forms/styling/switchery.min.js"></script>
<script src="../assets/js/plugins/forms/styling/uniform.min.js" type="text/javascript"></script>
<script type="text/javascript" src="../assets/js/plugins/forms/styling/switchery.min.js"></script>
<script src="../assets/js/plugins/forms/styling/switch.min.js" type="text/javascript"></script>
<script type="text/javascript" src="../assets/js/core/app.js"></script>
<script type="text/javascript" src="../assets/js/bootbox.min.js"></script>
<script src="../assets/js/plugins/tables/datatables/datatables.min.js" type="text/javascript"></script>
......@@ -31,6 +32,7 @@
<script src="../assets/js/validate_inputs.js" type="text/javascript"></script>
<script src="../js/lib/validateAlfi.js" type="text/javascript"></script>
<script src="../assets/js/fontawesome-iconpicker.js" type="text/javascript"></script>
<script src="../assets/js/plugins/forms/selects/select2.min.js" type="text/javascript"></script>
<!--<script src="../assets/js/fontawesome-iconpicker.min.js" type="text/javascript"></script>-->
<!-- /core JS files -->
<!-- /Generales -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment