Notes
![]() ![]() Notes - notes.io |
/* per ogni oggetto restituito dalla query creo una nuova riga e la aggiungo alla tabella */
function addNewElementsToDom() {
var table = document.getElementById("project_table");
idea_id_arr.forEach(function(item, index, array) {
var tr = document.createElement("tr");
tr.setAttribute("id",item);
var td2 = document.createElement("td");
td2.setAttribute("id","idea_code");
td2.setAttribute("class","idea_code");
tr.setAttribute("idea_code",idea_code_arr[index]);
var node2 = document.createTextNode(idea_code_arr[index]);
var a_link = document.createElement("a");
a_link.setAttribute("href", clarityUrl + "/nu#action:pma.ideaProperties&id=" + item + "&odf_view=idea.gpa_ard_pagina");
a_link.setAttribute("target", "_new");
a_link.appendChild(node2);
td2.appendChild(a_link);
var td3 = document.createElement("td");
td3.setAttribute("id","desbreve");
td3.setAttribute("class","desbreve");
var node3 = document.createTextNode(idea_desbreve_arr[index]);
td3.appendChild(node3);
var td4 = document.createElement("td");
td4.setAttribute("class","sistema");
var node4 = document.createTextNode(idea_sistema_arr[index]);
td4.appendChild(node4);
var td5 = document.createElement("td");
td5.setAttribute("class","attdafare");
var div = document.createElement("div");
div.setAttribute("contentEditable","true");
div.setAttribute("style","width: 100%; height: 100%; display: table-cell; vertical-align: middle; min-width: 40px;");
div.setAttribute("editedFlag","false");
div.setAttribute("value",idea_attdafare_arr[index]);
tr.setAttribute("attdafare",idea_attdafare_arr[index]);
div.setAttribute("onkeyup","javascript:change(this,event,"+ item +" , " + index + ");");
div.setAttribute("id","attdafare");
div.setAttribute("attrName","attdafare");
div.setAttribute("class","attdafare");
var node5 = document.createTextNode(idea_attdafare_arr[index]/*.split('n').join(' ')*/);
div.appendChild(node5);
td5.appendChild(div);
var td6 = document.createElement("td");
var res = idea_attsegn_list_arr[index].split(",");
var res_code = idea_attsegn_code_list_arr[index].split(",");
var sel = document.createElement("select");
sel.setAttribute("class","attsegn_list");
sel.setAttribute("editedFlag","false");
sel.setAttribute("attrName","attsegn");
sel.setAttribute("onchange","javascript:changeList(this,event,"+ item +");");
var opt = document.createElement("option");
opt.setAttribute("value","-");
var opt_node = document.createTextNode("-");
opt.appendChild(opt_node);
sel.appendChild(opt);
var valueIndex = 0;
res.forEach(function(item, index2, array) {
var opt = document.createElement("option");
opt.setAttribute("value",res_code[index2]);
var opt_node = document.createTextNode(res[index2]);
opt.appendChild(opt_node);
sel.appendChild(opt);
if(idea_attsegn_arr[index] == res[index2]) {
valueIndex=index2+1;
sel.setAttribute("value",res_code[index2]);
tr.setAttribute("attsegn",res_code[index2]);
} else {
sel.setAttribute("value","-");
tr.setAttribute("attsegn","-");
}
});
sel.selectedIndex = valueIndex;
td6.setAttribute("class","attsegn");
td6.appendChild(sel);
var td7 = document.createElement("td");
td7.setAttribute("class","desmacroatt");
var div = document.createElement("div");
div.setAttribute("contentEditable","true");
div.setAttribute("style","width: 100%; height: 100%; display: table-cell; vertical-align: middle; min-width: 40px; min-width: 40px;");
div.setAttribute("editedFlag","false");
div.setAttribute("value",idea_desmacroatt_arr[index]);
tr.setAttribute("desmacroatt",idea_desmacroatt_arr[index]);
div.setAttribute("onkeyup","javascript:change(this,event,"+ item +", " + index + ");");
div.setAttribute("id","desmacroatt");
div.setAttribute("attrName","desmacroatt");
div.setAttribute("class","desmacroatt");
var node5 = document.createTextNode(idea_desmacroatt_arr[index]);
div.appendChild(node5);
td7.appendChild(div);
var td8 = document.createElement("td");
td8.setAttribute("class","entroil");
td8.setAttribute("value",idea_entroil_arr[index]);
tr.setAttribute("entroil",idea_entroil_arr[index]);
td8.setAttribute("onkeyup","javascript:change(this,event,"+ item +" , " + index + ");");
td8.setAttribute("id","entroil" + item);
td8.setAttribute("onclick", "openCalend(this,"+item+");");
var inp = document.createElement("input");
inp.setAttribute("type","text");
inp.setAttribute("editedFlag","false");
inp.setAttribute("class","datepicker");
inp.setAttribute("focusID","focusID" + item);
inp.setAttribute("attrName","entroil");
inp.setAttribute("onchange","dateChanged(this,event,"+ item +");");
if(idea_entroil_arr[index] == "2100-01-01") {
var node8 = document.createTextNode("-");
} else {
var node8 = document.createTextNode(idea_entroil_arr[index]);
}
td8.appendChild(node8);
td8.appendChild(inp);
var td9 = document.createElement("td");
var res = idea_incarico_list_arr[index].split(",");
var res_code = idea_incarico_code_list_arr[index].split(",");
var sel = document.createElement("select");
sel.setAttribute("class","incarico_list");
sel.setAttribute("editedFlag","false");
sel.setAttribute("attrName","incarico");
sel.setAttribute("onchange","javascript:changeList(this,event,"+ item +");");
var opt = document.createElement("option");
opt.setAttribute("value","-");
var opt_node = document.createTextNode("-");
opt.appendChild(opt_node);
sel.appendChild(opt);
var valueIndex = 0;
res.forEach(function(item, index2, array) {
var opt = document.createElement("option");
opt.setAttribute("value",res_code[index2]);
var opt_node = document.createTextNode(res[index2]);
opt.appendChild(opt_node);
sel.appendChild(opt);
if(idea_incarico_arr[index] == res[index2]) {
valueIndex=index2+1;
sel.setAttribute("value",res_code[index2]);
tr.setAttribute("incarico",res_code[index2]);
} else {
sel.setAttribute("value","-");
tr.setAttribute("incarico","-");
}
});
sel.selectedIndex = valueIndex;
td9.setAttribute("class","incarico");
td9.appendChild(sel);
var td10 = document.createElement("td");
td10.setAttribute("class","kudriver");
var div = document.createElement("div");
div.setAttribute("contentEditable","true");
div.setAttribute("style","width: 100%; height: 100%; display: table-cell; vertical-align: middle; min-width: 40px;");
div.setAttribute("editedFlag","false");
div.setAttribute("class","kudriver");
div.setAttribute("value",idea_kudriver_arr[index]);
tr.setAttribute("kudriver",idea_kudriver_arr[index]);
div.setAttribute("attrName","kudriver");
div.setAttribute("onkeyup","javascript:change(this,event,"+ item +" , " + index + ");");
var node10 = document.createTextNode(idea_kudriver_arr[index]);
div.appendChild(node10);
td10.appendChild(div);
var td11 = document.createElement("td");
td11.setAttribute("class","kusvi");
var div = document.createElement("div");
div.setAttribute("contentEditable","true");
div.setAttribute("style","width: 100%; height: 100%; display: table-cell; vertical-align: middle; min-width: 40px;");
div.setAttribute("contenteditable","true");
div.setAttribute("editedFlag","false");
div.setAttribute("class","kusvi");
div.setAttribute("value",idea_kusvi_arr[index]);
tr.setAttribute("kusvi",idea_kusvi_arr[index]);
div.setAttribute("attrName","kusvi");
div.setAttribute("onkeyup","javascript:change(this,event,"+ item +" , " + index + ");");
var node11 = document.createTextNode(idea_kusvi_arr[index]);
div.appendChild(node11);
td11.appendChild(div);
var td12 = document.createElement("td");
td12.setAttribute("class","kutec");
var div = document.createElement("div");
div.setAttribute("contentEditable","true");
div.setAttribute("style","width: 100%; height: 100%; display: table-cell; vertical-align: middle; min-width: 40px;");
div.setAttribute("contenteditable","true");
div.setAttribute("editedFlag","false");
div.setAttribute("class","kutec");
div.setAttribute("value",idea_kutec_arr[index]);
tr.setAttribute("kutec",idea_kutec_arr[index]);
div.setAttribute("attrName","kutec");
div.setAttribute("onkeyup","javascript:change(this,event,"+ item +" , " + index + ");");
var node12 = document.createTextNode(idea_kutec_arr[index]);
div.appendChild(node12);
td12.appendChild(div);
var td13 = document.createElement("td");
td13.setAttribute("class","rm_it_name");
var node13 = document.createTextNode(idea_rm_it_name_arr[index]);
td13.appendChild(node13);
var td14 = document.createElement("td");
var res = idea_statodigital_list_arr[index].split(",");
var res_code = idea_statodigital_code_list_arr[index].split(",");
var sel = document.createElement("select");
sel.setAttribute("class","statodigital_list");
sel.setAttribute("editedFlag","false");
sel.setAttribute("attrName","statodigital");
sel.setAttribute("onchange","javascript:changeList(this,event,"+ item +");");
var opt = document.createElement("option");
opt.setAttribute("value","-");
var opt_node = document.createTextNode("-");
opt.appendChild(opt_node);
sel.appendChild(opt);
var valueIndex = 0;
res.forEach(function(item, index2, array) {
var opt = document.createElement("option");
opt.setAttribute("value",res_code[index2]);
var opt_node = document.createTextNode(res[index2]);
opt.appendChild(opt_node);
sel.appendChild(opt);
if(idea_statodigital_arr[index] == res[index2]) {
valueIndex=index2+1;
sel.setAttribute("value",res_code[index2]);
tr.setAttribute("statodigital",res_code[index2]);
} else {
sel.setAttribute("value","-");
tr.setAttribute("statodigital","-");
}
});
sel.selectedIndex = valueIndex;
td14.setAttribute("class","statodigital");
td14.appendChild(sel);
var td15 = document.createElement("td");
var res = idea_statotec_list_arr[index].split(",");
var res_code = idea_statotec_code_list_arr[index].split(",");
var sel = document.createElement("select");
sel.setAttribute("class","statotec_list");
sel.setAttribute("editedFlag","false");
sel.setAttribute("attrName","statotec");
sel.setAttribute("onchange","javascript:changeList(this,event,"+ item +");");
var opt = document.createElement("option");
opt.setAttribute("value","-");
var opt_node = document.createTextNode("-");
opt.appendChild(opt_node);
sel.appendChild(opt);
var valueIndex = 0;
res.forEach(function(item, index2, array) {
var opt = document.createElement("option");
opt.setAttribute("value",res_code[index2]);
var opt_node = document.createTextNode(res[index2]);
opt.appendChild(opt_node);
sel.appendChild(opt);
if(idea_statotec_arr[index] == res[index2]) {
valueIndex=index2+1;
sel.setAttribute("value",res_code[index2]);
tr.setAttribute("statotec",res_code[index2]);
} else {
sel.setAttribute("value","-");
tr.setAttribute("statotec","-");
}
});
sel.selectedIndex = valueIndex;
td15.setAttribute("class","statotec");
td15.appendChild(sel);
var td16 = document.createElement("td");
td16.setAttribute("class","dataprod");
var node16 = document.createTextNode(idea_dataprod_arr[index]);
td16.appendChild(node16);
var td17 = document.createElement("td");
td17.setAttribute("class","flag");
var node17 = document.createTextNode(idea_flag_arr[index]);
td17.appendChild(node17);
var td18 = document.createElement("td");
td18.setAttribute("class","datautente");
var node18 = document.createTextNode(idea_datautente_arr[index]);
td18.appendChild(node18);
var td19 = document.createElement("td");
var btn1 = document.createElement("INPUT");
btn1.setAttribute("type", "button");
btn1.setAttribute("value", "Salva");
btn1.setAttribute("id","saveBtn" + item);
btn1.setAttribute("onclick", "save(this, " + item + ");");
btn1.setAttribute("count","0");
btn1.setAttribute("rowID",item);
btn1.setAttribute("class", "button");
btn1.disabled = true;
td19.appendChild(btn1);
var td20 = document.createElement("td");
td20.setAttribute("class","tipo_mon_bool");
var node20 = document.createTextNode(idea_tipo_mon_bool_arr[index]);
td20.appendChild(node20);
// CODICE
tr.appendChild(td2);
// Descrizione
tr.appendChild(td3);
// Sistema primario
tr.appendChild(td4);
// RM IT
tr.appendChild(td13);
// ALERT
tr.appendChild(td6);
// STATO DIGITAL DRIVER
tr.appendChild(td14);
// STATO TECNOLOGIE
tr.appendChild(td15);
// DETTAGLIO RICHIESTA
tr.appendChild(td7);
// COSE DA FARE
tr.appendChild(td5);
// Entro il
tr.appendChild(td8);
// IN CARICO A
tr.appendChild(td9);
// KU SVILUPPO
tr.appendChild(td11);
// KU DIGITAL DRIVER
tr.appendChild(td10);
// KU TECNOLOGIE
tr.appendChild(td12);
// PIANIFICAZIONE IT PER PRODUZIONE
tr.appendChild(td18);
// DATA RELEASE PIANIFICATA
tr.appendChild(td16);
// ARCHITETTURA
tr.appendChild(td17);
// INNOVAZIONE
tr.appendChild(td20);
// SALVA LE MODIFICHE
tr.appendChild(td19);
table.appendChild(tr);
jQuery.datepicker.regional['it'] = {clearText: 'Effacer', clearStatus: '',
closeText: 'Fermer', closeStatus: 'Fermer sans modifier',
prevText: '<Préc', prevStatus: 'Voir le mois précédent',
nextText: 'Suiv>', nextStatus: 'Voir le mois suivant',
currentText: 'Courant', currentStatus: 'Voir le mois courant',
monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
'Log','Ago','Set','Ott','Nov','Dic'],
monthStatus: 'Voir un autre mois', yearStatus: 'Voir un autre année',
weekHeader: 'Sm', weekStatus: '',
dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'],
dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'],
dayStatus: 'Utiliser DD comme premier jour de la semaine', dateStatus: 'Choisir le DD, MM d',
dateFormat: 'dd/mm/yy', firstDay: 1,
initStatus: 'Choisir la date', isRTL: false};
jQuery.datepicker.setDefaults(jQuery.datepicker.regional['it']);
jQuery(".datepicker").datepicker({ dateFormat: 'dd/mm/yy' });
});
}
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team