Reporte de puntos de interes
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<link href="../Metronic/assets/global/plugins/jquery-minicolors/jquery.minicolors.css" rel="stylesheet" />
|
||||
<style>
|
||||
html, body {
|
||||
width: 100%;
|
||||
@@ -26,6 +27,138 @@
|
||||
.pac-container.pac-logo {
|
||||
z-index: 100000;
|
||||
}
|
||||
|
||||
#showdiv1 {
|
||||
left: 0 !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
#ShowDiv3:hover {
|
||||
line-height: 34px !important;
|
||||
-webkit-transition: line-height ease 1s;
|
||||
-moz-transition: line-height ease 1s;
|
||||
-o-transition: line-height ease 1s;
|
||||
transition: line-height ease 1s;
|
||||
}
|
||||
|
||||
.ADScroller-body {
|
||||
max-height: 400px;
|
||||
}
|
||||
|
||||
.pac-container.pac-logo {
|
||||
z-index: 100000;
|
||||
}
|
||||
|
||||
#iw-container {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#iw-container .iw-title {
|
||||
font-family: 'Open Sans Condensed', sans-serif;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
padding: 10px;
|
||||
background-color: #48b5e9;
|
||||
color: white;
|
||||
margin: 0;
|
||||
border-radius: 2px 2px 0 0;
|
||||
}
|
||||
|
||||
#iw-container .iw-content {
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
font-weight: 400;
|
||||
margin-right: 1px;
|
||||
padding: 15px 5px 20px 15px;
|
||||
max-height: 140px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.iw-content img {
|
||||
float: right;
|
||||
margin: 0 5px 5px 10px;
|
||||
}
|
||||
|
||||
.iw-subTitle {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.iw-bottom-gradient {
|
||||
position: absolute;
|
||||
width: 326px;
|
||||
height: 25px;
|
||||
bottom: 10px;
|
||||
right: 18px;
|
||||
background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
|
||||
background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
|
||||
background: -moz-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
|
||||
background: -ms-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
|
||||
}
|
||||
|
||||
.modal.fade:not(.in).left .modal-dialog {
|
||||
-webkit-transform: translate3d(-25%, 0, 0);
|
||||
transform: translate3d(-25%, 0, 0);
|
||||
}
|
||||
|
||||
.modal.fade:not(.in).right .modal-dialog {
|
||||
-webkit-transform: translate3d(25%, 0, 0);
|
||||
transform: translate3d(25%, 0, 0);
|
||||
}
|
||||
|
||||
.modal.fade:not(.in).bottom .modal-dialog {
|
||||
-webkit-transform: translate3d(0, 25%, 0);
|
||||
transform: translate3d(0, 25%, 0);
|
||||
}
|
||||
|
||||
/* Alternative Angles */
|
||||
.modal.fade:not(.in).top-left .modal-dialog {
|
||||
-webkit-transform: translate3d(-25%, -25%, 0);
|
||||
transform: translate3d(-25%, -25%, 0);
|
||||
}
|
||||
|
||||
.modal.fade:not(.in).top-right .modal-dialog {
|
||||
-webkit-transform: translate3d(25%, -25%, 0);
|
||||
transform: translate3d(25%, -25%, 0);
|
||||
}
|
||||
|
||||
.modal.fade:not(.in).bottom-left .modal-dialog {
|
||||
-webkit-transform: translate3d(-25%, 25%, 0);
|
||||
transform: translate3d(-25%, 25%, 0);
|
||||
}
|
||||
|
||||
.modal.fade:not(.in).bottom-right .modal-dialog {
|
||||
-webkit-transform: translate3d(25%, 25%, 0);
|
||||
transform: translate3d(25%, 25%, 0);
|
||||
}
|
||||
|
||||
.minicolors {
|
||||
position: relative;
|
||||
MARGIN-TOP: 10PX;
|
||||
WIDTH: 20%;
|
||||
}
|
||||
|
||||
table.dataTable,
|
||||
table.dataTable th,
|
||||
table.dataTable td {
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody > .dataTable > thead {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
tr td:nth-child(4) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.form-horizontal .control-label {
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
@@ -66,8 +199,11 @@
|
||||
<asp:GridView ID="GvPuntos" runat="server" GridLines="None" DataKeyNames="Punto,PuntoDeInteres,CvePuntoDeInteres" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-height="150" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="10%">
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkSelectAll" CssClass="ChkAllClickGR" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkGR" />
|
||||
<asp:CheckBox runat="server" ID="chkGR" CssClass="ChkAllGR" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="PuntoDeInteres" ItemStyle-Width="45%" HeaderText="Punto De Interés" ItemStyle-HorizontalAlign="Left" />
|
||||
@@ -83,8 +219,11 @@
|
||||
<asp:GridView ID="GvDispositivos" runat="server" GridLines="None" DataKeyNames="CveDispositivo,SerieVehiculo,DevID,NoEconomico,NombreVehiculo" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-heighterror="800" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="10%">
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkSelectAll" CssClass="ChkAllClickDisp" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkDis" />
|
||||
<asp:CheckBox runat="server" ID="chkDis" CssClass="ChkAllDisp" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="NoEconomico" ItemStyle-Width="25%" HeaderText="Número Económico" ItemStyle-HorizontalAlign="Left" />
|
||||
@@ -148,6 +287,43 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="modal fade bottom in" style="bottom: unset; z-index: 539" id="h">
|
||||
<div class="modal-dialog" style="position: fixed; bottom: 0; margin: 0px,0px,0px,0px; width: 100%; padding: 0px, 0px, 0px, 0px; border-style: solid; border-color: rgb(68, 77, 88); z-index: 539;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body" style="padding: 5px;">
|
||||
<asp:UpdatePanel runat="server" ID="UPGV" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div runat="server" id="rowImpresiones" class="row" style="margin: 0px 10px 10px 0px; text-align: right;">
|
||||
<a onclick="doScaledCLick('#C_btnImprimir');;" class="btn btn-circle btn-sm grey"><i class='fa fa-print' aria-hidden='true'></i></a>
|
||||
<a onclick="doScaledCLick('#C_BtnImprimirEX');" class="btn btn-circle btn-sm green"><i class='fa fa-file-excel-o' aria-hidden='true'></i></a>
|
||||
</div>
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusquedaBarra" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaBarra','{0}')", GvBarra.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaBarra','{0}')", GvBarra.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvBarra" runat="server" GridLines="None" PageSize="1000" AllowPaging="true" AllowCustomPaging="true" CssClass="table table-striped table-advance table-hover Widthall" data-sort="true" data-height="150px;" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Vehiculo" ItemStyle-Width="30%" HeaderText="Vehículo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="PuntoDeInteres" ItemStyle-Width="30%" HeaderText="Punto De Interes" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Visitas" ItemStyle-Width="20%" DataFormatString="{0} Visitas" HeaderText="Visitas" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="UltimaVisita" ItemStyle-Width="20%" DataFormatString="{0:dd/MM/yyyy}" HeaderText="Ultima Visita" ItemStyle-HorizontalAlign="Center" />
|
||||
</Columns>
|
||||
<PagerSettings Mode="NextPrevious" Visible="true" Position="Top" />
|
||||
</asp:GridView>
|
||||
<asp:HiddenField ID="HdnIndexGvBarra" runat="server" ClientIDMode="Static" Value="-1" />
|
||||
<asp:HiddenField ID="HdnTextFilter" runat="server" ClientIDMode="Static" Value="" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div runat="server" class="row" style="margin: 0px 0px 10px 0px; display: none">
|
||||
<asp:Button runat="server" OnClick="btnImprimir_Click" ID="btnImprimir" CommandArgument="PDF" ToolTip="Imprimir en PDF" CssClass="btn btn-circle btn-sm grey" Text="<i class='fa fa-print' aria-hidden='true'></i>"></asp:Button>
|
||||
<asp:Button runat="server" OnClick="btnImprimir_Click" ID="BtnImprimirEX" CommandArgument="EXCEL" ToolTip="Imprimir en EXCEL" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-file-excel-o' aria-hidden='true'></i>"></asp:Button>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
@@ -158,18 +334,36 @@
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
|
||||
function doScaledCLick(boton) {
|
||||
|
||||
setTimeout(function () {
|
||||
$(boton).click();
|
||||
}, 250);
|
||||
}
|
||||
|
||||
var markers = [];
|
||||
var lastOpenedInfoWindow;
|
||||
var geocoder;
|
||||
var map;
|
||||
var circles = [];
|
||||
|
||||
$('body').on('click', '.ChkAllClickGR input', function () { $(".ChkAllGR input").not(this).prop('checked', $('.ChkAllClickGR input').is(':checked')); });
|
||||
$('body').on('click', '.ChkAllClickDisp input', function () { $(".ChkAllDisp input").not(this).prop('checked', $('.ChkAllClickDisp input').is(':checked')); });
|
||||
|
||||
function initMap() {
|
||||
map = new google.maps.Map(document.getElementById('map'), {
|
||||
center: { lat: 19.4326, lng: -99.13329 },
|
||||
zoom: 8
|
||||
});
|
||||
|
||||
var ShowDiv1 = document.createElement('div');
|
||||
var ShowDivControl = new ShowDiv(ShowDiv1, map);
|
||||
|
||||
ShowDiv1.index = 1;
|
||||
ShowDiv1.id = "showdiv1"
|
||||
|
||||
map.controls[google.maps.ControlPosition.BOTTOM_CENTER].push(ShowDiv1);
|
||||
|
||||
if (navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition(function (position) {
|
||||
var pos = {
|
||||
@@ -201,6 +395,178 @@
|
||||
//service = new google.maps.DistanceMatrixService;
|
||||
// map.addListener('click', addLatLng);
|
||||
}
|
||||
|
||||
//$(document).ready(function () {
|
||||
// GvBarraPaginator();
|
||||
// initMap();
|
||||
// Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
|
||||
// function EndRequestHandler(sender, args) {
|
||||
// $("#C_GvBarra_filter > div > input").on("keypress", function (e) {
|
||||
// HdnTextFilter.value = $(this).val() + String.fromCharCode(e.which);
|
||||
// });
|
||||
// }
|
||||
//});
|
||||
|
||||
function GvBarraPaginator() {
|
||||
$('.table.PaginarGV').each(function () {
|
||||
var Tthis = $(this);
|
||||
if (!$.fn.DataTable.isDataTable(Tthis) && Tthis.find("th").length > 0) {
|
||||
Tthis.prepend(("<thead></thead>"));
|
||||
Tthis.find('thead').append($("#C_GvBarra").find("tr:first"));
|
||||
var table = Tthis.DataTable({
|
||||
//data: datasource,
|
||||
//columns: [
|
||||
// { title: "Vehiculo" },
|
||||
// { title: "Fecha" },
|
||||
// { title: "TiempoDetenido" },
|
||||
// { title: "Extn." },
|
||||
// { title: "Start date" },
|
||||
// { title: "Salary" }
|
||||
//],
|
||||
deferRender: true,
|
||||
deferLoading: 100,
|
||||
scrollY: 130,
|
||||
scrollCollapse: true,
|
||||
scroller: {
|
||||
displayBuffer: 20
|
||||
},
|
||||
ordering: true
|
||||
});
|
||||
var tkeys = new $.fn.dataTable.KeyTable(table, {
|
||||
// options
|
||||
});
|
||||
var parent = Tthis.parent().parent().parent();
|
||||
$('.dataTables_scrollHeadInner > .table.ADScrollPaginator2').find('th').addClass('importantth');
|
||||
parent.find(".dataTables_paginate").css("display", "none");
|
||||
parent.find(".dataTables_length").css("display", "none");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ShowDiv(controlDiv, map) {
|
||||
// Set CSS for the control border.
|
||||
var controlUI = document.createElement('div');
|
||||
controlUI.style.backgroundColor = '#444d58';
|
||||
controlUI.style.border = '2px solid #444d58';
|
||||
controlUI.style.borderRadius = '3px';
|
||||
controlUI.style.width = '100%'
|
||||
controlUI.style.boxShadow = '0 2px 6px rgba(0,0,0,.3)';
|
||||
controlUI.style.cursor = 'pointer';
|
||||
controlUI.style.marginRight = '5px';
|
||||
controlUI.style.marginTop = '5px';
|
||||
controlUI.style.marginBottom = '0px';
|
||||
controlUI.style.textAlign = 'center';
|
||||
// controlUI.title = 'Click para borrar el último punto dibujado';
|
||||
controlDiv.appendChild(controlUI);
|
||||
|
||||
// Set CSS for the control interior.
|
||||
var controlText = document.createElement('div');
|
||||
controlText.style.color = '#ebebeb';
|
||||
controlText.id = "ShowDiv3"
|
||||
controlText.style.fontFamily = ' "Open Sans", sans-serif; ';
|
||||
controlText.style.fontSize = '14px';
|
||||
controlText.style.lineHeight = '20px';
|
||||
controlText.style.paddingLeft = '5px';
|
||||
controlText.style.paddingRight = '5px';
|
||||
controlText.innerHTML = '<i class="fa fa-angle-up" aria-hidden="true"></i>';
|
||||
controlUI.appendChild(controlText);
|
||||
|
||||
// Setup the click event listeners: simply set the map to Chicago.
|
||||
controlUI.addEventListener('click', function () {
|
||||
FNShowDiv();
|
||||
});
|
||||
}
|
||||
|
||||
function FNShowDiv() {
|
||||
if (open === false) {
|
||||
//$("#ChkSeguimiento").appendTo("#DivSeguimiento");
|
||||
//$("#ChkSeguimiento").appendTo("#DivSeguimiento");
|
||||
$("#h").modal()
|
||||
$("#ShowDiv3").css("line-height", "34px")
|
||||
open = true
|
||||
$("#ShowDiv3").html('<i class="fa fa-angle-down" aria-hidden="true"></i>')
|
||||
setTimeout(function () {
|
||||
$('.table.ADScrollPaginator2').DataTable().draw();
|
||||
}, 150);
|
||||
if ($("#HdnOpcion").val() === 'All' || $("#HdnOpcion").val() === 'Idle' || $("#HdnOpcion").val() === 'Ralenti') {
|
||||
$('#btnPlay').css('display', '');
|
||||
$('#btnPrintExcel').css('display', '');
|
||||
$('#btnPrintPDF').css('display', '');
|
||||
$("#btnPlay").click(function () {
|
||||
pause = !pause;
|
||||
if (pause) {
|
||||
stopTimeout();
|
||||
} else {
|
||||
if (startPlay) {
|
||||
startPlay = false;
|
||||
Play();
|
||||
} else {
|
||||
Play();
|
||||
}
|
||||
}
|
||||
if ($('#btnPlay > i').hasClass("fa-pause")) {
|
||||
$('#btnPlay > i').removeClass("fa-pause").addClass("fa-play");
|
||||
} else if ($('#btnPlay > i').hasClass("fa-play")) {
|
||||
$('#btnPlay > i').removeClass("fa-play").addClass("fa-pause");
|
||||
}
|
||||
|
||||
});
|
||||
$("#btnPrintExcel").click(function () {
|
||||
var s;
|
||||
for (var i = 0; i < $("#C_GvBarra").DataTable().rows().nodes().length; i++) {
|
||||
s = s + $("#C_GvBarra").DataTable().row(i).node().cells[2].title.trim() + ';';
|
||||
}
|
||||
$("#HdnDirecciones").val(s);
|
||||
doScaledCLick("#C_BtnImprimirEX")
|
||||
});
|
||||
$("#btnPrintPDF").click(function () {
|
||||
var s = "";
|
||||
for (var i = 0; i < $("#C_GvBarra").DataTable().rows().nodes().length; i++) {
|
||||
s = s + $("#C_GvBarra").DataTable().row(i).node().cells[2].title.trim() + ';';
|
||||
}
|
||||
$("#HdnDirecciones").val(s);
|
||||
doScaledCLick("#C_btnImprimir")
|
||||
});
|
||||
} else if ($("#HdnOpcion").val() === 'Speed') {
|
||||
|
||||
$('#btnPrintExcel').css('display', '');
|
||||
$('#btnPrintPDF').css('display', '');
|
||||
|
||||
$("#btnPrintExcel").click(function () {
|
||||
var s;
|
||||
for (var i = 0; i < $("#C_GvBarra").DataTable().rows().nodes().length; i++) {
|
||||
s = s + $("#C_GvBarra").DataTable().row(i).node().cells[2].title.trim() + ';';
|
||||
}
|
||||
$("#HdnDirecciones").val(s);
|
||||
doScaledCLick("#C_BtnImprimirEX")
|
||||
});
|
||||
$("#btnPrintPDF").click(function () {
|
||||
var s = "";
|
||||
for (var i = 0; i < $("#C_GvBarra").DataTable().rows().nodes().length; i++) {
|
||||
s = s + $("#C_GvBarra").DataTable().row(i).node().cells[2].title.trim() + ';';
|
||||
}
|
||||
$("#HdnDirecciones").val(s);
|
||||
doScaledCLick("#C_btnImprimir")
|
||||
});
|
||||
} else if ($("#HdnOpcion").val() === 'Last') {
|
||||
$('#btnPrintExcel').css('display', '');
|
||||
$("#btnPrintExcel").click(function () {
|
||||
var s;
|
||||
for (var i = 0; i < $("#C_GvBarra").DataTable().rows().nodes().length; i++) {
|
||||
s = s + $("#C_GvBarra").DataTable().row(i).node().cells[2].title.trim() + ';';
|
||||
}
|
||||
$("#HdnDirecciones").val(s);
|
||||
doScaledCLick("#C_BtnImprimirEX");
|
||||
});
|
||||
}
|
||||
} else {
|
||||
$("#h").modal('hide')
|
||||
$("#ShowDiv3").css("line-height", "20px")
|
||||
open = false
|
||||
$("#ShowDiv3").html('<i class="fa fa-angle-up" aria-hidden="true"></i>')
|
||||
}
|
||||
}
|
||||
|
||||
function CargaDivs(Tipo) {
|
||||
if (Tipo === "PointGroup") {
|
||||
$("#C_TxtNombre").val("")
|
||||
@@ -356,6 +722,8 @@
|
||||
}
|
||||
|
||||
</script>
|
||||
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places&callback=initMap", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places&callback=initMap", "AIzaSyDsZ4ATb_hVSEpRbBSlS46ZHEOn-0bNIFI") %>"></script>
|
||||
<script src="../Metronic/assets/global/plugins/jquery-minicolors/jquery.minicolors.min.js"></script>
|
||||
<script src="../Metronic/assets/global/plugins/jquery-minicolors/components-color-pickers.min.js"></script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user