[eb3e2b8] | 1 | // ************************************************************************************************************************************************* |
---|
| 2 | // Libreria de scripts de Javascript |
---|
| 3 | // Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla |
---|
| 4 | // Fecha Creación: 2009-2010 |
---|
| 5 | // Fecha Última modificación: Agosto-2010 |
---|
| 6 | // Nombre del fichero: CrearImagen.js |
---|
| 7 | // Descripción : |
---|
| 8 | // Este fichero implementa las funciones javascript del fichero CrearImagen.php (Comandos) |
---|
| 9 | // ************************************************************************************************************************************************* |
---|
| 10 | function confirmar() |
---|
| 11 | { |
---|
| 12 | if (!comprobar_datos()) return; |
---|
| 13 | |
---|
| 14 | var RC="@"; |
---|
| 15 | var disco=1; // Siempre disco 1 |
---|
| 16 | var atributos="dsk="+disco+RC; |
---|
| 17 | |
---|
| 18 | var tb_conf=document.getElementById("tabla_conf"); |
---|
[3806a31] | 19 | var ochecks=tb_conf.getElementsByTagName('INPUT'); |
---|
[eb3e2b8] | 20 | for(var i=0;i<ochecks.length;i++){ |
---|
| 21 | if(ochecks[i].checked){ |
---|
| 22 | var parcod=ochecks[i].value.split("_"); |
---|
| 23 | atributos+="par="+parcod[0]+RC; // Número de partición |
---|
| 24 | atributos+="cpt="+parcod[1]+RC; // Código de partición |
---|
| 25 | |
---|
| 26 | var despleimagen=document.getElementById("despleimagen_"+parcod[0]); |
---|
| 27 | var imgcan=despleimagen.value.split("_"); |
---|
| 28 | atributos+="idi="+imgcan[0]+RC; // Identificador de la imagen |
---|
| 29 | atributos+="nci="+imgcan[1]+RC; // Nonbre canónico |
---|
| 30 | |
---|
| 31 | var desplerepositorios=document.getElementById("desplerepositorios_"+parcod[0]); |
---|
| 32 | var idx=desplerepositorios.selectedIndex; |
---|
| 33 | atributos+="ipr="+desplerepositorios.options[idx].value+RC; |
---|
| 34 | break; |
---|
| 35 | } |
---|
| 36 | } |
---|
| 37 | document.fdatosejecucion.atributos.value=atributos; |
---|
| 38 | document.fdatosejecucion.submit(); |
---|
| 39 | } |
---|
| 40 | //________________________________________________________________________________________________________ |
---|
| 41 | function cancelar(){ |
---|
| 42 | alert(CTbMsg[0]); |
---|
| 43 | location.href="../nada.php" |
---|
| 44 | } |
---|
| 45 | //________________________________________________________________________________________________________ |
---|
| 46 | function comprobar_datos() |
---|
| 47 | { |
---|
| 48 | tb_conf=document.getElementById("tabla_conf"); |
---|
[3806a31] | 49 | var ochecks=tb_conf.getElementsByTagName('INPUT'); |
---|
| 50 | var op=0; |
---|
[eb3e2b8] | 51 | for(var i=0;i<ochecks.length;i++){ |
---|
| 52 | if(ochecks[i].checked){ |
---|
| 53 | op++; |
---|
| 54 | var particion=ochecks[i].value.split("_")[0]; |
---|
| 55 | despleimagen=document.getElementById("despleimagen_"+particion); |
---|
[3806a31] | 56 | var p=despleimagen.selectedIndex; |
---|
[eb3e2b8] | 57 | if (p==0){ |
---|
[c870c84] | 58 | alert(TbMsg[0]); |
---|
| 59 | despleimagen.focus(); |
---|
| 60 | return(false) |
---|
[eb3e2b8] | 61 | } |
---|
| 62 | } |
---|
| 63 | } |
---|
| 64 | if(op==0){ |
---|
[c870c84] | 65 | alert(TbMsg[1]); |
---|
| 66 | return(false); |
---|
[eb3e2b8] | 67 | } |
---|
| 68 | return(comprobar_datosejecucion()) |
---|
| 69 | } |
---|
| 70 | |
---|