1 | // ************************************************************************************************************************************************* |
---|
2 | // Libreria de scripts de Javascript |
---|
3 | // Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla |
---|
4 | // Fecha Creación:2003-2004 |
---|
5 | // Fecha Última modificación: Noviembre-2005 |
---|
6 | // Nombre del fichero: L_Iconos.js |
---|
7 | // Descripción : |
---|
8 | // Este fichero implementa las funciones javascript del fichero L_Iconos.php |
---|
9 | // ************************************************************************************************************************************************* |
---|
10 | // Opciones |
---|
11 | var Menu=0 |
---|
12 | var Insertar=1 |
---|
13 | var Eliminar=2 |
---|
14 | var Modificar=3 |
---|
15 | var Consultar=4 |
---|
16 | |
---|
17 | // Acciones |
---|
18 | var Sin_accion=0 |
---|
19 | var Insertar_registro=1 |
---|
20 | var Borrar_registro=2 |
---|
21 | var Modificar_registro=3 |
---|
22 | var Leer_registro=4 |
---|
23 | |
---|
24 | var currentImg=null; |
---|
25 | |
---|
26 | //----------------------------------------------------------------------------------------------------- |
---|
27 | function consultar(){ |
---|
28 | reset_contextual(-1,-1); |
---|
29 | id=document.fdatos.identificador.value |
---|
30 | var whref |
---|
31 | whref="M_Iconos.php" |
---|
32 | whref=whref + "?opcion=" + Consultar |
---|
33 | whref=whref + "&accion=" + Leer_registro |
---|
34 | whref=whref + "&idicono=" + id |
---|
35 | window.open(whref,"frame_contenidos") |
---|
36 | } |
---|
37 | //----------------------------------------------------------------------------------------------------- |
---|
38 | function borrar(){ |
---|
39 | reset_contextual(-1,-1); |
---|
40 | id=document.fdatos.identificador.value |
---|
41 | var whref |
---|
42 | whref="M_Iconos.php" |
---|
43 | whref=whref + "?opcion=" + Eliminar |
---|
44 | whref=whref + "&accion=" + Leer_registro |
---|
45 | whref=whref + "&idicono=" + id |
---|
46 | window.open(whref,"frame_contenidos") |
---|
47 | } |
---|
48 | //----------------------------------------------------------------------------------------------------- |
---|
49 | function modificar(){ |
---|
50 | reset_contextual(-1,-1); |
---|
51 | id=document.fdatos.identificador.value |
---|
52 | var whref |
---|
53 | whref="M_Iconos.php" |
---|
54 | whref=whref + "?opcion=" + Modificar |
---|
55 | whref=whref + "&accion=" + Leer_registro |
---|
56 | whref=whref + "&idicono=" + id |
---|
57 | window.open(whref,"frame_contenidos") |
---|
58 | } |
---|
59 | //_____________________________________________________________________________________ |
---|
60 | // |
---|
61 | function menu_contextual(o){ |
---|
62 | document.fdatos.identificador.value=o.getAttribute("id") |
---|
63 | if (currentImg!=null) |
---|
64 | currentImg.src="../images/iconos/administrar_off.gif" |
---|
65 | o.src="../images/iconos/administrar_on.gif"; |
---|
66 | currentImg=o; |
---|
67 | var coorX=event.clientX; |
---|
68 | var coorY=event.clientY; |
---|
69 | var menuctx=document.getElementById("flo_menu"); |
---|
70 | muestra_contextual(coorX,coorY,menuctx); |
---|
71 | } |
---|
72 | |
---|