source: admin/WebConsole/jscripts/boot_grub4dos.js @ fa663a6

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-instalacion
Last change on this file since fa663a6 was ee0a327, checked in by Irina Gómez <irinagomez@…>, 6 years ago

#802 #888 Fix error in 8c88e08: NetbootAvanzado? UEFI compatibility

  • Property mode set to 100644
File size: 2.5 KB
Line 
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//________________________________________________________________________________________________________
11// Se utiliza en los botones in y out de las columnas
12// Permite mover los equipos seleccionados desde una columna a otra
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}
55// Se utiliza al enviar el formulario
56// Asigna como valor del campo listOfItems un listado
57// con las correspodendencias nombre plantilla - nombre equipo.
58// Version 1.1.1 - Se identifica plantilla y equipo como necesita el script setclienmode (#802)
59function allSelect()
60{
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++){
66        label = input[i].parentNode.id;
67        // La plantilla 00unknown no existe, no se incluye en el listado
68        if (label === "00unknown") continue;
69
70        for (j=0;j<input[i].length;j++)
71                {
72                        saveString = saveString + label + '|' + input[i].options[j].text + ';';
73                }
74    }
75    document.forms[0].listOfItems.value = saveString;
76}
Note: See TracBrowser for help on using the repository browser.