source: admin/WebConsole/jscripts/boot_grub4dos.js @ 5d05b06

Last change on this file since 5d05b06 was 3aadac3b, checked in by OpenGnSys Support Team <soporte-og@…>, 5 years ago

#980 Update POST /mode to the new ogServer API

This patch selects the machines whose modes need to be changed using the
client's IP rather than their scope names.

  • Property mode set to 100644
File size: 2.5 KB
RevLine 
[f9f08d2]1// *************************************************************************************************************************************************
2// Libreria de scripts de Javascript
3// Autor: Alberto García Padilla (Universidad de Málaga)
4// Fecha Creación: 2012
5// Fecha Última modificación: Mayo-2012
6// Nombre del fichero: boot_grub4dos.js
7// Descripción :
8//              Este fichero implementa las funciones javascript del fichero boot_grub4dos.php
9// *************************************************************************************************************************************************
10//________________________________________________________________________________________________________
[1c74bf5]11// Se utiliza en los botones in y out de las columnas
12// Permite mover los equipos seleccionados desde una columna a otra
[f9f08d2]13function move(fbox, tbox) {
14        var arrFbox = new Array();
15        var arrTbox = new Array();
16        var arrLookup = new Array();
17        var i;
18        for (i = 0; i < tbox.options.length; i++) {
19                arrLookup[tbox.options[i].text] = tbox.options[i].value;
20                arrTbox[i] = tbox.options[i].text;
21        }
22        var fLength = 0;
23        var tLength = arrTbox.length;
24        for(i = 0; i < fbox.options.length; i++) {
25                arrLookup[fbox.options[i].text] = fbox.options[i].value;
26                if (fbox.options[i].selected && fbox.options[i].value != "") {
27                        arrTbox[tLength] = fbox.options[i].text;
28                        tLength++;
29                }
30                else {
31                        arrFbox[fLength] = fbox.options[i].text;
32                        fLength++;
33                  }
34                }
35        arrFbox.sort();
36        arrTbox.sort();
37                fbox.length = 0;
38                tbox.length = 0;
39        var c;
40
41for(c = 0; c < arrFbox.length; c++) {
42var no = new Option();
43no.value = arrLookup[arrFbox[c]];
44no.text = arrFbox[c];
45fbox[c] = no;
46}
47
48for(c = 0; c < arrTbox.length; c++) {
49var no = new Option();
50no.value = arrLookup[arrTbox[c]];
51no.text = arrTbox[c];
52tbox[c] = no;
53    }
54}
[1c74bf5]55// Se utiliza al enviar el formulario
56// Asigna como valor del campo listOfItems un listado
57// con las correspodendencias nombre plantilla - nombre equipo.
[831de70]58// Version 1.1.1 - Se identifica plantilla y equipo como necesita la función createBootMode (#802 #888)
[f9f08d2]59function allSelect()
60{
[1c74bf5]61    var saveString = "";
62    // seleccionamos cada uno de los select
63    var input = document.getElementsByTagName('select');
64
65    for(var i=0; i<input.length; i++){
[831de70]66        // quitamos L inicial
67        patron = "L";
68        parm = input[i].name;
69        parm = parm.replace(patron,'');
[1c74bf5]70
[831de70]71        for (j=0;j<input[i].length;j++) {
[3aadac3b]72            saveString = saveString + parm + '|' + input[i].options[j].value + ';';
[831de70]73        }
[1c74bf5]74    }
[ee0a327]75    document.forms[0].listOfItems.value = saveString;
[f9f08d2]76}
Note: See TracBrowser for help on using the repository browser.