source: admin/WebConsole/images/L_Iconos.js @ aabc011

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change on this file since aabc011 was 3ec149c, checked in by alonso <alonso@…>, 15 years ago

git-svn-id: https://opengnsys.es/svn/trunk@1314 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100644
File size: 3.7 KB
Line 
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: 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
11var Menu=0
12var Insertar=1
13var Eliminar=2
14var Modificar=3
15var Consultar=4
16
17// Acciones
18var Sin_accion=0
19var Insertar_registro=1
20var Borrar_registro=2
21var Modificar_registro=3
22var Leer_registro=4
23 
24var currentImg=null;
25
26var IE=(navigator.appName=="Microsoft Internet Explorer");
27var NS=(navigator.appName=="Netscape");
28//-----------------------------------------------------------------------------------------------------
29function consultar(){
30        reset_contextual(-1,-1);
31        id=document.fdatos.identificador.value
32        var whref
33        whref="M_Iconos.php"
34        whref=whref + "?opcion=" + Consultar
35        whref=whref + "&accion=" + Leer_registro
36        whref=whref + "&idicono=" + id
37        window.open(whref,"frame_contenidos")
38}
39//-----------------------------------------------------------------------------------------------------
40function borrar(){
41        reset_contextual(-1,-1);
42        id=document.fdatos.identificador.value
43        var whref
44        whref="M_Iconos.php"
45        whref=whref + "?opcion=" + Eliminar
46        whref=whref + "&accion=" + Leer_registro
47        whref=whref + "&idicono=" + id
48        window.open(whref,"frame_contenidos")
49}     
50//-----------------------------------------------------------------------------------------------------
51function modificar(){
52        reset_contextual(-1,-1);
53        id=document.fdatos.identificador.value
54        var whref
55        whref="M_Iconos.php"
56        whref=whref + "?opcion=" + Modificar
57        whref=whref + "&accion=" + Leer_registro
58        whref=whref + "&idicono=" + id
59        window.open(whref,"frame_contenidos")
60}
61//_____________________________________________________________________________________
62//
63function menu_contextual(o){
64        document.fdatos.identificador.value=o.getAttribute("id")
65        if (currentImg!=null)
66                currentImg.src="../images/iconos/administrar_off.gif"
67        o.src="../images/iconos/administrar_on.gif";
68        currentImg=o;
69        var menuctx=document.getElementById("flo_menu");
70        muestra_contextual(ClickX,ClickY,menuctx);
71}
72//____________________________________________________________________________
73//
74//      Se ejecuta cada vez que se hace click con el puntero del ratón. Se usa para desmarca
75//      cualquier item de menu contextual que estuviese activo
76//____________________________________________________________________________
77function click_de_raton(e){     
78        if(IE){
79                botonraton=event.button
80                event.returnValue=true;
81        }
82        if(NS){
83                botonraton=e.which;
84                e.returnValue=true;
85        }
86}
87//____________________________________________________________________________
88//
89//      Se ejecuta cada vez que se mueve el puntero del ratón. Se usa para capturar coordenadas
90//____________________________________________________________________________
91function move_de_raton(e){     
92        if(IE){
93                ClickX=event.clientX
94                ClickY=event.clientY
95                event.returnValue=true;
96        }
97        if(NS){
98                ClickX=e.clientX
99                ClickY=e.clientY
100                e.returnValue=true;
101        }
102}
103//____________________________________________________________________________
104//
105//      Redirecciona el evento onmousedown a la función de usuario especificada.
106//____________________________________________________________________________
107document.onmousedown = click_de_raton; // Redefine el evento onmousedown
108document.onmousemove = move_de_raton; // Redefine el evento onmousedown
109
110
111
Note: See TracBrowser for help on using the repository browser.