Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- http://10.172.80.93/Personalizaciones_CGPJ/salidas.asp?IdUser=U0000412&Indice=211&Numero=95168 -->
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
- <html xmlns="http://www.w3.org/1999/xhtml" >
- <head>
- <meta http-equiv="Pragma" content="no-cache">
- <title>Registro de Salida</title>
- <script type="text/javascript" src="./js/jquery-1.4.2.min.js"></script>
- <script type="text/javascript" src="./js/jquery-ui-1.8.custom.min.js"></script>
- <link type="text/css" href="./css/ui-lightness/jquery-ui-1.8.custom.css" rel="stylesheet" />
- <!--<script type="text/javascript" src="./js/jstree/jquery.jstree.js"></script>-->
- <style type="text/css">
- td,span
- {
- font-family: Tahoma, Arial, Verdana;
- font-size:0.8em;
- margin:0;
- padding:0;
- vertical-align: top;
- }
- .Documento
- {
- border: 1px solid #FFFFFF;
- margin: 0;
- padding: 2px;
- text-align: left;
- vertical-align: middle;
- background-color: #ffffff;
- color:#000000;
- cursor:hand;
- white-space: nowrap;
- font-size: 11px;
- }
- .Documento a img {
- vertical-align: middle;
- }
- .Docs
- {
- margin:4px 20px 4px 20px;
- padding:4px;
- border: 1px solid #CCCCCC;
- width: 100%;
- list-style-type: none;
- min-height: 20px;
- }
- .SalidaDoc
- {
- list-style-type: none;
- float: left;
- background-color: #feaade;
- white-space: nowrap;
- }
- .SalidaDoc a
- {
- border: 1px solid #FFFFFF;
- margin: 0;
- padding: 5px;
- text-align: left;
- vertical-align: middle;
- background-color: #ffffff;
- color:#000000;
- cursor:hand;
- font-family: Tahoma, Arial, Verdana;
- white-space: nowrap;
- font-size: 11px;
- }
- .SalidaDoc a .img_borrar {
- float: left;
- display: block;
- width: 20px;
- margin: 0;
- boder: 0 solid;
- }
- .SalidaDoc a img {
- vertical-align: middle;
- }
- .SalidaDoc a:hover {
- background-color: #d1cbaa;
- border: 1px solid #CCCCCC;
- }
- </style>
- <style>
- #draggable { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
- #droppable { width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; }
- </style>
- <link rel="stylesheet" href="styles/FormsEdit.css" type="text/css"/>
- <link rel="stylesheet" href="styles/AuxiliarValuesTable.css" type="text/css"/>
- <script language="javascript" src="scripts/Formularios.js" type="text/jscript"></script>
- <SCRIPT type=text/JavaScript
- src="./customization/scripts/CustomForms.js"></SCRIPT>
- </head>
- <body style="margin:0; padding:0;" onload="" onunload="closeFullWindow();">
- <%
- Response.CodePage = 1252
- Response.CharSet = "iso-88519-1"
- Dim emailpre
- ' DSN de la conexion ODBC a usar para la base de datos
- Dim strFileName
- Dim FSysObj
- Dim TS
- Dim strConnection
- strFileName = Server.MapPath("./App_Code/PixelWebConfig.txt")
- Set FSysObj = Server.CreateObject("Scripting.FileSystemObject")
- Set TS = FSysObj.OpenTextFile(strFileName, 1, False)
- If not TS.AtEndOfStream Then
- Do While not TS.AtendOfStream
- strConnection = TS.ReadLine
- loop
- End If
- TS.Close
- Set TS = Nothing
- Set FSysObj = Nothing
- 'strConnection = "DSN=pixelware;UID=sa;PWD=sgsg+2009;"
- ' Obtengo los valores del querystring
- indice = Request.Querystring("Indice")
- numero = Request.QueryString("Numero")
- iduser = Request.QueryString("IdUser")
- cargoPon = Request.QueryString("cargoPon")
- ' Comprueba los valores pasados
- If ((Len(indice) > 0) and (Len(numero) > 0) and (Len(iduser) > 0)) Then
- ' Procede a ejecutar la sentencia para obtener resultados
- Dim Conn
- Dim rs
- Set Conn = Server.CreateObject("ADOdb.Connection")
- Conn.Open strConnection
- %>
- <script type="text/javascript" language="javascript">
- function checkayuntamiento(value)
- {
- alert(value);
- alert('Hola');
- alert($('#TEXTOAYUNTAMIENTO', window.parent.document).html());
- alert('<%=indice%>');
- alert('<%=TEXTOAYUNTAMIENTO%>');
- alert('<%=DESCMODOENVIO%>');
- var valor = document.getElementById("TEXTOAYUNTAMIENTO");
- var valor5 = document.getElementsByName('TEXTOAYUNTAMIENTO')[0].value
- var valor2 = document.getElementById("TEXTOAYUNTAMIENTO").innerHTML;
- //var elem = $('#salida_'+id);
- var idi = $("#TEXTOAYUNTAMIENTO").val();
- var asdf = $(this).closest('tr').next().find(".AYUNTAMIENTOS").val();
- var valor3 = document.getElementById("PRUEBA");
- var valor4 = document.getElementById("PRUEBA").innerHTML;
- //var elem = $('#salida_'+id);
- var idi2 = $("#PRUEBA").val();
- var asdf2 = $(this).closest('td').next().find(".PRUEBA").val();
- alert(asdf);
- alert(idi);
- alert(valor);
- alert(valor2);
- alert(asdf2);
- alert(idi2);
- alert(valor3);
- alert(valor4);
- alert(valor5);
- }
- </script>
- <script language="javascript" type="text/jscript">
- $.ajaxSetup ({
- cache: false
- });
- $(function() {
- $(".Documento").draggable({
- helper:'clone',
- addClasses:false,
- cursor:'hand',
- scroll:true,
- scrollSensitivity:40,
- scrollSpeed: 40,
- opacity:0.75
- });
- // Llama por AJAX para obtener el listado de modos de envio
- $.get('Salidas_Action.asp?Accion=ModosEnvio',
- function(datos) {
- if ($(datos).find('code')[0].text == "0") {
- var modosenvio = $('#DESCMODOENVIO');
- $(datos).find('modoenvio').each(function(index) {
- modosenvio.append($("<option value='"+$(this).find('id')[0].text+"'>"+$(this).find('desc')[0].text+"</option>"));
- });
- checkFullWindow();
- } else {
- alert($(datos).find('message')[0],text);
- }
- });
- });
- function FilterOptions(id,elem)
- {
- $(elem[0]).find('#AYUNTAMIENTOS').hide();
- $(elem[0]).find('#JUZGADOPAZ').hide();
- //Eliminar los modos de envio que no se van a utilizar dependiendo del destinatario
- switch (id)
- {
- case 18: //Registro General CGPJ
- $(elem[0]).find('#DESCMODOENVIO option:contains(Sistema de Gestión Gubernativa)').remove();
- $(elem[0]).find('#DESCMODOENVIO option:contains(INTERIUS)').remove();
- $(elem[0]).find('#DESCMODOENVIO option:contains(Correo electrónico)').remove();
- break;
- case 21: //Ministerio de Justicia
- case 23: //Otro
- case 24: //Interesado
- case 16221://Ponente
- $(elem[0]).find('#DESCMODOENVIO option:contains(Sistema de Gestión Gubernativa)').remove();
- $(elem[0]).find('#DESCMODOENVIO option:contains(Registro General del CGPJ)').remove();
- $(elem[0]).find('#DESCMODOENVIO option:contains(INTERIUS)').remove();
- break;
- case 16222://Ayuntamiento
- $(elem[0]).find('#DESCMODOENVIO option:contains(Sistema de Gestión Gubernativa)').remove();
- $(elem[0]).find('#DESCMODOENVIO option:contains(Registro General del CGPJ)').remove();
- $(elem[0]).find('#DESCMODOENVIO option:contains(INTERIUS)').remove();
- $(elem[0]).find('#AYUNTAMIENTOS').show();
- case 16223://Juzgado de Paz
- $(elem[0]).find('#DESCMODOENVIO option:contains(Sistema de Gestión Gubernativa)').remove();
- $(elem[0]).find('#DESCMODOENVIO option:contains(Registro General del CGPJ)').remove();
- $(elem[0]).find('#DESCMODOENVIO option:contains(INTERIUS)').remove();
- $(elem[0]).find('#JUZGADOPAZ').show();
- default://Juzgados
- $(elem[0]).find('#DESCMODOENVIO option:contains(Sistema de Gestión Gubernativa)').remove();
- $(elem[0]).find('#DESCMODOENVIO option:contains(Registro General del CGPJ)').remove();
- break;
- }
- }
- function addSalida(valor,id,replicar)
- {
- // Comprueba si se ha abierto en pantalla completa para replicar en el llamante
- if (abiertototal && replicar) {
- window.opener.addSalida(valor,id);
- }
- // Obtiene las variables para sumar la salida
- var listasal = $('#list_salidas');
- var ele0 = listasal.children('#salida0');
- var elesal = listasal.find('#salida_'+id);
- if (elesal.length == 0) {
- var ele0 = listasal.children('#salida0');
- // Crea la nueva salida
- var elenew = ele0.clone().attr("id","salida_"+id).show();
- // Se encarga de poner los datos de la nueva salida
- elenew.find('#name_dest').text(valor);
- elenew.find('#btn_Eliminar').click(
- function() { Delete(id); });
- elenew.find('#btn_Eliminar').hover(
- function() { $(this).parents('li').css('background-color','#e6dec9'); },
- function() { $(this).parents('li').css('background-color','#ffffff'); });
- elenew.find('#DESCMODOENVIO').change(
- function() { changeModoEnvio(id,$('#salida_'+id).find('#DESCMODOENVIO').val()); });
- // Se encarga de obtener los datos de las tablas.
- $.get('Salidas_Action.asp?Accion=Obtain&Id='+id+'&Tabla=PWJSDESTINATARIO&Indice=<%=indice%>&Numero=<%=numero%>',
- function(datos) {
- if ($(datos).find('code')[0].text == "0") {
- elenew.find('#Obteniendo').hide();
- elenew.find('#Destinatario').show();
- elenew.find('#DocInc1').show();
- elenew.find('#DocInc2').show();
- // Obtiene todos los datos, y los asigna en los datos de salida
- var elem = $('#list_salidas').find('#salida_'+$(datos).find('id')[0].text);
- $(elem[0]).find('#NAME').val(''); // Quita el valor de 'Obteniendo datos'
- $(elem[0]).find('#DESCMODOENVIO').val($(datos).find('modoenvio')[0].text);
- FilterOptions(id,elem);
- // Introducimos los datos por defecto
- $(elem[0]).find('#PIXEL_INFO_EMAIL').val($(datos).find('pjemail')[0].text);
- $(elem[0]).find('#INTERIUS').val($(datos).find('pjemail')[0].text);
- switch ($(datos).find('modoenvio')[0].text)
- {
- case "3": // Envio Reg Entrada Tribunal
- case "0": // Envío postal
- elenew.find('#PIXEL_INFO_EMAIL').parents('tr').hide();
- elenew.find('#NAME').parents('tr').hide();
- elenew.find('#TIPODOC').parents('tr').hide();
- break;
- case "1": // Envio por Interus
- //$(elem[0]).find('#EMAIL').val($(datos).find('pjemail')[0].text);
- elenew.find('#PIXEL_INFO_EMAIL').parents('tr').show();
- elenew.find('#INTERIUS').parents('td').show();
- elenew.find('#PIXEL_INFO_EMAIL').parents('td').hide();
- elenew.find('#NAME').parents('tr').hide();
- elenew.find('#TIPODOC').parents('tr').hide();
- break;
- case "2": // Envio email
- if (($(datos).find('nombre').size() > 0) && ($(datos).find('apellido1').size() > 0) && ($(datos).find('apellido2').size() > 0)) {
- $(elem[0]).find('#NAME').val($(datos).find('nombre')[0].text + " " + $(datos).find('apellido1')[0].text + " " + $(datos).find('apellido2')[0].text);
- } else {
- $(elem[0]).find('#NAME').val('');
- elenew.find('#NAME').val('');
- }
- if ($(datos).find('email').length)
- {
- $(elem[0]).find('#PIXEL_INFO_EMAIL').val($(datos).find('email')[0].text);
- }
- else
- {
- if( $(datos).find('pjemail').length)
- {
- $(elem[0]).find('#PIXEL_INFO_EMAIL').val($(datos).find('pjemail')[0].text);
- }
- else
- {
- $(elem[0]).find('#PIXEL_INFO_EMAIL').val('');
- }
- }
- elenew.find('#INTERIUS').parents('td').hide();
- elenew.find('#PIXEL_INFO_EMAIL').parents('tr').show();
- elenew.find('#PIXEL_INFO_EMAIL').parents('td').show();
- elenew.find('#NAME').parents('tr').show();
- elenew.find('#TIPODOC').parents('tr').hide();
- break;
- case "4": // Envio por WS Reg Gen. Entrada CGPJ
- elenew.find('#PIXEL_INFO_EMAIL').parents('tr').hide();
- elenew.find('#NAME').parents('tr').hide();
- elenew.find('#TIPODOC').parents('tr').show();
- break;
- case "5": // Envio Organismos especiales
- //$(elem[0]).find('#EMAIL').val($(datos).find('pjemail')[0].text);
- elenew.find('#PIXEL_INFO_EMAIL').parents('tr').show();
- elenew.find('#PIXEL_INFO_EMAIL').parents('td').show();
- elenew.find('#NAME').parents('tr').hide();
- elenew.find('#TIPODOC').parents('tr').hide();
- break;
- }
- // Obtiene los tipos documentales
- $(datos).find('tipodocumental').each(function(index) {
- elenew.find('#TIPODOC').append($('<option></option>').val($(this).find('iddoccod')[0].text).html($(this).find('nodo')[0].text));
- });
- // Vincula los campos de edicion
- elenew.find('#PIXEL_INFO_EMAIL').bind('propertychange',function(e) {
- if (abiertototal) {
- if ($(this).parents('li').attr('id').indexOf('salida_') == 0) {
- var id = $(this).parents('li').attr('id').substring(7);
- window.opener.$('#salida_'+id).find('#PIXEL_INFO_EMAIL').val($(this).val());
- }
- }
- });
- elenew.find('#NAME').bind('propertychange',function(e) {
- if (abiertototal) {
- if ($(this).parents('li').attr('id').indexOf('salida_') == 0) {
- var id = $(this).parents('li').attr('id').substring(7);
- window.opener.$('#'+id).find('#NAME').val($(this).val());
- }
- }
- });
- elenew.find('#TIPODOC').bind('propertychange',function(e) {
- if (abiertototal) {
- if ($(this).parents('li').attr('id').indexOf('salida_') == 0) {
- var id = $(this).parents('li').attr('id').substring(7);
- window.opener.$('#'+id).find('#TIPODOC').val($(this).val());
- }
- }
- });
- }
- else
- {
- if ($(datos).find('code')[0].text == "23")
- {
- elenew.find('#Destinatario').show();
- elenew.find('#DocInc1').show();
- elenew.find('#DocInc2').show();
- // Obtiene todos los datos, y los asigna en los datos de salida
- var elem = $('#list_salidas').find('#salida_'+$(datos).find('id')[0].text);
- $(elem[0]).find('#NAME').val(''); // Quita el valor de 'Obteniendo datos'
- $(elem[0]).find('#DESCMODOENVIO').val($(datos).find('modoenvio')[0].text);
- $("#DESCMODOENVIO option[value='"+$(datos).find('descmodoenvio')[0].text+"']").attr("selected",true);
- FilterOptions(23,elem);
- elenew.find('#Obteniendo').hide();
- }
- else
- {
- alert($(datos).find('code')[0].text);
- alert($(datos).find('message')[0].text);
- Delete(id);
- }
- }
- });
- // Pone el doc como droppable
- elenew.find('#DOCUS').droppable({
- accept: ".Documento",
- addClasses: false,
- hoverClass: 'drophover',
- tolerance: 'touch',
- drop: function(ev, ui) {
- var id = $(this).parents('li').attr('id').substring(7);
- var iddoc = $(ui.draggable).children(":first").attr('id').substring(4);
- // Comprueba si se ha abierto en pantalla completa para replicar en el llamante
- if (abiertototal) {
- var ele = $(ui.draggable).clone(); //.removeClass("Documento").addClass("SalidaDoc");
- /* OJO: Se debe de poner el evento click cuando se copia en checkFullWindow */
- ele.children(":first").click(function() { delDocumento(id,iddoc); return false; });
- ele.children(":first").children("#img_borrar").removeAttr("style");
- window.opener.$('#salida_'+id).find('#DOCUS').append("<li class='Documento'>"+ele.html()+"</li>");
- }
- var ele = $(ui.draggable).clone(); //.removeClass("Documento").addClass("SalidaDoc");
- ele.children(":first").click(function() { delDocumento(id,iddoc); return false; });
- ele.children(":first").children("#img_borrar").removeAttr("style");
- $(this).append(ele);
- }
- });
- listasal.append(elenew);
- }
- return;
- }
- // Se encarga de poner bien los valores que se asocian al modo de envio
- function changeModoEnvio(id,modoenvio)
- {
- // Comprueba si se ha abierto en pantalla completa para replicar en el llamante
- if (abiertototal) {
- window.opener.changeModoEnvio(id,modoenvio);
- }
- // Cambia el modo de envio
- var elem = $('#salida_'+id);
- if (elem != null) {
- switch (modoenvio)
- {
- case "0": // Envío postal
- case "3": // Envio Reg Entrada Tribunal
- $(elem).find('#PIXEL_INFO_EMAIL').parents('tr').hide();
- $(elem).find('#NAME').parents('tr').hide();
- $(elem).find('#TIPODOC').parents('tr').hide();
- break;
- case "1": // Envio por Interus
- $(elem).find('#INTERIUS').parents('tr').show();
- $(elem).find('#INTERIUS').parents('td').show();
- $(elem).find('#PIXEL_INFO_EMAIL').parents('td').hide();
- $(elem).find('#NAME').parents('tr').hide();
- $(elem).find('#TIPODOC').parents('tr').hide();
- break;
- case "2": // Envio email
- $(elem).find('#PIXEL_INFO_EMAIL').parents('tr').show();
- $(elem).find('#PIXEL_INFO_EMAIL').parents('td').show();
- $(elem).find('#INTERIUS').parents('td').hide();
- $(elem).find('#NAME').parents('tr').show();
- $(elem).find('#TIPODOC').parents('tr').hide();
- break;
- case "4": // Envio por WS Reg Gen. Entrada CGPJ
- $(elem).find('#PIXEL_INFO_EMAIL').parents('tr').hide();
- $(elem).find('#NAME').parents('tr').hide();
- $(elem).find('#TIPODOC').parents('tr').show();
- break;
- case "5": // Envio Organismos especiales
- $(elem).find('#PIXEL_INFO_EMAIL').parents('tr').show();
- $(elem).find('#NAME').parents('tr').hide();
- $(elem).find('#TIPODOC').parents('tr').hide();
- break;
- }
- $(elem).find('#DESCMODOENVIO').val(modoenvio);
- }
- }
- // Se encarga de generar las salidas, a raiz de avanzar la tarea de usuario
- function avanzar()
- {
- // Primero recorre la lista de salidas para detectar si para salida CGPJ no existen documentos, o email no existe email
- var estaokcgpj = true;
- var estaokemail = true;
- var estaokinterius = true;
- $('#list_salidas').find('li').each(function(index) {
- if ($(this).attr('id').indexOf('salida_') == 0) {
- var id = $(this).attr('id').substring(7);
- var modoenvio = $(this).find('#DESCMODOENVIO option:selected').val();
- var email = $(this).find('#PIXEL_INFO_EMAIL').val();
- var interius = $(this).find('#INTERIUS').val();
- var docs = '';
- $(this).find('#iddoc').each(function(index) {
- if (docs.length > 0) {
- docs = docs + ';' + $(this).val()
- } else {
- docs = $(this).val()
- }
- });
- if (modoenvio=='4') { // CGPJ
- if (docs.length <= 0) {
- estaokcgpj = false;
- }
- }
- if (modoenvio=='2') { // EMAIL
- var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
- if (!filter.test(email)) {
- estaokemail = false;
- }
- }
- if (modoenvio=='1'){ //INTERIUS
- if (interius.indexOf('@pnj.cgpj.es') == -1)
- {
- estaokinterius = false;
- }
- }
- }
- });
- if (!estaokcgpj) {
- alert('ERROR. No se puede realizar el avance ya que existe alguna salida al Registro General del CGPJ sin documento asociado.');
- return false;
- }
- if (!estaokemail) {
- alert('ERROR. No se puede realizar el avance ya que existe algún correo electrónico erróneo');
- return false;
- }
- if (!estaokinterius) {
- alert('ERROR. No se puede realizar el avance ya que existe alguna direccion interius errónea');
- return false;
- }
- // Seguidamente recorre las salidas y va realizando el avance
- $('#list_salidas').find('li').each(function(index) {
- if ($(this).attr('id').indexOf('salida_') == 0) {
- var id = $(this).attr('id').substring(7);
- var modoenvio = $(this).find('#DESCMODOENVIO option:selected').val();
- var descmodoenvio = $(this).find('#DESCMODOENVIO option:selected').text();
- if (modoenvio == 1 )
- {
- var email = $(this).find('#INTERIUS').val();
- }else
- {
- var email = $(this).find('#PIXEL_INFO_EMAIL').val();
- }
- var tipodoc = $(this).find('#TIPODOC').val();
- var docs = '';
- $(this).find('#iddoc').each(function(index) {
- if (docs.length > 0) {
- docs = docs + ';' + $(this).val()
- } else {
- docs = $(this).val()
- }
- });
- $.get('Salidas_Action.asp?Accion=Advance&Id='+id+'&Indice=<%=indice%>&Numero=<%=numero%>&ModoEnvio='+modoenvio+'&DescModoEnvio='+descmodoenvio+'&Email='+email+'&TipoDoc='+tipodoc+'&Docs='+docs,
- function(datos) {
- if ($(datos).find('code')[0].text == "0") {
- // El avance se ha realizado correctamente
- } else {
- alert($(datos).find('message')[0].text);
- }
- });
- }
- });
- return true;
- }
- // Se encarga de eliminar un destinatario de salida
- function Delete(id)
- {
- // Comprueba si se ha abierto en pantalla completa para replicar en el llamante
- if (abiertototal) {
- window.opener.Delete(id);
- }
- if ($('#PIXEL_INFO_DESTINATARIO_IDS').val().indexOf(id+';') == 0)
- $('#PIXEL_INFO_DESTINATARIO_IDS').val($('#PIXEL_INFO_DESTINATARIO_IDS').val().substring($('#PIXEL_INFO_DESTINATARIO_IDS').val().indexOf(';')+1))
- else
- $('#PIXEL_INFO_DESTINATARIO_IDS').val($('#PIXEL_INFO_DESTINATARIO_IDS').val().replace(';'+id+';',';'));
- $('#salida_'+id).remove();
- }
- function delDocumento(id,iddoc)
- {
- // Comprueba si se ha abierto en pantalla completa para replicar en el llamante
- if (abiertototal) {
- window.opener.delDocumento(id,iddoc);
- }
- // Se encarga de eliminar el elemento en HTML
- $('#salida_'+id).find('#Doc_'+iddoc).parent().remove();
- }
- </script>
- <script type="text/javascript">
- var abiertototal = false;
- function openFullWindow() {
- if (window.name != 'salidas') {
- url_src = "salida.asp?Indice=<%=indice%>&Numero=<%=numero%>&IdUser=<%=iduser%>";
- w=800;
- h=600;
- if (window.screen) {
- w = window.screen.availWidth;
- h = window.screen.availHeight;
- }
- window.open(url_src, "salidas", "toolbar=no,location=no,directories=no,scrollbars=yes,menubar=no,width="+w+",height="+h+",top=0,left=0");
- }
- }
- function closeFullWindow() {
- if (window.name == 'salidas') {
- // No hace falta recargar, ya que se ha ido haciendo en la ventana padre
- window.close();
- }
- }
- function checkFullWindow() {
- if (window.name == 'salidas') {
- $('#openfullwindow').hide();
- abiertototal=true;
- /* Copia la lista de valores seleccionados */
- $('#PIXEL_INFO_DESTINATARIO_IDS').val(window.opener.$('#PIXEL_INFO_DESTINATARIO_IDS').val());
- /* Procede a replicar la lista de salidas del llamante */
- window.opener.$('#list_salidas').children().each(function(index) {
- if ($(this).attr('id') != 'salida0') {
- var id = $(this).attr('id').substring(7);
- addSalida($(this).find('#name_dest').text(), id, false);
- /* Procede a copiar el valor de los campos */
- $('#salida_'+id).find('#PIXEL_INFO_EMAIL').val($(this).find('#PIXEL_INFO_EMAIL').val());
- $('#salida_'+id).find('#NAME').val($(this).find('#NAME').val());
- $('#salida_'+id).find('#TIPODOC').val($(this).find('#TIPODOC').val());
- /* Procede a copiar la lista de documentos */
- $('#salida_'+id).find('#DOCUS').children().remove();
- $('#salida_'+id).find('#DOCUS').append($(this).find('#DOCUS').html());
- /* Procede a poner cada evento click en cada documento copiado */
- $('#salida_'+id).find('#DOCUS').children().each(function(index) {
- if ($(this).attr('id') != 'doc0') {
- var iddoc = $(this).children(":first").attr('id').substring(4);
- $(this).children(":first").click(function() { delDocumento(id,iddoc); return false; });
- }
- });
- changeModoEnvio(id,$(this).find('#DESCMODOENVIO').val())
- }
- });
- }
- }
- </script>
- <form id="FormSalida">
- <div style="width:30%; float:left; margin: 0; padding: 2px 5px 2px 5px;">
- <FIELDSET>
- <LEGEND style="FONT-FAMILY: Arial; FONT-SIZE: 12px">Datos de la salida</LEGEND>
- <TABLE border=0 cellSpacing=4 cellPadding=3 width="99%">
- <TBODY>
- <TR><td>
- <div>
- <a onclick="openFullWindow();" href="javascript:this.onClick"
- style="float:right; display:block;" id="openfullwindow">
- <IMG id=id_FullScreen border="0" src="./images/fullscreen.jpg" align=absMiddle alt="Pantalla Completa">
- </a>
- </div>
- <DIV class=BotonJerarquico style="text-align:center">
- <A onclick="ArbolJera(this,'PIXEL_INFO_DESTINATARIO','PWJSDESTINATARIO',PIXEL_INFO_DESTINATARIO.value, '<%=iduser%>', 10, 0, '', '', 'DESTINATARIO', 100, true);" href="javascript:this.onClick">
- <IMG id=img_destinatario align=middle src="images/Auxiliares-17.png"> Seleccionar Destinatario/s</A>
- </DIV>
- <div alt="Destinatario" style="display:none">
- <table id="PIXEL_INFO_DESTINATARIO" style="BEHAVIOR: url('./scripts/AuxiliarValuesTable.htc')">
- <TBODY></TBODY>
- </table>
- </div>
- <input type="hidden" id="PIXEL_INFO_DESTINATARIO_IDS" name="PIXEL_INFO_DESTINATARIO_IDS" value=""/>
- </td>
- <tr><td>
- <span style="font-size:0.9em;"><B>Documentos a enviar a los destinatarios</B></span>
- <ul class="Documentos" style="list-style-type: none; height:auto; overflow: auto; overflow-x: none; overflow-y: visible; margin:0 10px 0 10px; padding:4px; border: 1px solid #CCCCCC; ">
- <%
- ' Obtiene la lista de documentos
- strconsulta = "select iddoc,nombredoc from pwsdocpunteros where indice="+indice+" and numero="+numero+" order by fecha_creacion asc"
- Set rs = Conn.Execute(strconsulta)
- ' Comprueba si no existen datos
- If (not rs.EOF) Then
- ' Procede a obtener todos los resultados
- Do While Not rs.EOF
- %>
- <li class="Documento">
- <a href="#" id="Doc_<%=rs("iddoc")%>">
- <img border="0" style="display:none" id='img_borrar' src='images/IMG-Cancelar-17.png' alt='Eliminar documento' />
- <input type="hidden" id="iddoc" value="<%=rs("iddoc")%>"/>
- <img border="0" src="images/applet/icons16/<%
- Dim imagen
- imagen = split(rs("nombredoc"),".")(ubound(split(rs("nombredoc"),".")))
- If (InStr(rs("nombredoc"),".") > 0) Then
- Response.Write imagen + ".png"
- Else
- Response.Write "tiff.png"
- End If %>">
- <span><%
- If (Len(rs("nombredoc")) > 45) Then
- if (Instr(rs("nombredoc"),".")>0) then
- Response.Write Left(split(rs("nombredoc"),".")(0),40) + ".." + split(rs("nombredoc"),".")(1)
- Else
- Response.Write Left (rs("nombredoc"),40)
- End If
- Else
- Response.Write rs("nombredoc")
- End If %></span>
- </a>
- </li>
- <%
- rs.MoveNext
- Loop
- End If
- %>
- </ul>
- <span><u>Modo de asignación:</u> Pulse con el ratón con el botón izquierdo sobre el documento que desee enviar al destinatario, arrastrelo hasta la salida del destinatario y suelte el botón izquierdo.</span>
- </td></TR>
- </TBODY></TABLE>
- </FIELDSET>
- </div>
- <div style="width:60%; float:left; margin: 0; padding: 2px 5px 2px 5px;">
- <FIELDSET>
- <LEGEND style="FONT-FAMILY: Arial; FONT-SIZE: 12px">Salidas a generar</LEGEND>
- <ul id ="list_salidas" style="width:100%; margin: 2px 5px 2px 5px;">
- <li id='salida0' style="display:none; width:95%; margin:4px 0px 4px 0px; padding:4px 10px 4px 10px; border: 1px solid #CCCCCC;">
- <table cellspacing="2">
- <tr id='Obteniendo'>
- <td colspan="4"><b>Obteniendo datos. Espere por favor... </b><img border="0" src='images/cargando.gif' align='middle'/></td>
- </tr>
- <tr id='Destinatario' style="display:none">
- <td width="90px"><u>Destinatario:</u></td>
- <td colspan="2"><span id="name_dest" style="font-weight:bold;"></span></td>
- <td width="32px"><a id="btn_Eliminar" href="#" style="display:block; float:right">
- <img border="0" id='img_cancelar' src='images/IMG-Cancelar-17.png' align='middle' alt='Eliminar salida' />
- </a>
- </td>
- </tr>
- <tr>
- <td width="190px" colspan="2" style="width:150px"><u>Modo envío:</u></td>
- <td width="100%"><select id="DESCMODOENVIO" name="DESCMODOENVIO" class=Lista
- size=1 alt="Modo de envío"></select>
- </td>
- <td width="32px"></td>
- </tr>
- <tr id=AYUNTAMIENTOS style="display:none">
- <td width="190px" colspan="2" style="width:150px"><u>Ayuntamiento:</u></td>
- <td width="100%" id=PRUEBA><TEXTAREA
- style="TEXT-ALIGN: left; BACKGROUND-COLOR: #ffffff; WIDTH: 100%; COLOR: #000000"
- id=TEXTOAYUNTAMIENTO class=Edit alt=Ayuntamiento maxLength=150
- name=TEXTOAYUNTAMIENTO></TEXTAREA></TD>
- <TD><button onclick="checkayuntamiento(document.getElementById('TEXTOAYUNTAMIENTO').value);">Buscar</button></TD>
- </tr>
- <tr style="display:none">
- <td width="190px" colspan="2" style="width:150px"><u>Destinatario:</u></td>
- <td width="100%"><input name="NAME" class="Edit" id="NAME" style="width:100%; text-align: left; background-color: #ffffff; color: #000000;"
- alt="Nombre y apellidos" value="Obteniendo datos"/>
- </td>
- <td width="32px"></td>
- </tr>
- <tr style="display:none">
- <td width="190px" colspan="2" style="width:150px"><u>E-mail:</u></td>
- <td width="100%" style="display: none"><input name=PIXEL_INFO_EMAIL class=Edit id=PIXEL_INFO_EMAIL style=" width:100%; text-align: left; background-color: #ffffff; color: #000000;" alt=Correo electrónico/>
- </td>
- <td width="100%" style="display: none"><input name=INTERIUS class=Edit id=INTERIUS readOnly style=" width:100%; text-align: left; background-color: #e1e1e1; color: #000000;" alt=INTERIUS/>
- </td>
- <td width="32px"></td>
- </tr>
- <tr style="display:none">
- <td width="190px" colspan="2" style="width:150px"><u>Tipo documental:</u></td>
- <td width="100%"><select name="TIPODOC" class="Lista" id="TIPODOC" style="width:100%; text-align: left; background-color: #ffffff; color: #000000;" alt="Tipo documental de salida">
- </select>
- </td>
- <td width="32px"></td>
- </tr>
- <tr id='DocInc1' style="display:none">
- <td width="190px" colSpan="3" ><u>Documentos a incluir:</u></td>
- <td width="32px"></td>
- </tr>
- <tr id='DocInc2' style="display:none">
- <td colSpan="3"><ul class="Docs" id="DOCUS">
- <li id="doc0" style="height:20px;width:0;float:left;"></li>
- </ul></td>
- <td width="32px"></td>
- </tr>
- </table>
- </li>
- </ul>
- </FIELDSET>
- </div>
- <input type="hidden" id="IdUser" name="IdUser" value="<%=iduser%>"/>
- <input type="hidden" id="Indice" name="Indice" value="<%=indice%>"/>
- <input type="hidden" id="Numero" name="Numero" value="<%=numero%>"/>
- </form>
- <%
- Conn.Close
- Else
- Response.Write "ERROR: Fallo en parámetros"
- End If
- %>
- </body>
- </html>
Add Comment
Please, Sign In to add comment