mirror of
https://github.com/rmontanana/inventario2.git
synced 2025-08-16 07:56:00 +00:00
-Añadido bootstrap-select a la solicitud de informes de inventario de esta forma se pueden buscar artículos o ubicaciones en el select
-Añadido bootstrap-select al mantenimiento para que en el alta de elementos se puedan buscar artículos o ubicaciones en el el select -Corregido un problema que permitía cambiar fechas en el formulario de bajas
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
Versión 1.07
|
||||||
|
-Añadido bootstrap-select a la solicitud de informes de inventario de esta forma se pueden buscar artículos o ubicaciones en el select
|
||||||
|
-Añadido bootstrap-select al mantenimiento para que en el alta de elementos se puedan buscar artículos o ubicaciones en el el select
|
||||||
|
-Corregido un problema que permitía cambiar fechas en el formulario de bajas
|
||||||
|
|
||||||
Versión 1.06 28-03-2014
|
Versión 1.06 28-03-2014
|
||||||
-Configuracion: Añadido icono en el botón de aceptar.
|
-Configuracion: Añadido icono en el botón de aceptar.
|
||||||
Cambiado el mensaje de éxito en la grabación de los cambios.
|
Cambiado el mensaje de éxito en la grabación de los cambios.
|
||||||
|
@@ -147,7 +147,7 @@ class InformeInventario {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function listaUbicaciones() {
|
private function listaUbicaciones() {
|
||||||
$salida = "<select class=\"form-control\" name=\"id\">\n";
|
$salida = "<select class=\"selectpicker show-tick\" name=\"id\" data-live-search=\"true\" data-width=\"auto\">\n";
|
||||||
$comando = "select * from Ubicaciones order by Descripcion";
|
$comando = "select * from Ubicaciones order by Descripcion";
|
||||||
$resultado = $this->bdd->ejecuta($comando);
|
$resultado = $this->bdd->ejecuta($comando);
|
||||||
if (!$resultado) {
|
if (!$resultado) {
|
||||||
@@ -161,7 +161,7 @@ class InformeInventario {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function listaArticulos() {
|
private function listaArticulos() {
|
||||||
$salida = "<select class=\"form-control\" name=\"id\">\n";
|
$salida = "<select class=\"selectpicker show-tick\" name=\"id\" data-live-search=\"true\" data-width=\"auto\">\n";
|
||||||
$comando = "select * from Articulos order by descripcion, marca, modelo";
|
$comando = "select * from Articulos order by descripcion, marca, modelo";
|
||||||
$resultado = $this->bdd->ejecuta($comando);
|
$resultado = $this->bdd->ejecuta($comando);
|
||||||
if (!$resultado) {
|
if (!$resultado) {
|
||||||
@@ -177,7 +177,7 @@ class InformeInventario {
|
|||||||
private function formulario($accion, $etiqueta, $lista) {
|
private function formulario($accion, $etiqueta, $lista) {
|
||||||
$salida ='<div class="col-sm-6 col-md-6"><form name="informeInventario.form" method="post" action="' . $accion . '">' . "\n";
|
$salida ='<div class="col-sm-6 col-md-6"><form name="informeInventario.form" method="post" action="' . $accion . '">' . "\n";
|
||||||
$salida.="<fieldset style=\"width: 96%;\"><p><legend style=\"color: red;\"><b>Elige $etiqueta</b></legend>\n";
|
$salida.="<fieldset style=\"width: 96%;\"><p><legend style=\"color: red;\"><b>Elige $etiqueta</b></legend>\n";
|
||||||
$salida.="<br><br><label>$etiqueta</label>";
|
$salida.="<br><br><label>$etiqueta </label>";
|
||||||
$salida.=$lista;
|
$salida.=$lista;
|
||||||
$salida.="<br><br>
|
$salida.="<br><br>
|
||||||
<label for='salida'>Salida del informe por:</label>";
|
<label for='salida'>Salida del informe por:</label>";
|
||||||
@@ -186,6 +186,7 @@ class InformeInventario {
|
|||||||
$salida.='<div class="radio"><label><input type="radio" name="salida" value="etiquetas"><span class="glyphicon glyphicon-qrcode"></span> Etiquetas</label></div>';
|
$salida.='<div class="radio"><label><input type="radio" name="salida" value="etiquetas"><span class="glyphicon glyphicon-qrcode"></span> Etiquetas</label></div>';
|
||||||
$salida.="<br><br></fieldset><p>";
|
$salida.="<br><br></fieldset><p>";
|
||||||
$salida.='<p align="center"><button type=submit class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span> Aceptar</button></p><br></div>' . "\n";
|
$salida.='<p align="center"><button type=submit class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span> Aceptar</button></p><br></div>' . "\n";
|
||||||
|
$salida.="<script>$('.selectpicker').selectpicker();</script>";
|
||||||
return $salida;
|
return $salida;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -479,7 +479,8 @@ class Mantenimiento {
|
|||||||
//tabla a la cual pertenece la clave foránea.
|
//tabla a la cual pertenece la clave foránea.
|
||||||
protected function generaLista($datos, $campo, $valorInicial, $modo)
|
protected function generaLista($datos, $campo, $valorInicial, $modo)
|
||||||
{
|
{
|
||||||
$salida = "<select class=\"form-control\" name=\"$campo\">\n";
|
$modoEfectivo = $modo == "readonly" ? "disabled" : "";
|
||||||
|
$salida = "<select class=\"selectpicker show-tick\" data-live-search=\"true\" data-width=\"auto\" name=\"$campo\" $modoEfectivo>\n";
|
||||||
list($tabla, $atributos) = explode(",", $datos);
|
list($tabla, $atributos) = explode(",", $datos);
|
||||||
$atributos = str_replace("/", ",", $atributos);
|
$atributos = str_replace("/", ",", $atributos);
|
||||||
// Elimina las llaves
|
// Elimina las llaves
|
||||||
@@ -489,7 +490,6 @@ class Mantenimiento {
|
|||||||
if (!$resultado) {
|
if (!$resultado) {
|
||||||
return $this->errorBD($comando);
|
return $this->errorBD($comando);
|
||||||
}
|
}
|
||||||
$modoEfectivo = $modo == "readonly" ? "disabled" : "";
|
|
||||||
$primero = true;
|
$primero = true;
|
||||||
while ($fila = $this->bdd->procesaResultado()) {
|
while ($fila = $this->bdd->procesaResultado()) {
|
||||||
foreach ($fila as $clave => $valor) {
|
foreach ($fila as $clave => $valor) {
|
||||||
@@ -508,6 +508,7 @@ class Mantenimiento {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$salida.="</select>\n<br><br>";
|
$salida.="</select>\n<br><br>";
|
||||||
|
$salida.="<script>$('.selectpicker').selectpicker();</script>";
|
||||||
return $salida;
|
return $salida;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -636,6 +637,7 @@ class Mantenimiento {
|
|||||||
<input type="text" name="' . $campo . '" data-format="YYYY/MM/DD" value="' . $valorDato . '" ' . $modoEfectivo . ' class="form-control" />
|
<input type="text" name="' . $campo . '" data-format="YYYY/MM/DD" value="' . $valorDato . '" ' . $modoEfectivo . ' class="form-control" />
|
||||||
<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
|
<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
|
||||||
</div>';
|
</div>';
|
||||||
|
if ($modo != "readonly") {
|
||||||
$salida .= '<script type="text/javascript">
|
$salida .= '<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
$(' . "'#datetimepicker" . $nfechas . "').datetimepicker({
|
$(' . "'#datetimepicker" . $nfechas . "').datetimepicker({
|
||||||
@@ -645,6 +647,7 @@ class Mantenimiento {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>";
|
</script>";
|
||||||
|
}
|
||||||
$salida .= "</div></div>";
|
$salida .= "</div></div>";
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
7
css/bootstrap-select/bootstrap-select.min.css
vendored
Executable file
7
css/bootstrap-select/bootstrap-select.min.css
vendored
Executable file
File diff suppressed because one or more lines are too long
8
css/bootstrap-select/bootstrap-select.min.js
vendored
Executable file
8
css/bootstrap-select/bootstrap-select.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
29
css/bootstrap-select/i18n/defaults-es-CL.js
Executable file
29
css/bootstrap-select/i18n/defaults-es-CL.js
Executable file
@@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* Translated default messages for bootstrap-select.
|
||||||
|
* Locale: ES (Spanish)
|
||||||
|
* Region: CL (Chile)
|
||||||
|
*/
|
||||||
|
(function($) {
|
||||||
|
$.fn.selectpicker.defaults = {
|
||||||
|
style: 'btn-default',
|
||||||
|
size: 'auto',
|
||||||
|
title: null,
|
||||||
|
selectedTextFormat : 'values',
|
||||||
|
noneSelectedText : 'No hay selección',
|
||||||
|
noneResultsText : 'No hay resultados',
|
||||||
|
countSelectedText : 'Seleccionados {0} de {1}',
|
||||||
|
maxOptionsText: ['Límite alcanzado ({n} {var} max)', 'Límite del grupo alcanzado({n} {var} max)', ['elementos','element']],
|
||||||
|
width: false,
|
||||||
|
container: false,
|
||||||
|
hideDisabled: false,
|
||||||
|
showSubtext: false,
|
||||||
|
showIcon: true,
|
||||||
|
showContent: true,
|
||||||
|
dropupAuto: true,
|
||||||
|
header: false,
|
||||||
|
liveSearch: false,
|
||||||
|
multipleSeparator: ', ',
|
||||||
|
iconBase: 'glyphicon',
|
||||||
|
tickIcon: 'glyphicon-ok'
|
||||||
|
};
|
||||||
|
}(jQuery));
|
6
css/bootstrap-select/i18n/defaults-es-CL.min.js
vendored
Executable file
6
css/bootstrap-select/i18n/defaults-es-CL.min.js
vendored
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
/*
|
||||||
|
* Translated default messages for bootstrap-select.
|
||||||
|
* Locale: ES (Spanish)
|
||||||
|
* Region: CL (Chile)
|
||||||
|
*/
|
||||||
|
(function(e){e.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"No hay selección",noneResultsText:"No hay resultados",countSelectedText:"Seleccionados {0} de {1}",maxOptionsText:["Límite alcanzado ({n} {var} max)","Límite del grupo alcanzado({n} {var} max)",["elementos","element"]],width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok"}})(jQuery)
|
30
css/bootstrap-select/i18n/defaults-eu.js
Executable file
30
css/bootstrap-select/i18n/defaults-eu.js
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* Translated default messages for bootstrap-select.
|
||||||
|
* Locale: EU (Basque)
|
||||||
|
* Region:
|
||||||
|
*/
|
||||||
|
(function($) {
|
||||||
|
$.fn.selectpicker.defaults = {
|
||||||
|
style: 'btn-default',
|
||||||
|
size: 'auto',
|
||||||
|
title: null,
|
||||||
|
selectedTextFormat : 'values',
|
||||||
|
noneSelectedText : 'Hautapenik ez',
|
||||||
|
noneResultsText : 'Emaitzarik ez',
|
||||||
|
countSelectedText : '{1}(e)tik {0} hautatuta',
|
||||||
|
maxOptionsText: ['Mugara iritsita ({n} {var} gehienez)', 'Taldearen mugara iritsita ({n} {var} gehienez)', ['elementu','elementu']],
|
||||||
|
width: false,
|
||||||
|
container: false,
|
||||||
|
hideDisabled: false,
|
||||||
|
showSubtext: false,
|
||||||
|
showIcon: true,
|
||||||
|
showContent: true,
|
||||||
|
dropupAuto: true,
|
||||||
|
header: false,
|
||||||
|
liveSearch: false,
|
||||||
|
multipleSeparator: ', ',
|
||||||
|
iconBase: 'glyphicon',
|
||||||
|
tickIcon: 'glyphicon-ok'
|
||||||
|
};
|
||||||
|
}(jQuery));
|
||||||
|
|
6
css/bootstrap-select/i18n/defaults-eu.min.js
vendored
Executable file
6
css/bootstrap-select/i18n/defaults-eu.min.js
vendored
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
/*
|
||||||
|
* Translated default messages for bootstrap-select.
|
||||||
|
* Locale: EU (Basque)
|
||||||
|
* Region:
|
||||||
|
*/
|
||||||
|
(function(e){e.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"Hautapenik ez",noneResultsText:"Emaitzarik ez",countSelectedText:"{1}(e)tik {0} hautatuta",maxOptionsText:["Mugara iritsita ({n} {var} gehienez)","Taldearen mugara iritsita ({n} {var} gehienez)",["elementu","elementu"]],width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok"}})(jQuery)
|
33
css/bootstrap-select/i18n/defaults-pt_BR.js
Executable file
33
css/bootstrap-select/i18n/defaults-pt_BR.js
Executable file
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* Translated default messages for bootstrap-select.
|
||||||
|
* Locale: PT (Portuguese; português)
|
||||||
|
* Region: BR (Brazil; Brasil)
|
||||||
|
* Author: Rodrigo de Avila <rodrigo@avila.net.br>
|
||||||
|
*/
|
||||||
|
(function($) {
|
||||||
|
$.fn.selectpicker.defaults = {
|
||||||
|
style: 'btn-default',
|
||||||
|
size: 'auto',
|
||||||
|
title: null,
|
||||||
|
selectedTextFormat : 'values',
|
||||||
|
noneSelectedText : 'Nada selecionado',
|
||||||
|
noneResultsText : 'Nada encontrado contendo',
|
||||||
|
countSelectedText : 'Selecionado {0} de {1}',
|
||||||
|
maxOptionsText: ['Limite excedido (máx. {n} {var})', 'Limite do grupo excedido (máx. {n} {var})', ['itens','item']],
|
||||||
|
width: false,
|
||||||
|
container: false,
|
||||||
|
hideDisabled: false,
|
||||||
|
showSubtext: false,
|
||||||
|
showIcon: true,
|
||||||
|
showContent: true,
|
||||||
|
dropupAuto: true,
|
||||||
|
header: false,
|
||||||
|
liveSearch: false,
|
||||||
|
actionsBox: false,
|
||||||
|
multipleSeparator: ', ',
|
||||||
|
iconBase: 'glyphicon',
|
||||||
|
tickIcon: 'glyphicon-ok',
|
||||||
|
maxOptions: false
|
||||||
|
};
|
||||||
|
}(jQuery));
|
||||||
|
|
7
css/bootstrap-select/i18n/defaults-pt_BR.min.js
vendored
Executable file
7
css/bootstrap-select/i18n/defaults-pt_BR.min.js
vendored
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
/*
|
||||||
|
* Translated default messages for bootstrap-select.
|
||||||
|
* Locale: PT (Portuguese; português)
|
||||||
|
* Region: BR (Brazil; Brasil)
|
||||||
|
* Author: Rodrigo de Avila <rodrigo@avila.net.br>
|
||||||
|
*/
|
||||||
|
!function(a){a.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"Nada selecionado",noneResultsText:"Nada encontrado contendo",countSelectedText:"Selecionado {0} de {1}",maxOptionsText:["Limite excedido (m\xe1x. {n} {var})","Limite do grupo excedido (m\xe1x. {n} {var})",["itens","item"]],width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,actionsBox:!1,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok",maxOptions:!1}}(jQuery);
|
31
css/bootstrap-select/i18n/defaults-ru-RU.js
Executable file
31
css/bootstrap-select/i18n/defaults-ru-RU.js
Executable file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* Translated default messages for bootstrap-select.
|
||||||
|
* Locale: RU (Russian; руÑÑкий)
|
||||||
|
* Region: RU (Russian Federation)
|
||||||
|
*/
|
||||||
|
(function($) {
|
||||||
|
$.fn.selectpicker.defaults = {
|
||||||
|
style: 'btn-default',
|
||||||
|
size: 'auto',
|
||||||
|
title: null,
|
||||||
|
selectedTextFormat : 'values',
|
||||||
|
noneSelectedText : 'Ðичего не выбрано',
|
||||||
|
noneResultsText : 'Ðе нейдено Ñовпадений',
|
||||||
|
countSelectedText : 'Выбрано {0} из {1}',
|
||||||
|
maxOptionsText: ['ДоÑтигнут предел ({n} {var} макÑимум)', 'ДоÑтигнут предел в группе ({n} {var} макÑимум)', ['items','item']],
|
||||||
|
width: false,
|
||||||
|
container: false,
|
||||||
|
hideDisabled: false,
|
||||||
|
showSubtext: false,
|
||||||
|
showIcon: true,
|
||||||
|
showContent: true,
|
||||||
|
dropupAuto: true,
|
||||||
|
header: false,
|
||||||
|
liveSearch: false,
|
||||||
|
actionsBox: false,
|
||||||
|
multipleSeparator: ', ',
|
||||||
|
iconBase: 'glyphicon',
|
||||||
|
tickIcon: 'glyphicon-ok',
|
||||||
|
maxOptions: false
|
||||||
|
};
|
||||||
|
}(jQuery));
|
6
css/bootstrap-select/i18n/defaults-ru_RU.min.js
vendored
Executable file
6
css/bootstrap-select/i18n/defaults-ru_RU.min.js
vendored
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
/*
|
||||||
|
* Translated default messages for bootstrap-select.
|
||||||
|
* Locale: RU (Russian; руÑÑкий)
|
||||||
|
* Region: RU (Russian Federation)
|
||||||
|
*/
|
||||||
|
(function(e){e.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"Ðичего не выбрано",noneResultsText:"Ðе нейдено Ñовпадений",countSelectedText:"Выбрано {0} из {1}",maxOptionsText:["ДоÑтигнут предел ({n} {var} макÑимум)","ДоÑтигнут предел в группе ({n} {var} макÑимум)",["items","item"]],width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,actionsBox:false,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok",maxOptions:false}})(jQuery)
|
@@ -17,9 +17,11 @@
|
|||||||
<link rel="stylesheet" href="css/jquery.simplecolorpicker.css">
|
<link rel="stylesheet" href="css/jquery.simplecolorpicker.css">
|
||||||
<link rel="stylesheet" href="css/jquery.simplecolorpicker-glyphicons.css">
|
<link rel="stylesheet" href="css/jquery.simplecolorpicker-glyphicons.css">
|
||||||
<link rel="stylesheet" href="css/jasny-bootstrap.min.css">
|
<link rel="stylesheet" href="css/jasny-bootstrap.min.css">
|
||||||
|
<link rel="stylesheet" href="css/bootstrap-select/bootstrap-select.min.css">
|
||||||
<style type="text/css"></style>
|
<style type="text/css"></style>
|
||||||
|
|
||||||
<script type="text/javascript" src="./css/jquery.min.js"></script>
|
<script type="text/javascript" src="./css/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="./css/bootstrap-select/bootstrap-select.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!--<body style="background-image:url(img/fondos/old_map.png); background-repeat:repeat">-->
|
<!--<body style="background-image:url(img/fondos/old_map.png); background-repeat:repeat">-->
|
||||||
|
Reference in New Issue
Block a user