Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
securityRemake
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Juan Guevara Mayta
securityRemake
Commits
b65c7316
Commit
b65c7316
authored
Aug 16, 2023
by
Mauro Paolo Josue Zuñiga Mallqui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[EDIT] CAMBIOS PARA LA EDICION DE MENU Y PERMISOS POR VISTA
parent
60ef6108
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
MantenimientoMenu.js
src/main/webapp/js/pages/MantenimientoMenu.js
+7
-5
mantenimientoMenu.jsp
src/main/webapp/vistas/mantenimientoMenu.jsp
+15
-2
No files found.
src/main/webapp/js/pages/MantenimientoMenu.js
View file @
b65c7316
...
@@ -75,7 +75,8 @@ let tipo_usuario_nombre = "";
...
@@ -75,7 +75,8 @@ let tipo_usuario_nombre = "";
"codigo"
:
detalle
,
"codigo"
:
detalle
,
"proyecto"
:
proyecto
,
"proyecto"
:
proyecto
,
"tipo"
:
0
,
"tipo"
:
0
,
"tipo_usuario"
:
tipo_usuario
"tipo_usuario"
:
tipo_usuario
,
"listarPermisos"
:
!
$
(
'#cbkPermisos'
).
is
(
':checked'
)
?
1
:
0
};
};
tipo_usuario
=
$
(
'#cboTipoUsuario'
).
val
();
tipo_usuario
=
$
(
'#cboTipoUsuario'
).
val
();
tipo_usuario_nombre
=
$
(
'#cboTipoUsuario option:selected'
).
text
();
tipo_usuario_nombre
=
$
(
'#cboTipoUsuario option:selected'
).
text
();
...
@@ -237,7 +238,7 @@ let tipo_usuario_nombre = "";
...
@@ -237,7 +238,7 @@ let tipo_usuario_nombre = "";
className
:
"dialogExtraSmall"
,
className
:
"dialogExtraSmall"
,
title
:
"<i class='ace-icon fa fa-exclamation-circle white'></i> <span class='white'>Advertencia</span>"
,
title
:
"<i class='ace-icon fa fa-exclamation-circle white'></i> <span class='white'>Advertencia</span>"
,
headerClass
:
"modal-bg-warning"
,
headerClass
:
"modal-bg-warning"
,
message
:
"Este menú está siendo usado por otro proyecto"
,
message
:
data
.
message
,
buttons
:
{
buttons
:
{
si
:
{
si
:
{
label
:
"<i class='fa fa-check bigger-110'></i> OK"
,
label
:
"<i class='fa fa-check bigger-110'></i> OK"
,
...
@@ -329,7 +330,7 @@ let tipo_usuario_nombre = "";
...
@@ -329,7 +330,7 @@ let tipo_usuario_nombre = "";
</button>
</button>
</div>
</div>
</div>
</div>
<div class="table-responsive" style="overflow-y: auto;height: 17.5rem;">
<div class="table-responsive" style="overflow-y: auto;
max-
height: 17.5rem;">
<table id="tablaPermisosVista" class="table table-striped table-hover table-sm table-bordered display no-footer dataTable table-responsive">
<table id="tablaPermisosVista" class="table table-striped table-hover table-sm table-bordered display no-footer dataTable table-responsive">
<thead>
<thead>
<tr>
<tr>
...
@@ -450,7 +451,7 @@ let tipo_usuario_nombre = "";
...
@@ -450,7 +451,7 @@ let tipo_usuario_nombre = "";
className
:
"btn-primary buttonOk"
,
className
:
"btn-primary buttonOk"
,
callback
:
function
()
{
callback
:
function
()
{
let
nom_accion
=
$
(
'#cboListadoAcciones'
).
val
();
let
nom_accion
=
$
(
'#cboListadoAcciones'
).
val
();
let
result_accion
=
$
(
'#cboListadoAcciones'
).
siblings
(
"ul"
).
find
(
'li'
).
get
().
filter
(
li
=>
li
.
innerText
.
t
oUpperCase
()
===
nom_accion
.
toUpperCase
());
let
result_accion
=
$
(
'#cboListadoAcciones'
).
siblings
(
"ul"
).
find
(
'li'
).
get
().
filter
(
li
=>
li
.
innerText
.
t
rim
().
toUpperCase
()
===
nom_accion
.
trim
()
.
toUpperCase
());
let
cod_accion
=
result_accion
.
length
>
0
?
result_accion
[
0
].
value
:
0
;
let
cod_accion
=
result_accion
.
length
>
0
?
result_accion
[
0
].
value
:
0
;
if
(
nom_accion
!==
""
){
if
(
nom_accion
!==
""
){
crearAcciones
(
vista
,
jerarquia
,
cod_accion
,
nom_accion
);
crearAcciones
(
vista
,
jerarquia
,
cod_accion
,
nom_accion
);
...
@@ -567,6 +568,7 @@ let tipo_usuario_nombre = "";
...
@@ -567,6 +568,7 @@ let tipo_usuario_nombre = "";
}
}
});
});
}).
then
(
data
=>
{
}).
then
(
data
=>
{
console
.
log
(
data
);
if
(
data
===
null
){
if
(
data
===
null
){
bootbox
.
dialog
({
bootbox
.
dialog
({
title
:
"<i class='ace-icon fa fa-exclamation-circle white'></i> <span class='white'>Advertencia</span>"
,
title
:
"<i class='ace-icon fa fa-exclamation-circle white'></i> <span class='white'>Advertencia</span>"
,
...
@@ -836,7 +838,7 @@ function crearAcciones(vista, jerarquia,accion, nom_accion){
...
@@ -836,7 +838,7 @@ function crearAcciones(vista, jerarquia,accion, nom_accion){
});
});
}
}
$
(
'#btnBuscar'
).
click
(
function
()
{
$
(
'#btnBuscar'
).
on
(
'click'
,
function
()
{
proyecto
=
$
(
'#cboProyecto'
).
val
();
proyecto
=
$
(
'#cboProyecto'
).
val
();
detalle
=
$
(
'#cboTipoUsuario'
).
val
();
detalle
=
$
(
'#cboTipoUsuario'
).
val
();
recargar
();
recargar
();
...
...
src/main/webapp/vistas/mantenimientoMenu.jsp
View file @
b65c7316
...
@@ -149,7 +149,13 @@
...
@@ -149,7 +149,13 @@
<div
class=
"panel panel-primary card-3 hide"
style=
"margin-top: 30px"
id=
"panelTabla"
>
<div
class=
"panel panel-primary card-3 hide"
style=
"margin-top: 30px"
id=
"panelTabla"
>
<div
class=
"panel-heading"
style=
"padding: 8px 15px"
>
<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>
Listado del Menu
</h6>
<h6
class=
"panel-title"
style=
"font-size: 15px; font-family: inherit"
><i
class=
"fa fa-list"
></i>
Listado del Menu
</h6>
<div
class=
"heading-elements"
>
<div
class=
"heading-elements"
>
<div
class=
"checkbox checkbox-switchery"
>
<label>
<span>
MOSTRAR PERMISOS
</span>
<input
type=
"checkbox"
id=
"cbkPermisos"
>
</label>
</div>
<button
type=
"button"
id=
"btnNuevoTitulo"
class=
"btn bg-slate border-slate-600 btn-xs"
><i
class=
"glyphicon glyphicon-plus"
></i>
Nuevo Titulo
</button>
<button
type=
"button"
id=
"btnNuevoTitulo"
class=
"btn bg-slate border-slate-600 btn-xs"
><i
class=
"glyphicon glyphicon-plus"
></i>
Nuevo Titulo
</button>
</div>
</div>
</div>
</div>
...
@@ -174,7 +180,10 @@
...
@@ -174,7 +180,10 @@
<script
src=
"../js/lib/jquery-editable-select.min.js"
type=
"text/javascript"
></script>
<script
src=
"../js/lib/jquery-editable-select.min.js"
type=
"text/javascript"
></script>
<script
src=
"../js/pages/MantenimientoMenu.js"
type=
"text/javascript"
></script>
<script
src=
"../js/pages/MantenimientoMenu.js"
type=
"text/javascript"
></script>
<script>
<script>
let
switchery
=
new
Switchery
(
document
.
querySelector
(
'#cbkEstado'
),
{
color
:
'red'
,
secondaryColor
:
'green'
})
let
switchery
=
new
Switchery
(
document
.
querySelector
(
'#cbkEstado'
),
{
color
:
'red'
,
secondaryColor
:
'green'
});
let
switchery2
=
new
Switchery
(
document
.
querySelector
(
'#cbkPermisos'
),
{
color
:
'red'
,
secondaryColor
:
'green'
});
$
(
'.heading-elements'
).
css
(
'display'
,
'flex'
);
$
(
'.heading-elements'
).
css
(
'gap'
,
'2rem'
);
document
.
querySelector
(
'#txtEstado'
).
innerText
=
'MOSTRANDO ACTIVOS'
;
document
.
querySelector
(
'#txtEstado'
).
innerText
=
'MOSTRANDO ACTIVOS'
;
document
.
querySelector
(
'#cbkEstado'
).
checked
=
false
;
document
.
querySelector
(
'#cbkEstado'
).
checked
=
false
;
document
.
querySelector
(
'#cbkEstado'
).
onchange
=
function
()
{
document
.
querySelector
(
'#cbkEstado'
).
onchange
=
function
()
{
...
@@ -186,6 +195,9 @@
...
@@ -186,6 +195,9 @@
listarProyectos
();
listarProyectos
();
document
.
querySelector
(
'#btnLimpiar'
).
click
();
document
.
querySelector
(
'#btnLimpiar'
).
click
();
};
};
document
.
querySelector
(
'#cbkPermisos'
).
addEventListener
(
'click'
,()
=>
{
$
(
'#btnBuscar'
).
trigger
(
'click'
);
});
</script>
</script>
</body>
</body>
</html>
</html>
\ 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