source: admin/WebConsole/comandos/jscripts/comunescomandos.js @ b6906f7

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 b6906f7 was b0dc2e4, checked in by alonso <alonso@…>, 16 years ago

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

  • Property mode set to 100644
File size: 7.0 KB
RevLine 
[b0dc2e4]1//----------------------------------------------------------------------------------------------
2  function comprobar_datosejecucion(){
3
4        // Comprobación de las opciones de ejecución ----------------------------------
5        var sw_ejya=document.fdatosejecucion.sw_ejya.checked;
6        var sw_seguimientocon=document.fdatosejecucion.sw_seguimiento[0].checked;
7        var sw_seguimientosin=document.fdatosejecucion.sw_seguimiento[1].checked;
8
9        var sw_mkprocedimiento=document.fdatosejecucion.sw_mkprocedimiento.checked;
10        var sw_nuevaprocedimiento=document.fdatosejecucion.sw_procedimiento[0].checked;
11        var descripcion_nuevaprocedimiento=document.fdatosejecucion.nombreprocedimiento.value;
12        var sw_procedimientoexistente=document.fdatosejecucion.sw_procedimiento[1].checked;
13
14        var sw_mktarea=document.fdatosejecucion.sw_mktarea.checked;
15        var sw_nuevatarea=document.fdatosejecucion.sw_tarea[0].checked;
16        var descripcion_nuevatarea=document.fdatosejecucion.nombretarea.value;
17        var sw_tareaexistente=document.fdatosejecucion.sw_tarea[1].checked;
18
19        var  pprocedimiento=document.fdatosejecucion.idprocedimiento.selectedIndex
20        var  ptarea=document.fdatosejecucion.idtarea.selectedIndex
21
22        if(!sw_ejya &&  !sw_mkprocedimiento && !sw_mktarea  ){
23                alert("ATENCIÓN.- Debe elegir al menos un modo de ejecución");
24                return(false);
25        }
26
27        // Cuestión procedimiento ------------------------------------------------------------------------------------------------------------------------------
28        if(sw_ejya){
29                if(!sw_seguimientocon && !sw_seguimientosin){
30                        alert("ATENCIÓN.- Debe elegir un modo de ejecución inmediata");
31                        return(false);
32                }
33        }
34        // Cuestión procedimiento ------------------------------------------------------------------------------------------------------------------------------
35        if(sw_mkprocedimiento){
36                if(!sw_nuevaprocedimiento && !sw_procedimientoexistente){
37                        alert("ATENCIÓN.- Debe elegir un modo de inclusión en procedimiento de este comando");
38                        return(false);
39                }
40                if(sw_nuevaprocedimiento && descripcion_nuevaprocedimiento==""){
41                        alert("ATENCIÓN.- Debe especificar el nombre del nuevo procedimiento que se creará y al que se añadirá este comando");
42                        document.fdatosejecucion.nombreprocedimiento.focus();
43                        return(false);
44                }
45                if(sw_procedimientoexistente && pprocedimiento==0){
46                        alert("ATENCIÓN.- Debe elegir el procedimiento al que se añadirá este comando");
47                        document.fdatosejecucion.idprocedimiento.focus();
48                        return(false);
49                }
50        }
51       
52        // Cuestión tarea ------------------------------------------------------------------------------------------------------------------------------
53        if(sw_mktarea){
54                if(!sw_nuevatarea && !sw_tareaexistente){
55                        alert("ATENCIÓN.- Debe elegir un modo de inclusión en tarea ejecutable, de este comando");
56                        return(false);
57                }
58                if(sw_nuevatarea && descripcion_nuevatarea==""){
59                        alert("ATENCIÓN.- Debe especificar el nombre de la nueva tarea ejecutable que se creará y a la que se añadirá este comando");
60                        document.fdatosejecucion.nombretarea.focus();
61                        return(false);
62                }
63                if(sw_tareaexistente && ptarea==0){
64                        alert("ATENCIÓN.- Debe elegir la tarea a la que se añadirá este comando");
65                        document.fdatosejecucion.idtarea.focus();
66                        return(false);
67                }
68        }
69        //-----------------------------------------------------------------------------------------------------------------------------------------------------
70        return(true)
71}
72//____________________________________________________________________________
73function        clic_mktarea(o){
74        if(!o.checked){
75                document.fdatosejecucion.sw_tarea[0].checked=false;
76                document.fdatosejecucion.nombretarea.value="";
77                document.fdatosejecucion.sw_tarea[1].checked=false;
78                document.fdatosejecucion.idtarea.selectedIndex=0;
79        }
80}
81function        clic_nwtarea(o){
82        if(o.checked){
83                document.fdatosejecucion.sw_mktarea.checked=true;
84                document.fdatosejecucion.sw_tarea[1].checked=false;
85                document.fdatosejecucion.idtarea.selectedIndex=0;
86        }
87}
88function        clic_extarea(o){
89        if(o.checked){
90                document.fdatosejecucion.sw_mktarea.checked=true;
91                document.fdatosejecucion.sw_tarea[0].checked=false;
92                document.fdatosejecucion.nombretarea.value="";
93        }
94}
95function        clic_nomtarea(o){
96        document.fdatosejecucion.sw_mktarea.checked=true;
97        document.fdatosejecucion.sw_tarea[0].checked=true;
98        document.fdatosejecucion.idtarea.selectedIndex=0;
99}
100function        clic_mkprocedimiento(o){
101        if(!o.checked){
102                document.fdatosejecucion.sw_procedimiento[0].checked=false;
103                document.fdatosejecucion.nombreprocedimiento.value="";
104                document.fdatosejecucion.sw_procedimiento[1].checked=false;
105                document.fdatosejecucion.idprocedimiento.selectedIndex=0;
106        }
107}
108function        clic_nwprocedimiento(o){
109        if(o.checked){
110                document.fdatosejecucion.sw_mkprocedimiento.checked=true;
111                document.fdatosejecucion.sw_procedimiento[1].checked=false;
112                document.fdatosejecucion.idprocedimiento.selectedIndex=0;
113        }
114}
115function        clic_exprocedimiento(o){
116        if(o.checked){
117                document.fdatosejecucion.sw_mkprocedimiento.checked=true;
118                document.fdatosejecucion.sw_procedimiento[0].checked=false;
119                document.fdatosejecucion.nombreprocedimiento.value="";
120        }
121}
122function        clic_nomprocedimiento(o){
123        document.fdatosejecucion.sw_mkprocedimiento.checked=true;
124        document.fdatosejecucion.sw_procedimiento[0].checked=true;
125        document.fdatosejecucion.idprocedimiento.selectedIndex=0;
126}
127
128function        procedimientoexistente(o){
129        document.fdatosejecucion.sw_mkprocedimiento.checked=true;
130        document.fdatosejecucion.sw_procedimiento[1].checked=true;
131        document.fdatosejecucion.nombreprocedimiento.value="";
132}
133
134function        tareaexistente(o){
135                document.fdatosejecucion.sw_mktarea.checked=true;
136                document.fdatosejecucion.sw_tarea[1].checked=true;
137                document.fdatosejecucion.nombretarea.value="";
138}
139//____________________________________________________________________________
140function        compone_urlejecucion(){
141
142                var wurl=""
143
144                var sw_ejya=document.fdatosejecucion.sw_ejya.checked;
145                var sw_seguimiento=document.fdatosejecucion.sw_seguimiento[0].checked;
146
147                var sw_mkprocedimiento=document.fdatosejecucion.sw_mkprocedimiento.checked;
148                if (document.fdatosejecucion.sw_procedimiento[0].checked){
149                        var nwidprocedimiento=0
150                        var nwdescriprocedimiento=document.fdatosejecucion.nombreprocedimiento.value;
151                }
152                else{
153                        var  p=document.fdatosejecucion.idprocedimiento.selectedIndex
154                        var nwidprocedimiento=document.fdatosejecucion.idprocedimiento.options[p].value
155                        var nwdescriprocedimiento=document.fdatosejecucion.idprocedimiento.options[p].text
156                }
157
158                var sw_mktarea=document.fdatosejecucion.sw_mktarea.checked;
159                if (document.fdatosejecucion.sw_tarea[0].checked){
160                        var nwidtarea=0
161                        var nwdescritarea=document.fdatosejecucion.nombretarea.value;
162                }
163                else{
164                        var  p=document.fdatosejecucion.idtarea.selectedIndex
165                        var nwidtarea=document.fdatosejecucion.idtarea.options[p].value
166                        var nwdescritarea=document.fdatosejecucion.idtarea.options[p].text
167                }
168                wurl+="sw_ejya="+sw_ejya +"&sw_seguimiento="+sw_seguimiento+"&sw_mktarea="+sw_mktarea+"&nwidtarea="+nwidtarea+"&nwdescritarea="+nwdescritarea
169                wurl+="&sw_mkprocedimiento="+sw_mkprocedimiento+"&nwidprocedimiento="+nwidprocedimiento+"&nwdescriprocedimiento="+nwdescriprocedimiento
170                return(wurl)
171}
Note: See TracBrowser for help on using the repository browser.