/** * Display the form hint for the given field type. * Returns true if the hint was found and displayed else false. */ function showFormHint(type, evt, panelName, extra) { var event = evt || window.event; $("resourceMessage").innerHTML=""; //Challenge if (type == "ChallengeSummary") { $("resourceMessage").insert("(obbligatorio)- Inserisci una nuova sintesi della -. Questa formerà il titolo della- mostrato nelle liste."); } else if (type == "ChallengeTheme") { $("resourceMessage").insert("(obbligatorio)- Seleziona almeno un TEMA associato a questa -. Questi sono usati per raggruppare le -rispetto ai TEMI e formulare raccomandazioni basate sulla corrispondenza di TEMA Puoi inserirne più di uno."); } else if (type == "ChallengeDesc") { $("resourceMessage").insert("(opzionale) - Inserisci una descrizione più dettagliata della -"); } else if (type == "ChallengeTag") { $("resourceMessage").insert("(opzionale) - Tag associati a questa -.Puoi inserire più di un elemento separato da virgola."); } else if (type == "ChallengeTagAdded") { $("resourceMessage").insert("Questa è una lista di tag che hai aggiunto a questa -. Spunta i tag nell'elenco se vuoi cancellarli."); } else if (type == "ChallengeReason") { $("resourceMessage").insert("Descrivi perché pensi che questa - sia rilevante per: "+extra); } else if (type == "Challenges") { $("resourceMessage").insert("Seleziona la - con cui desideri relazionarti: "+extra); // Issues } else if (type == "IssueSummary") { $("resourceMessage").insert("(obbligatorio)- Inserisci la sintesi di una nuova SFIDA. Questa formerà il titolo della SFIDA mostrato nelle liste."); } else if (type == "IssueDesc") { $("resourceMessage").insert("(opzionale) - Inserisci una descrizione più dettagliata della SFIDA"); } else if (type == "IssueChallenges") { $("resourceMessage").insert("(opzionale) - Seleziona una o più - a cui questa SFIDA è collegata."); } else if (type == "IssueTheme") { $("resourceMessage").insert("(obbligatorio)- Seleziona almeno un TEMA associato a questa SFIDA. Questi sono usati per creare cluster di SFIDE rispetto ai TEMI e formulare raccomandazioni basate sulla corrispondenza di TEMA. Puoi inserirne più di uno."); } else if (type == "IssueTag") { $("resourceMessage").insert("(opzionale) - Tag associati a questa SFIDA.Puoi inserire più di un elemento separato da virgola"); } else if (type == "IssueTagAdded") { $("resourceMessage").insert("Questa è una lista di tag che hai aggiunto a questo SFIDA. Spunta i tag nell'elenco se vuoi cancellarli."); } else if (type == "IssueReason") { $("resourceMessage").insert("(opzionale) - Descrivi perché pensi che questa SFIDA sia rilevante per: "+extra); } else if (type == "IssueOtherChallenge") { $("resourceMessage").insert("(opzionale) - Seleziona un'altra - che vuoi collegare a questa SFIDA"); } else if (type == "IssueResource") { $("resourceMessage").insert("(opzionale) - Aggiungi qualsiasi pubblicazione, sito, immagine etc.. che faccia parte di o supporti questa SFIDA. Puoi inserirne più di uno."); // Solutions } else if (type == "SolutionSummary") { $("resourceMessage").insert("(obbligatorio)- Inserisci la sintesi di una nuovaPROPOSTA. Inserisci la sintesi di una nuova"); } else if (type == "SolutionTheme") { $("resourceMessage").insert("(obbligatorio)- Seleziona una o più TEMA Associati a questa PROPOSTA. Queste sono usate per creare cluster diPROPOSTE intorno a TEMI e formulare raccomandazioni basate sulla corrispondenza di TEMA. Puoi inserirne più di uno."); } else if (type == "SolutionPro") { $("resourceMessage").insert("inserisci affermazioni a supporto di questa PROPOSTA. Aggiungi una sintesi dell'affermazione, e se desideri una descrizione completa e/o un url di un sito web che contribuisce a questa affermazione"); } else if (type == "SolutionCon") { $("resourceMessage").insert("inserisci affermazioni contro di questaPROPOSTA. Aggiungi una sintesi dell'affermazione, e se desideri una descrizione completa e/o un url di un sito web che contribuisce a questa affermazione."); } else if (type == "SolutionDesc") { $("resourceMessage").insert("(opzionale) - Inserisci una descrizione più dettagliata della PROPOSTA"); } else if (type == "SolutionTag") { $("resourceMessage").insert("(opzionale) - Tag associati a questa PROPOSTA.Puoi inserire più di un elemento separato da virgola"); } else if (type == "SolutionTagAdded") { $("resourceMessage").insert("Questa è una lista di tag che hai aggiunto a questa PROPOSTA. Spunta i tag nell'elenco se vuoi cancellarli."); } else if (type == "SolutionReason") { $("resourceMessage").insert("(opzionale) - Descrivi perché pensi che questa PROPOSTA sia rilevante per: "+extra); // Claims } else if (type == "ClaimSummary") { $("resourceMessage").insert("(obbligatorio)- Inserisci la sintesi di una nuova - . Questa formerà il titolo della- mostrato nelle liste."); } else if (type == "ClaimTheme") { $("resourceMessage").insert("(obbligatorio)- Seleziona almeno un TEMA associato a questa -. Questi sono usati per creare cluster di - intorno a TEMI e formulare raccomandazioni basate sulla corrispondenza diTEMA. Puoi inserirne più di uno."); } else if (type == "ClaimDesc") { $("resourceMessage").insert("(opzionale) - Inserisci una descrizione più dettagliata della -"); } else if (type == "ClaimReason") { $("resourceMessage").insert("(opzionale) - Descrivi perché pensi che questa - sia rilevante per: "+extra); } else if (type == "ClaimTag") { $("resourceMessage").insert("(opzionale) - Tag associati a questa -.Puoi inserire più di un elemento separato da virgola"); } else if (type == "ClaimTagAdded") { $("resourceMessage").insert("Questa è una lista di tag che hai aggiunto a questa -. Spunta i tag nell'elenco se vuoi cancellarli."); // Evidence } else if (type == "EvidenceSummary") { $("resourceMessage").insert("(obbligatorio)- Inserisci una sintesi della ARGOMENTAZIONE. Questa formerà il titolo della ARGOMENTAZIONE mostrato nelle liste."); } else if (type == "EvidenceDesc") { $("resourceMessage").insert("(opzionale) - Inserisci una descrizione più dettagliata della ARGOMENTAZIONE"); } else if (type == "EvidenceWebsites") { $("resourceMessage").insert("(opzionale) - Aggiungi qualsiasi pubblicazione, sito, immagine etc.. che faccia parte di o supporti questa ARGOMENTAZIONE. Puoi inserirne più di uno."); } else if (type == "EvidenceTheme") { $("resourceMessage").insert("(obbligatorio)- Seleziona almeno un tema TEMA associato a questa affermazione. Queste sono usate per creare cluster di ARGOMENTAZIONI intorno TEMI a e formulare raccomandazioni basate sulla corrispondenza di TEMA . Puoi inserirne più di uno."); } else if (type == "EvidenceType") { $("resourceMessage").insert("(obbligatorio)- Seleziona il tipo di ARGOMENTAZIONE che vuoi inoltrare - quello di default è Argument, ma se puoi essere più specifico potrebbe essere utile. "); } else if (type == "EvidenceTag") { $("resourceMessage").insert("(opzionale) - Tag associati a questa ARGOMENTAZIONE. Puoi inserire più di un elemento separato da virgola"); } else if (type == "EvidenceTagAdded") { $("resourceMessage").insert("Questa è una lista di tag che hai aggiunto a questa ARGOMENTAZIONE. Spunta i tag nell'elenco se vuoi cancellarli."); } else if (type == "EvidenceReason") { $("resourceMessage").insert("(opzionale) - Descrivi perché pensi che questa ARGOMENTAZIONE sia rilevante per: "+extra); } else if (type == "EvidenceProjects") { $("resourceMessage").insert("(opzionale) - Aggiungi qualsiasi PROGETTI, SERVIZI O INIZIATIVE associato a questo ARGOMENTAZIONE. Puoi inserirne più di uno."); } else if (type == "EvidenceOrganizations") { $("resourceMessage").insert("(opzionale) - Aggiungi qualsiasi SOGGETTI O ORGANIZZAZIONI associato a questo ARGOMENTAZIONE. Puoi inserirne più di uno."); // Resource } else if (type == "Resources") { $("resourceMessage").insert("(opzionale) - Inserisci qualsiasi risorsa web che possa supportare la tua ARGOMENTAZIONE"); } else if (type == "RemoteEvidenceResources") { $("resourceMessage").insert("(opzionale) - Inserisci qualsiasi FONTI wen a supporto della tua ARGOMENTAZIONE. L'URL del sito in cui ti trovi dovrebbe essere stato inserito automaticamente per te, così come l'eventuale testo selezionato."); } else if (type == "OrgResources") { $("resourceMessage").insert("(opzionale) - Per favore aggiungi il sito per questo soggetto o progetto, e qualsiasi altra risorsa web che pensi possa essere utile per esplorare questo elemento. Puoi inserirne più di uno."); } else if (type == "ResourceClip") { $("resourceMessage").insert("Questo è il testo che hai selezionato sul sito "); } else if (type == "ResourceType") { $("resourceMessage").insert("(obbligatorio)- Seleziona il tipo di FONTE che vuoi inoltrare - quello di default è Web Resource, che include il sito web e qualsiasi altro url che non sia una pubblicazione."); } else if (type == "ResourceTheme") { $("resourceMessage").insert("(obbligatorio)- Seleziona almeno un TEMA associato a questa FONTE. Questi sono usati per creare cluster di FONTI intorno a TEMI e formulare raccomandazioni basate sulla corrispondenza di TEMA. Puoi inserirne più di uno."); } else if (type == "ResourceTitle") { $("resourceMessage").insert("(obbligatorio)- inserisci un titolo per la FONTE. Se non completi il titolo, verrà utilizzato l'URL, che potrebbe non essere l'ideale. Tieni presente che questo titolo verrà utilizzato in tutti gli elenchi di questo FONTE

Se lo desideri, puoi utilizzare il pulsante freccia alla fine del campo URL per provare a recuperare il titolo dalla pagina del sito automaticamente."); } else if (type == "ResourceURL") { $("resourceMessage").insert("(obbligatorio)- Inserisci l'url della FONTE"); } else if (type == "ResourceDOI") { $("resourceMessage").insert("(opzionale) - Inserisci il DOI della pubblicazione che desideri inserire, se conosciuto."); } else if (type == "ResourceTag") { $("resourceMessage").insert("(opzionale) - Tag associati a questa FONTE. Puoi inserire più di un elemento separato da virgola"); } else if (type == "ResourceTagAdded") { $("resourceMessage").insert("Questa è una lista di tag che hai aggiunto a questa FONTE. Spunta i tag nell'elenco se vuoi cancellarli."); } else if (type == "ResourceReason") { $("resourceMessage").insert("(opzionale) - Descrivi perché pensi che questa FONTE sia rilevante per: "+extra); } else if (type == "ResourceProjects") { $("resourceMessage").insert("(opzionale) - Aggiungi qualsiasi PROGETTI, SERVIZI O INIZIATIVE associato a questa FONTE. Puoi inserirne più di uno."+extra); } else if (type == "ResourceOrganizations") { $("resourceMessage").insert("(opzionale) - Aggiungi qualsiasi SOGGETTI O ORGANIZZAZIONI associato a questa FONTE. Puoi inserirne più di uno."+extra); // organization / project } else if (type == "OrgType") { $("resourceMessage").insert("(obbligatorio)- Seleziona se stai aggiungendo informazioni relative a un SOGGETTO O ORGANIZZAZIONE o PROGETTO, SERVIZIO O INIZIATIVA"); } else if (type == "OrgTown") { $("resourceMessage").insert("(opzionale) - Città dove il SOGGETTO O ORGANIZZAZIONE o PROGETTO, SERVIZIO O INIZIATIVA è localizzato. Perchè il soggetto SOGGETTI O ORGANIZZAZIONI/PROGETTI, SERVIZI O INIZIATIVE appaia sulla mappa devi inserire almeno una città."); } else if (type == "OrgCountry") { $("resourceMessage").insert("(opzionale) - Paese in cui ilSOGGETTO O ORGANIZZAZIONE o PROGETTO, SERVIZIO O INIZIATIVA è localizzato"); } else if (type == "OrgTheme") { $("resourceMessage").insert("(obbligatorio)- Seleziona almeno un TEMA di interesse per SOGGETTI O ORGANIZZAZIONI/PROGETTI, SERVIZI O INIZIATIVE. Questi sono usati per creare cluster di SOGGETTO O ORGANIZZAZIONE e PROGETTO, SERVIZIO O INIZIATIVA ormulare raccomandazioni basate sulla corrispondenza di TEMA. Puoi inserirne più di uno."); } else if (type == "OrgName") { $("resourceMessage").insert("(obbligatorio)- Il nome del SOGGETTO O ORGANIZZAZIONE o PROGETTO, SERVIZIO O INIZIATIVA."); } else if (type == "OrgPartner") { $("resourceMessage").insert("(opzionale) - SOGGETTI O ORGANIZZAZIONI o PROGETTI, SERVIZI O INIZIATIVE con cui la la tua organizzazione SOGGETTO O ORGANIZZAZIONE o PROGETTO, SERVIZIO O INIZIATIVA ha una collaborazione stabile. Puoi inserirne più di uno."); } else if (type == "OrgDesc") { $("resourceMessage").insert("(opzionale) - Inserisci una descrizione più dettagliata del tuo SOGGETTO O ORGANIZZAZIONE o PROGETTO, SERVIZIO O INIZIATIVA"); } else if (type == "OrgWebsites") { $("resourceMessage").insert("(opzionale) - per favore aggiungi il sito per questa SOGGETTO O ORGANIZZAZIONE o PROGETTO, SERVIZIO O INIZIATIVA e qualsiasi altra risorsa FONTI e qualsiasi altra risorsa web che pensi possa essere utile per esplorare questo elemento. Puoi inserirne più di uno."); } else if (type == "OrgDates") { $("resourceMessage").insert("(opzionale) - es: \'14 May 2008\' or \'14-05-2008\'"); } else if (type == "OrgChallenges") { $("resourceMessage").insert("(opzionale) - Seleziona qualsiasi - che pensi possa essere associata a questa SOGGETTI O ORGANIZZAZIONI o PROGETTI, SERVIZI O INIZIATIVE"); } else if (type == "OrgProjects") { $("resourceMessage").insert("(opzionale) - Aggiungi qualsiasi PROGETTI, SERVIZI O INIZIATIVE che questa SOGGETTO O ORGANIZZAZIONE gestisce direttamente. Puoi inserirne più di uno."); } else if (type == "OrgTag") { $("resourceMessage").insert("(opzionale) - Tag associati a questa SOGGETTO O ORGANIZZAZIONE/PROGETTO, SERVIZIO O INIZIATIVAPuoi inserire più di un elemento separato da virgola"); } else if (type == "OrgTagAdded") { $("resourceMessage").insert("Questa è una lista di tag che hai aggiunto a questa SOGGETTO O ORGANIZZAZIONE/PROGETTO, SERVIZIO O INIZIATIVA Spunta i tag nell'elenco se vuoi cancellarli."); } else if (type == "OrgReason") { $("resourceMessage").insert("(opzionale) - Descrivi perché pensi che questa SOGGETTO O ORGANIZZAZIONE/PROGETTO, SERVIZIO O INIZIATIVA sia rilevante per: "+extra); } else if (type == "OrgProject") { $("resourceMessage").insert("(opzionale) - Aggiungi qualsiasi PROGETTI, SERVIZI O INIZIATIVE connesso. Puoi inserirne più di uno."); } else if (type == "OrgOrg") { $("resourceMessage").insert("(opzionale) - Aggiungi qualsiasi SOGGETTI O ORGANIZZAZIONI connesso. Puoi inserirne più di uno."); // Comments } else if (type == "CommentTag") { $("resourceMessage").insert("(opzionale) - Tag associati a questa SEGNALAZIONEPuoi inserire più di un elemento separato da virgola"); } else if (type == "CommentTagsAdded") { $("resourceMessage").insert("Questa è una lista di tag che hai aggiunto a questo SEGNALAZIONE. Spunta i tag nell'elenco se vuoi cancellarli."); } else if (type == "CommentDesc") { $("resourceMessage").insert("(obbligatorio)- Inserisci un SEGNALAZIONE qui. Questo può essere lungo quanto vuoi ma non può essere vuoto. Se si utilizza la formattazione, è comunque necessario del testo, ad esempio non può essere solo un'immagine o un video. Il titolo del commento viene creato utilizzando i primi 100 caratteri."); // REMOTE FORMS } else if (type == "RemoteEvidenceSolution") { $("resourceMessage").insert("Inserisci la tua ARGOMENTAZIONE a favore della PROPOSTA. Aggiungi una sintesi della ARGOMENTAZIONE, e se vuoi una descrizione più dettagliata."); } else if (type == "RemoteEvidenceClaim") { $("resourceMessage").insert("Inserisci la tua ARGOMENTAZIONE a favore della -. Aggiungi una sintesi della ARGOMENTAZIONE, e se vuoi una descrizione più dettagliata."); } else if (type == "RemoteEvidenceDesc") { $("resourceMessage").insert("Inserisci una descrizione più dettagliata della ARGOMENTAZIONE (opzionale) "); } else if (type == "RemoteEvidenceType") { $("resourceMessage").insert("Seleziona il tipo di ARGOMENTAZIONE che vuoi inoltrare - quello di default è Argument, ma se puoi essere più specifico potrebbe essere utile. "); // QUICK FORMS } else if (type == "ThemeQuickP") { $("resourceMessage").insert("Seleziona uno o piùTEMI da associare alla SFIDA, PROPOSTA, ARGOMENTAZIONE e qualsiasi FONTI che vuoi aggiungere. Queste sono usate per creare cluster e formulare raccomandazioni basate sulla corrispondenza di TEMA Puoi inserirne più di uno."); } else if (type == "ThemeQuickR") { $("resourceMessage").insert("Seleziona uno o piùTEMI da associare a questa SFIDA, -, ARGOMENTAZIONE e qualsiasi FONTI che vuoi aggiungere. Queste sono usate per creare cluster e e formulare raccomandazioni basate sulla corrispondenza di TEMA. Puoi inserirne più di uno."); } else if (type == "TagQuickP") { $("resourceMessage").insert("Inserisci uno o più tag da associare alla SFIDA, PROPOSTA, ARGOMENTAZIONE e qualsiasi FONTI che vuoi aggiungere - separato da virgola (opzionale) "); } else if (type == "TagQuickR") { $("resourceMessage").insert("Type in uno o piùtags da associare a the SFIDA, -, ARGOMENTAZIONE and any FONTI che vuoi aggiungere - separato da virgola (opzionale) "); } else if (type == "IssueQuick") { $("resourceMessage").insert("Inserisci la sintesi di una nuova SFIDA . Questa formerà il titolo della"); } else if (type == "SolutionQuick") { $("resourceMessage").insert("Inserisci la sintesi di una nuova PROPOSTA. Questa formerà il titolo della"); } else if (type == "ClaimQuick") { $("resourceMessage").insert("Inserisci la sintesi di una nuova -. Questa formerà il titolo."); } else if (type == "EvidenceQuickP") { $("resourceMessage").insert("Inserisci la tua ARGOMENTAZIONE per la PROPOSTA. Aggiungi la sintesi della ARGOMENTAZIONE, e se vuoi una descrizione più dettagliata."); } else if (type == "EvidenceQuickR") { $("resourceMessage").insert("Inserisci la tua ARGOMENTAZIONE per la -. Aggiungi la sintesi della ARGOMENTAZIONE, e se vuoi una descrizione più dettagliata."); } else if (type == "EvidenceTypeQuick") { $("resourceMessage").insert("Seleziona il tipo diARGOMENTAZIONE che vuoi inoltrare - quello di default è Argument, ma se puoi essere più specifico potrebbe essere utile. "); } else if (type == "OrgQuickP") { $("resourceMessage").insert("Seleziona un SOGGETTO O ORGANIZZAZIONE o PROGETTO, SERVIZIO O INIZIATIVA da associare alla SFIDA, PROPOSTA e ARGOMENTAZIONE che vuoi inserire. Se non è nella lista, per favore aggiungila. (opzionale) "); } else if (type == "OrgQuickR") { $("resourceMessage").insert("Seleziona un SOGGETTO O ORGANIZZAZIONE o PROGETTO, SERVIZIO O INIZIATIVA da associare allaSFIDA, - e ARGOMENTAZIONE che vuoi inserir. Se non è nella lista, per favore aggiungila. (opzionale) "); // OTHER } else if (type == "CompendiumTheme") { $("resourceMessage").insert("(obbligatorio)- Seleziona almeno unTEMA da associare a tutti i dati che stai importando. Puoi inserirne più di uno."); } else if (type == "BibtexTheme") { $("resourceMessage").insert("(obbligatorio)- Seleziona almeno unTEMA da connettere a tutte le pubblicazioni che vengono importate. Puoi inserirne più di uno."); } else { return false; } showHint(event, panelName, 10, -10); return true; } /** * Display the quick form navigation hint for the given field type. * Returns true if the hint was found and displayed else false. */ function showQuickFormNavHint(type, evt, panelName, extra) { var event = evt || window.event; $("resourceMessage").innerHTML=""; if (type == "IssueQuickForm") { $('resourceMessage').insert("Clicca per visualizzare le sezione SFIDA del form"); } else if (type == "SolutionQuickForm") { $('resourceMessage').insert("Clicca per visualizzare le sezione PROPOSTA del form"); } else if (type == "ClaimQuickForm") { $('resourceMessage').insert("Clicca per visualizzare le sezione- del form"); } else if (type == "EvidenceQuickForm") { $('resourceMessage').insert("Clicca per visualizzare le sezione ARGOMENTAZIONE del form"); } else if (type == "ResourceQuickForm") { $('resourceMessage').insert("Clicca per visualizzare le sezione FONTI del form"); } else if (type == "ThemeQuickForm") { $('resourceMessage').insert("Clicca per visualizzare le sezione TEMI del form"); } else { return false; } showHint(event, panelName, 10, -10); return true; } /** * Remove the given multiple for the given type at the given index */ function removeMultiple(key, i) { var answer = confirm("Sei sicuro di voler rimuovere questo elemento? Questa azione non può essere annullata!"); if(answer){ if ($(key+'form') && $(key+'field'+i)) { if( $(key+'form').childElements()[0].nodeName.toUpperCase() != "HR"){ $(key+'field'+i).remove(); try { $(key+'hr'+ i).remove(); } catch (err) { // do nowt } if($(key+'form').childElements()[0] && $(key+'form').childElements()[0].nodeName.toUpperCase() == "HR"){ $(key+'form').childElements()[0].remove(); } } } } return; } /** * Add another resource block */ function addResource(noResources) { if($('resourceform').childElements().length != 0){ $('resourceform').insert('
'); } var newitem = '
'; newitem += ''; newitem += ''; newitem += '
'; newitem += ''; newitem += '
'; newitem += '
Seleziona una FONTE esistente
'; newitem += '
'; newitem += '
'; newitem += ''; newitem += '
'; newitem += '
'; newitem += '
'; newitem += '
'; newitem += ''; newitem += '
'; newitem += '
'; newitem += ''; newitem += '
'; newitem += ''; newitem += 'Elimina
'; newitem += '
'; newitem += '
'; $('resourceform').insert(newitem); noResources++; return noResources; } function addResourceEvents(targetname) { for (var i=0; i < noResources; i++) { if ($('resourceremovebutton-'+i)) { Event.observe($('resourceremovebutton-'+i),"click", function(){ validateResourceNext(targetname); }); Event.stopObserving('resourceremovebutton-'+i,'keyup'); Event.observe($('resourceremovebutton-'+i),"keyup", function(){ validateResourceNext(targetname); }); } if ($('resourceurl-'+i)) { Event.stopObserving('resourceurl-'+i,'input'); Event.stopObserving('resourceurl-'+i,'change'); Event.stopObserving('resourceurl-'+i,'keyup'); Event.observe($('resourceurl-'+i),"input", function(){ validateResourceNext(targetname); }); Event.observe($('resourceurl-'+i),"change", function(){ validateResourceNext(targetname); }); Event.observe($('resourceurl-'+i),"keyup", function(){ validateResourceNext(targetname); }); } if ($('resourcetitle-'+i)) { Event.stopObserving('resourcetitle-'+i,'input'); Event.stopObserving('resourcetitle-'+i,'change'); Event.stopObserving('resourcetitle-'+i,'keyup'); Event.observe($('resourcetitle-'+i),"input", function(){ validateResourceNext(targetname); }); Event.observe($('resourcetitle-'+i),"change", function(){ validateResourceNext(targetname); }); Event.observe($('resourcetitle-'+i),"keyup", function(){ validateResourceNext(targetname); }); } } } function validateResourceNext(targetname) { var allBlank = true; for (var i=0; i < noResources; i++) { if ($('resourceurl-'+i)) { if ( $('resourceurl-'+i).value.trim() != '' && $('resourceurl-'+i).value.trim() != 'http://' && $('resourcetitle-'+i).value.trim() != '') { allBlank = false; } } } if ($(targetname)) { if (!allBlank) { $(targetname).removeAttribute('disabled'); } else { $(targetname).setAttribute('disabled', 'true'); } } } function validateSimpleNext(obj, targetname) { if (obj.value.trim() != '') { $(targetname).removeAttribute('disabled'); } else { $(targetname).setAttribute('disabled', 'true'); } } function openResourceSelector(num) { loadDialog('selector', URL_ROOT+"ui/popups/selector.php?num="+num+"&handler=addSelectedResource&filternodetypes="+encodeURIComponent(RESOURCE_TYPES_STR), 420, 730); } /** * Add another related item block */ function addSeeAlso(noRelated) { if($('relatedform')) { if ($('relatedform').childElements().length != 0){ $('relatedform').insert('
'); } var newitem = '
'; newitem += ''; newitem += ''; newitem += '
'; newitem += ''; newitem += 'Seleziona una FONTE esistente'; newitem += '
'; newitem += '
'; $('relatedform').insert(newitem); noRelated++; } return noRelated; } function openRelatedItemSelector(num) { loadDialog('selector', URL_ROOT+"ui/popups/selector.php?num="+num+"&handler=addSelectedRelatedItem&filternodetypes="+encodeURIComponent(BASE_TYPES_STR)+","+encodeURIComponent(EVIDENCE_TYPES_STR)+","+encodeURIComponent(RESOURCE_TYPES_STR), 420, 730); } //add another theme field function addTheme(noThemes) { if($('themeform').childElements().length != 0){ $('themeform').insert('
'); } var newitem = '
'; newitem += '
'; newitem += '
Elimina
'; newitem += '
'; $('themeform').insert(newitem); noThemes++; return noThemes; } //add another url field function addURL(noURLs){ if($('urlform').childElements().length != 0){ $('urlform').insert('
'); } var newitem = '
'; newitem += ''; newitem += ''; newitem += ''; newitem += ''; newitem += ''; newitem += '
'; $('urlform').insert(newitem); noURLs++; return noURLs; } // add a Project function addProject(noProjects, nodename, nodeid){ // Add the new item into the current box if ($('projectfield'+noProjects)) { $('projectfield'+noProjects).innerHTML = ""; } let newitem = ''; newitem += ''; newitem += 'Elimina'; $('projectfield'+noProjects).insert(newitem); // Add the new selector section noProjects++; let newselector = '
'; newselector += '
Aggiungi un PROGETTO esistente
'; newselector += '
'; $('projectform').insert(newselector); return noProjects; } // remove a Project function removeProject(removeProjectNo){ let removed = false; if($('projectform').childElements().length != 1){ var parent = document.getElementById('projectform'); var child = document.getElementById('projectfield'+removeProjectNo); if (child) { parent.removeChild(child); } removed = true; } return removed; } // add an Organization function addOrganization(noOrganisations, nodename, nodeid){ // Add the new item into the current box if ($('orgfield'+noOrganisations)) { $('orgfield'+noOrganisations).innerHTML = ""; } let newitem = ''; newitem += ''; newitem += 'Elimina'; $('orgfield'+noOrganisations).insert(newitem); // Add the new selector section noOrganisations++; let newselector = '
'; newselector += '
Aggiungi un SOGGETTO esistente
'; newselector += '
'; $('orgform').insert(newselector); return noOrganisations; } // remove an Organization function removeOrganization(removeOrgNo){ let removed = false; if($('orgform').childElements().length != 1){ var parent = document.getElementById('orgform'); var child = document.getElementById('orgfield'+removeOrgNo); if (child) { parent.removeChild(child); } removed = true; } return removed; } // add an Evidence item function addEvidence(noEvidence, nodename, nodeid){ // Add the new item into the current box if ($('evidencefield'+noEvidence)) { $('evidencefield'+noEvidence).innerHTML = ""; } let newitem = ''; newitem += ''; newitem += 'Elimina'; $('evidencefield'+noEvidence).insert(newitem); // Add the new selector section noEvidence++; let newselector = '
'; newselector += '
Aggiungi un ARGOMENTAZIONE esistente
'; newselector += '
'; $('evidenceform').insert(newselector); return noEvidence; } // remove an Evidence item function removeEvidence(removeEvidenceNo){ let removed = false; if($('evidenceform').childElements().length != 1){ var parent = document.getElementById('evidenceform'); var child = document.getElementById('evidencefield'+removeEvidenceNo); if (child) { parent.removeChild(child); } removed = true; } return removed; } //add a partner organization function addPartner(noPartners) { if($('partnerform').childElements().length != 0){ $('partnerform').insert('
'); } var newitem = '
'; newitem += ''; newitem += 'Elimina'; newitem += '
'; $('partnerform').insert(newitem); noPartners++; return noPartners; } function toggleChallenges() { if ( $("groupsdiv").style.display == "flex") { $("groupsdiv").style.display = "none"; $("groupsimg").innerHTML = 'Show '; } else { $("groupsdiv").style.display = "flex"; $("groupsimg").innerHTML = 'Hide '; } } function typeChangedResource(num) { var type = $('resource'+num+'menu').value; if (type == "Publication") { $('identifierdiv-'+num).style.display = ""; } else { $('identifierdiv-'+num).style.display = "none"; } } function typeChangedProject() { if ($('datediv')) { $('datediv').style.display = ""; } if ($('projectdiv')) { $('projectdiv').style.display = "none"; } } function typeChangedOrg() { if ($('startdate')) { $('startdate').value=""; } if ($('enddate')) { $('enddate').value=""; } if ($('datediv')) { $('datediv').style.display = "none"; } if ($('projectdiv')) { $('projectdiv').style.display = "block"; } } /** * Fetch the website title and description from the website page for the url passed. */ function autoCompleteWebsiteDetails() { var urlvalue = $('url').value; if (urlvalue == "" || urlvalue == "http://") { alert("Devi prima inserire un URL"); return; } var reqUrl = SERVICE_ROOT + "&method=autocompleteurldetails&url="+encodeURIComponent(urlvalue); new Ajax.Request(reqUrl, { method:'get', onSuccess: function(transport){ var json = transport.responseText.evalJSON(); if(json.error){ //alert(json.error[0].message); return; } $('title').value = json.url[0].title; } }); } /** * Fetch the website title and description from the website page for the url passed. */ function autoCompleteWebsiteDetailsMulti(num) { var urlvalue = $('resourceurl-'+num).value; if (urlvalue == "" || urlvalue == "http://") { alert("Devi prima inserire un URL"); return; } var reqUrl = SERVICE_ROOT + "&method=autocompleteurldetails&url="+encodeURIComponent(urlvalue); new Ajax.Request(reqUrl, { method:'get', onSuccess: function(transport){ var json = transport.responseText.evalJSON(); if(json.error){ //alert(json.error[0].message); return; } $('resourcetitle-'+num).value = json.url[0].title; } }); } /** * Hide all other steps apart from stepshow. */ function switchSteps(stepcount, stepshow) { for (var count=1; count<= stepcount; count++) { $('stepdiv'+count).style.display = "none"; } $('stepdiv'+stepshow).style.display = "block"; }