1 | // ************************************************************************************************************************************************* |
---|
2 | // Libreria de scripts de Javascript |
---|
3 | // Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla |
---|
4 | |
---|
5 | // Fecha Creación:2003-2004 |
---|
6 | // Fecha Última modificación: Marzo-2005 |
---|
7 | // Nombre del fichero: CrearSoftIncremental.js |
---|
8 | // Descripción : |
---|
9 | // Este fichero implementa las funciones javascript del fichero CrearSoftIncremental.php (Comandos) |
---|
10 | // ************************************************************************************************************************************************* |
---|
11 | function confirmar(){ |
---|
12 | if (comprobar_datos()){ |
---|
13 | var cadenaip=document.fdatos.cadenaip.value; |
---|
14 | var identificador=document.fdatos.identificador.value; |
---|
15 | var nombrefuncion=document.fdatos.nombrefuncion.value; |
---|
16 | var ejecutor=document.fdatos.ejecutor.value; |
---|
17 | var tipotrama=document.fdatos.tipotrama.value; |
---|
18 | var ambito=document.fdatos.ambito.value; |
---|
19 | var idambito=document.fdatos.idambito.value; |
---|
20 | var idperfilhard=document.fdatos.idperfilhard.value; |
---|
21 | tb_conf=document.getElementById("tabla_conf"); |
---|
22 | var ochecks=tb_conf.getElementsByTagName('INPUT') |
---|
23 | var perfiles="" |
---|
24 | for(var i=0;i<ochecks.length;i++){ |
---|
25 | if(ochecks[i].checked){ |
---|
26 | var particion=ochecks[i].value |
---|
27 | desple=document.getElementById("desple_"+particion); |
---|
28 | perfiles+=particion+"_"+desple.value+";" |
---|
29 | } |
---|
30 | } |
---|
31 | var wurl="./gestores/gestor_CrearSoftIncremental.php" |
---|
32 | wurl+="?cadenaip="+cadenaip+"&identificador="+identificador+"&nombrefuncion="+nombrefuncion+"&ejecutor="+ejecutor+"&tipotrama="+tipotrama+"&ambito="+ambito+"&idambito="+idambito+"&idperfilhard="+idperfilhard+"&perfiles="+perfiles |
---|
33 | wurl+="&" +compone_urlejecucion(); |
---|
34 | ifr=document.getElementById("iframes_comodin"); // Toma objeto Iframe |
---|
35 | ifr.src=wurl; // LLama a la página gestora |
---|
36 | } |
---|
37 | } |
---|
38 | //________________________________________________________________________________________________________ |
---|
39 | // |
---|
40 | // Cancela la edición |
---|
41 | //________________________________________________________________________________________________________ |
---|
42 | function cancelar(){ |
---|
43 | alert(CTbMsg[0]); |
---|
44 | location.href="../nada.php" |
---|
45 | } |
---|
46 | //________________________________________________________________________________________________________ |
---|
47 | // |
---|
48 | // Comprobar_datos |
---|
49 | //________________________________________________________________________________________________________ |
---|
50 | function comprobar_datos(){ |
---|
51 | tb_conf=document.getElementById("tabla_conf"); |
---|
52 | var ochecks=tb_conf.getElementsByTagName('INPUT') |
---|
53 | var op=0 |
---|
54 | for(var i=0;i<ochecks.length;i++){ |
---|
55 | if(ochecks[i].checked){ |
---|
56 | op++; |
---|
57 | var particion=ochecks[i].value |
---|
58 | desple=document.getElementById("desple_"+particion); |
---|
59 | var p=desple.selectedIndex |
---|
60 | if (p==0){ |
---|
61 | alert(TbMsg[0]) |
---|
62 | desple.focus() |
---|
63 | return(false) |
---|
64 | } |
---|
65 | } |
---|
66 | } |
---|
67 | if(op==0){ |
---|
68 | alert(TbMsg[1]) |
---|
69 | return(false); |
---|
70 | } |
---|
71 | return(comprobar_datosejecucion()) |
---|
72 | } |
---|
73 | //________________________________________________________________________________________________________ |
---|
74 | // |
---|
75 | // Comprobar retorno |
---|
76 | //________________________________________________________________________________________________________ |
---|
77 | function resultado_crearsoftincremental(resul){ |
---|
78 | if (!resul){ |
---|
79 | alert(CTbMsg[1]); |
---|
80 | return |
---|
81 | } |
---|
82 | alert(CTbMsg[2]); |
---|
83 | } |
---|