source: admin/WebConsole/comandos/jscripts/EjecutarScripts.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: 2.9 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:2003-2004
5// Fecha Última modificación: Marzo-2005
6// Nombre del fichero: EjecutarScripts.js
7// Descripción :
8//              Este fichero implementa las funciones javascript del fichero EjecutarScripts.php (Comandos)
9// *************************************************************************************************************************************************
10 function confirmar(){
11        if (comprobar_datos()){
12                if(confirm(TbMsg[0])){
13                        document.fdatos.pseudocodigo.value=convierte_a_pseudocodigo("#!/bin/bash \n"+document.fdatos.codigo.value);
14                        document.fdatos.sw_ejya.value=document.fdatosejecucion.sw_ejya.checked
15                        document.fdatosejecucion.sw_seguimiento.value=document.fdatosejecucion.sw_seguimiento[0].checked;
16                        document.fdatos.sw_seguimiento.value=document.fdatosejecucion.sw_seguimiento.value
17                        document.fdatos.sw_mkprocedimiento.value=document.fdatosejecucion.sw_mkprocedimiento.checked
18                        document.fdatos.nwidprocedimiento.value=document.fdatosejecucion.idprocedimiento.value
19                        document.fdatos.nwdescriprocedimiento.value=document.fdatosejecucion.nombreprocedimiento.value
20                        document.fdatos.sw_mktarea.value=document.fdatosejecucion.sw_mktarea.checked
21                        document.fdatos.nwidtarea.value=document.fdatosejecucion.idtarea.value
22                        document.fdatos.nwdescritarea.value=document.fdatosejecucion.nombretarea.value
23                        document.fdatos.submit();
24                }
25        }
26 }
27//________________________________________________________________________________________________________
28  function convierte_a_pseudocodigo(codi){
29          pseudo=""
30          for(var i=0;i<codi.length;i++)
31                  pseudo+=escape(codi.charAt(i));
32         return(pseudo);
33  }
34//________________________________________________________________________________________________________
35  function cancelar(){
36        alert(CTbMsg[0]);
37        location.href="../nada.php"
38  }
39//________________________________________________________________________________________________________
40  function comprobar_datos(){
41        var sw_seguimientocon=document.fdatosejecucion.sw_seguimiento[0].checked;
42        var sw_mkprocedimiento=document.fdatosejecucion.sw_mkprocedimiento.checked;
43        var sw_mktarea=document.fdatosejecucion.sw_mktarea.checked;
44        if (document.fdatos.codigo.value=="" && document.fdatos.userfile.value=="" ) {
45                alert(TbMsg[1]);
46                document.fdatos.codigo.focus();
47                return(false);
48        }
49        if(!sw_seguimientocon && !sw_mkprocedimiento && !sw_mktarea) return(true)
50        if (document.fdatos.titulo.value=="" ) {
51                alert(TbMsg[2]);
52                document.fdatos.titulo.focus();
53                return(false);
54        }
55        if (document.fdatos.descripcion.value=="" ) {
56                alert(TbMsg[3]);
57                document.fdatos.descripcion.focus();
58                return(false);
59        }
60        return(comprobar_datosejecucion())
61}
Note: See TracBrowser for help on using the repository browser.