[5de7549] | 1 | |
---|
| 2 | function InfoContent(id){ |
---|
| 3 | |
---|
| 4 | for (var i = 0; i < INFO_DATATABLE.signatures.length; i++) { |
---|
| 5 | if (parseInt(INFO_DATATABLE.signatures[i]['documentRevision']) == parseInt(id)){ |
---|
| 6 | |
---|
| 7 | var html1 = ""; |
---|
| 8 | |
---|
| 9 | html1 += '<font style="font-size: 14pt">'; |
---|
| 10 | html1 += '<table class="table table-hover" width="100%" id="data" >'; |
---|
| 11 | html1 += '<tr>'; |
---|
| 12 | html1 += '<td style="text-align: left" width="700"><b>Nombre del firmante:</b> </td>'; |
---|
| 13 | html1 += '<td style="text-align: left" width="500"><span> '+INFO_DATATABLE.signatures[i]['nameOfTheSigner']+'</span></td>'; |
---|
| 14 | html1 += '</tr>'; |
---|
| 15 | html1 += '<tr>'; |
---|
| 16 | html1 += '<td style="text-align: left"><b>Fecha en que se realiza la firma:</b> </td>'; |
---|
| 17 | html1 += '<td style="text-align: left"><span> '+INFO_DATATABLE.signatures[i]['signedOn']+'</span></td>'; |
---|
| 18 | html1 += '</tr>'; |
---|
| 19 | html1 += '<tr>'; |
---|
| 20 | html1 += '<td style="text-align: left"><b>Chequea la integridad de la firma:</b> </td>'; |
---|
| 21 | html1 += '<td style="text-align: left"><span> '+INFO_DATATABLE.signatures[i]['integrityCheck']+'</span></td>'; |
---|
| 22 | html1 += '</tr>'; |
---|
| 23 | html1 += '<tr>'; |
---|
| 24 | html1 += '<td style="text-align: left"><b>El certificado todavía está válido:</b> </td>'; |
---|
| 25 | html1 += '<td style="text-align: left"><span> '+INFO_DATATABLE.signatures[i]['signerCertificateStillValid']+'</span></td>'; |
---|
| 26 | html1 += '</tr>'; |
---|
| 27 | html1 += '<tr>'; |
---|
| 28 | html1 += '<td style="text-align: left"><b>Fecha de fin de validez del certificado:</b> </td>'; |
---|
| 29 | html1 += '<td style="text-align: left"><span> '+INFO_DATATABLE.signatures[i]['signerCertificateValidFrom']+'</span></td>'; |
---|
| 30 | html1 += '</tr>'; |
---|
| 31 | html1 += '<tr>'; |
---|
| 32 | html1 += '<td style="text-align: left"><b>Fecha de fin de validez del certificado:</b> </td>'; |
---|
| 33 | html1 += '<td style="text-align: left"><span>' +INFO_DATATABLE.signatures[i]['signerCertificateValidTo']+'</span></td>'; |
---|
| 34 | html1 += '</tr>'; |
---|
| 35 | html1 += '<tr>'; |
---|
| 36 | html1 += '<td style="text-align: left" ><b>El certificado es válido en el momento de la firma:</b> </td>'; |
---|
| 37 | html1 += '<td style="text-align: left" ><span> '+INFO_DATATABLE.signatures[i]['signerCertificateValidAtTimeOfSigning']+'</span></td>'; |
---|
| 38 | html1 += '</tr>'; |
---|
| 39 | html1 += '<tr>'; |
---|
| 40 | html1 += '<td style="text-align: left" ><b>Tipo de firma de archivo PDF:</b> </td>'; |
---|
| 41 | html1 += '<td style="text-align: left"><span> '+INFO_DATATABLE.signatures[i]['signatureType']+'</span></td>'; |
---|
| 42 | html1 += '</tr>'; |
---|
| 43 | html1 += '<tr>'; |
---|
| 44 | html1 += '<td style="text-align: left"><b>Estampilla de tiempo:</b> </td>'; |
---|
| 45 | html1 += '<td style="text-align: left"><span> '+INFO_DATATABLE.signatures[i]['timeStamp']+'</span></td>'; |
---|
| 46 | html1 += '</tr>'; |
---|
| 47 | html1 += '<tr>'; |
---|
| 48 | html1 += '<td style="text-align: left"><b>Razón de la firma:</b> </td>'; |
---|
| 49 | html1 += '<td style="text-align: left"><span> '+INFO_DATATABLE.signatures[i]['reason']+'</span></td>'; |
---|
| 50 | html1 += '</tr>'; |
---|
| 51 | html1 += '<tr>'; |
---|
| 52 | html1 += '<td style="text-align: left"><b>Ubicación donde se realiza la firma:</b> </td>'; |
---|
| 53 | html1 += '<td style="text-align: left"><span> '+INFO_DATATABLE.signatures[i]['location']+'</span></td>'; |
---|
| 54 | html1 += '</tr>'; |
---|
| 55 | html1 += '<tr>'; |
---|
| 56 | html1 += '<td style="text-align: left"><b>Nombre alternativo del firmante:</b> </td>'; |
---|
| 57 | html1 += '<td style="text-align: left"><span> '+INFO_DATATABLE.signatures[i]['alternativeNameOfTheSigner']+'</span></td>'; |
---|
| 58 | html1 += '</tr>'; |
---|
| 59 | html1 += '<tr>'; |
---|
| 60 | html1 += '<td style="text-align: left"><b>La firma abarca todo el documento PDF:</b> </td>'; |
---|
| 61 | html1 += '<td style="text-align: left"><span>' +INFO_DATATABLE.signatures[i]['signatureCoversWholeDocument']+'</span></td>'; |
---|
| 62 | html1 += '</tr>'; |
---|
| 63 | html1 += '<tr>'; |
---|
| 64 | html1 += '<td style="text-align: left" ><b>Tipo de subfiltro: /adbe.pkcs7.sha1, /adbe.pkcs7.detached:</b> </td>'; |
---|
| 65 | html1 += '<td style="text-align: left" ><span> '+INFO_DATATABLE.signatures[i]['filterSubtype']+'</span></td>'; |
---|
| 66 | html1 += '</tr>'; |
---|
| 67 | html1 += '<tr>'; |
---|
| 68 | html1 += '<td style="text-align: left"><b>Sujeto firmante:</b> </td>'; |
---|
| 69 | html1 += '<td style="text-align: left"><span><font style="font-size: 8pt">' +INFO_DATATABLE.signatures[i]['signerCertificateSubject']+'</font></span></td>'; |
---|
| 70 | html1 += '</tr>'; |
---|
| 71 | html1 += '<td style="text-align: left" ><b>Algoritmo de cifrado:</b> </td>'; |
---|
| 72 | html1 += '<td style="text-align: left" ><span> '+INFO_DATATABLE.signatures[i]['encryptionAlgorithm']+'</span></td>'; |
---|
| 73 | html1 += '</tr>'; |
---|
| 74 | html1 += '<tr>'; |
---|
| 75 | html1 += '<td style="text-align: left" ><b>Servicio de estampillado de tiempo:</b> </td>'; |
---|
| 76 | html1 += '<td style="text-align: left"><span> '+INFO_DATATABLE.signatures[i]['timeStampService']+'</span></td>'; |
---|
| 77 | html1 += '</tr>'; |
---|
| 78 | html1 += '<tr>'; |
---|
| 79 | html1 += '<td style="text-align: left"><b>Algoritmo hash (reseña):</b> </td>'; |
---|
| 80 | html1 += '<td style="text-align: left"><span> '+INFO_DATATABLE.signatures[i]['digestAlgorithm']+'</span></td>'; |
---|
| 81 | html1 += '</tr>'; |
---|
| 82 | html1 += '<tr>'; |
---|
| 83 | html1 += '<td style="text-align: left"><b>Certificado verificado contra el repositorio de certificados confiables:</b> </td>'; |
---|
| 84 | html1 += '<td style="text-align: left"><span> '+INFO_DATATABLE.signatures[i]['certificatesVerifiedAgainstTheKeyStore']+'</span></td>'; |
---|
| 85 | html1 += '</tr>'; |
---|
| 86 | html1 += '<tr>'; |
---|
| 87 | html1 += '<td style="text-align: left"><b>Número de revisión del documento PDF:</b> </td>'; |
---|
| 88 | html1 += '<td style="text-align: left"><span> '+INFO_DATATABLE.signatures[i]['documentRevision']+'</span></td>'; |
---|
| 89 | html1 += '</tr>'; |
---|
| 90 | html1 += '<tr>'; |
---|
| 91 | html1 += '<td style="text-align: left"><b>Número total de revisiones del documento PDF:</b> </td>'; |
---|
| 92 | html1 += '<td style="text-align: left"><span> '+INFO_DATATABLE.signatures[i]['totalDocumentRevisions']+'</span></td>'; |
---|
| 93 | html1 += '</tr>'; |
---|
| 94 | html1 += '<tr>'; |
---|
| 95 | html1 += '<td style="text-align: left"><b>Información de contacto del firmante:</b> </td>'; |
---|
| 96 | html1 += '<td style="text-align: left"><span>' +INFO_DATATABLE.signatures[i]['contactInfo']+'</span></td>'; |
---|
| 97 | html1 += '</tr>'; |
---|
| 98 | html1 += '<tr>'; |
---|
| 99 | html1 += '<td style="text-align: left" ><b>Estampilla de tiempo verificada:</b> </td>'; |
---|
| 100 | html1 += '<td style="text-align: left" ><span> '+INFO_DATATABLE.signatures[i]['timeStampVerified']+'</span></td>'; |
---|
| 101 | html1 += '</tr>'; |
---|
| 102 | html1 += '<tr>'; |
---|
| 103 | html1 += '<td style="text-align: left"><b>Emisor del certificado firmante:</b> </td>'; |
---|
| 104 | html1 += '<td style="text-align: left"><span><font style="font-size: 8pt">' +INFO_DATATABLE.signatures[i]['signerCertificateIssuer']+'</font></span></td>'; |
---|
| 105 | html1 += '</tr>';; |
---|
| 106 | html1 += '</table>'; |
---|
| 107 | html1 += '</font>'; |
---|
| 108 | |
---|
| 109 | $('div#Dialogo-table').append(html1); |
---|
| 110 | } |
---|
| 111 | } |
---|
| 112 | } |
---|
| 113 | |
---|
| 114 | function Dialog(id){ |
---|
| 115 | document.getElementById("Dialogo").innerHTML = '\ |
---|
| 116 | <style>\ |
---|
| 117 | .modal .modal-dialog { width: 80%; height: 80%, };\ |
---|
| 118 | </style>\ |
---|
| 119 | <div id="myModal" class="modal fade" role="dialog">\ |
---|
| 120 | <div class="modal-dialog">\ |
---|
| 121 | <div class="modal-content">\ |
---|
| 122 | <div id = "title" class="modal-header">\ |
---|
| 123 | <!--<button type="button" class="close" data-dismiss="modal">×</button>-->\ |
---|
| 124 | <h4 class="modal-title text-primary"><center>Información de la Sign('+id+')</center></h4>\ |
---|
| 125 | </div>\ |
---|
| 126 | <div id = "body" class="modal-body">\ |
---|
| 127 | <br>\ |
---|
| 128 | <div id="Dialogo-table"></div>\ |
---|
| 129 | </div>\ |
---|
| 130 | <div class="modal-footer">\ |
---|
| 131 | <button type="button" id="informacion" data-dismiss="modal">Close</button>\ |
---|
| 132 | </div>\ |
---|
| 133 | </div>\ |
---|
| 134 | </div>\ |
---|
| 135 | </div>'; |
---|
| 136 | |
---|
| 137 | InfoContent(id); |
---|
| 138 | |
---|
| 139 | } |
---|
| 140 | |
---|
| 141 | |
---|
| 142 | function DataTablePDF(response){ |
---|
| 143 | $(document).ready(function () { |
---|
| 144 | var table = $('#myJson').DataTable({ |
---|
| 145 | language: { |
---|
| 146 | "lengthMenu": "Mostrar _MENU_ registros", |
---|
| 147 | "zeroRecords": "No hay resultados - Disculpe", |
---|
| 148 | "info": "Mostrando pagina _PAGE_ de _PAGES_", |
---|
| 149 | "search": "Buscar:", |
---|
| 150 | "infoEmpty": "No records available", |
---|
| 151 | "infoFiltered": "(filtered from _MAX_ total records)" |
---|
| 152 | }, |
---|
| 153 | columnDefs: [ |
---|
| 154 | {"className": "dt-center", "targets": "_all"} |
---|
| 155 | ], |
---|
| 156 | order: [[ 1, 'desc' ]], |
---|
| 157 | data: response.signatures, |
---|
| 158 | columns: [ |
---|
| 159 | {title: "Nombre del firmante", data: "nameOfTheSigner" }, |
---|
| 160 | {title: "Fecha en que se realiza la firma", data: "signedOn"}, |
---|
| 161 | {title: "Chequea la integridad de la firma", data: "integrityCheck"}, |
---|
| 162 | {title: "El certificado todavía está válido", data: "signerCertificateStillValid"}, |
---|
| 163 | {title: "Fecha de inicio de validez del certificado", data: "signerCertificateValidFrom"}, |
---|
| 164 | {title: "Fecha de fin de validez del certificado", data: "signerCertificateValidTo"}, |
---|
| 165 | {title: "El certificado es válido en el momento de la firma", data: "signerCertificateValidAtTimeOfSigning"}, |
---|
| 166 | {title: "Tipo de firma de archivo PDF", data: "signatureType"}, |
---|
| 167 | {title: "Estampilla de tiempo", data: "timeStamp"}, |
---|
| 168 | {title: " Razón de la firma", data: "reason"}, |
---|
| 169 | {title: "Ubicación donde se realiza la firma", data: "location"}, |
---|
| 170 | {title: "Nombre alternativo del firmante", data: "alternativeNameOfTheSigner"}, |
---|
| 171 | {title: "La firma abarca todo el documento PDF", data: "signatureCoversWholeDocument"}, |
---|
| 172 | {title: "Tipo de subfiltro: /adbe.pkcs7.sha1, /adbe.pkcs7.detached", data: "filterSubtype"}, |
---|
| 173 | {title: "Sujeto firmante", data: "signerCertificateSubject"}, |
---|
| 174 | {title: "Algoritmo de cifrado", data: "encryptionAlgorithm"}, |
---|
| 175 | {title: "Servicio de estampillado de tiempo", data: "timeStampService"}, |
---|
| 176 | {title: "Algoritmo hash (reseña)", data: "digestAlgorithm"}, |
---|
| 177 | {title: "Certificado verificado contra el repositorio de certificados confiables", data: "certificatesVerifiedAgainstTheKeyStore"}, |
---|
| 178 | {title: "Número de revisión del documento PDF", data: "documentRevision"}, |
---|
| 179 | {title: "Número total de revisiones del documento PDF", data: "totalDocumentRevisions"}, |
---|
| 180 | {title: "Información de contacto del firmante", data: "contactInfo", style:"width: 2px;"}, |
---|
| 181 | {title: "Estampilla de tiempo verificada", data: "timeStampVerified"}, |
---|
| 182 | {title: "Emisor del certificado firmante", data: "signerCertificateIssuer"}, |
---|
| 183 | {title:"Información", data: function(event){ |
---|
| 184 | return '<button id="informacion" type="input" class="btn btn-success btn-sm" data-toggle="modal" data-target="#myModal" onclick="javascript:Dialog('+event.documentRevision+')">Info(<font color="red">'+event.documentRevision+'</font>)</button>'; |
---|
| 185 | } |
---|
| 186 | } |
---|
| 187 | ], |
---|
| 188 | dom: 'Bfrtip', |
---|
| 189 | columnDefs: [ |
---|
| 190 | { |
---|
| 191 | "targets": [ 2,3,4,5,6,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23 ], |
---|
| 192 | "visible": false, |
---|
| 193 | //"searchable": false |
---|
| 194 | }, |
---|
| 195 | |
---|
| 196 | ], |
---|
| 197 | buttons: [ |
---|
| 198 | { |
---|
| 199 | extend: 'pageLength', |
---|
| 200 | text: 'Mostrar Filas', |
---|
| 201 | titleAttr: 'Mostrar Filas', |
---|
| 202 | }, |
---|
| 203 | { |
---|
| 204 | extend: 'print', |
---|
| 205 | text: 'Imprimir', |
---|
| 206 | title: 'Contenido de la Firma', |
---|
| 207 | message: 'Datos de la Firma', |
---|
| 208 | titleAttr: 'Imprimir', |
---|
| 209 | exportOptions: { |
---|
| 210 | columns: [ 0,1,2,3,4,5,6,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23] |
---|
| 211 | } |
---|
| 212 | }, |
---|
| 213 | { |
---|
| 214 | extend: 'excelHtml5', |
---|
| 215 | text: 'XLXS', |
---|
| 216 | title: 'Contenido de la Firma', |
---|
| 217 | titleAttr: 'Excel', |
---|
| 218 | message: 'Datos de la Firma', |
---|
| 219 | exportOptions: { |
---|
| 220 | columns: [ 0,1,2,3,4,5,6,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23] |
---|
| 221 | } |
---|
| 222 | }, |
---|
| 223 | { |
---|
| 224 | extend: 'csvHtml5', |
---|
| 225 | text: 'CSV', |
---|
| 226 | title: 'Contenido de la Firma', |
---|
| 227 | titleAttr: 'CSV', |
---|
| 228 | exportOptions: { |
---|
| 229 | columns: [ 0,1,2,3,4,5,6,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23] |
---|
| 230 | } |
---|
| 231 | }, |
---|
| 232 | { |
---|
| 233 | extend: 'pdfHtml5', |
---|
| 234 | text: 'PDF', |
---|
| 235 | titleAttr: 'PDF', |
---|
| 236 | title: 'Contenido de la Firma', |
---|
| 237 | download: 'open', |
---|
| 238 | customize: function (doc){ |
---|
| 239 | doc.defaultStyle.fontSize = 3; |
---|
| 240 | doc.styles.tableHeader.fontSize = 4; |
---|
| 241 | doc.styles.tableHeader.fillColor = "#0085a1"; |
---|
| 242 | }, |
---|
| 243 | //orientation: 'landscape', |
---|
| 244 | pageSize: 'A3', |
---|
| 245 | exportOptions: { |
---|
| 246 | columns: [ 0,1,2,3,4,5,6,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23] |
---|
| 247 | |
---|
| 248 | } |
---|
| 249 | } |
---|
| 250 | ] |
---|
| 251 | }); |
---|
| 252 | |
---|
| 253 | }); |
---|
| 254 | } |
---|