Se realizaron diferentes cambios al punto de venta los cuales son los siguientes
Se agrego para que las ventanas modales se puedan mover para ello se agrego el siguiente código
En vistas/plantilla.php se agrego el siguiente código en el <head>
<script src="https://code.jquery.com/ui/1.11.3/jquery-ui.min.js"></script>
En vistas/js/plantilla.js
$('.modal-dialog').draggable({
handle: ".modal-header"
});
Ya con eso se puede mover cualquier modal del fuente

Se agrego para poderle hacer zoom a las imagenes de los productos
Se agrego el código para importar el css en vistas/plantilla.php
<!-- ZOOM Image -->
<link rel="stylesheet" href="vistas/dist/css/zoom.css">
Se agrego también al final del archivo plantilla el código para llamar al archivo zoom.js
<script src="vistas/js/zoom.js"></script>
El archivo vistas/dist/css/zoom.css tiene el siguiente contenido
img[data-action="zoom"] {
cursor: pointer;
cursor: -webkit-zoom-in;
cursor: -moz-zoom-in;
}
.zoom-img,
.zoom-img-wrap {
position: relative;
z-index: 666;
-webkit-transition: all 300ms;
-o-transition: all 300ms;
transition: all 300ms;
}
img.zoom-img {
cursor: pointer;
cursor: -webkit-zoom-out;
cursor: -moz-zoom-out;
}
.zoom-overlay {
z-index: 420;
background: #fff;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
pointer-events: none;
filter: "alpha(opacity=0)";
opacity: 0;
-webkit-transition: opacity 300ms;
-o-transition: opacity 300ms;
transition: opacity 300ms;
}
.zoom-overlay-open .zoom-overlay {
filter: "alpha(opacity=100)";
opacity: 1;
}
.zoom-overlay-open,
.zoom-overlay-transitioning {
cursor: default;
}
El archivo vistas/js/zoom.js tiene el siguiente contenido
En ajax/datatable-productos.ajax.php se cambio el siguiente código en las imagenes, se agrego data-action=’zoom’
$imagen = "<img src='" . $productos[$i]["imagen"] . "' data-action='zoom' width='40px'>";
También se agrego en vistas/modulos/usuarios.php
echo '<td><img src="'.$value["foto"].'" class="img-thumbnail" data-action="zoom" width="40px"></td>';
Al hacer click en la foto en el datatable se hara zoom

También en productos

Deja un comentario