Se ha producido un error al procesar la plantilla.
Expression itemDataTitoloAccordion.repeatableAllegato is undefined on line 27, column 40 in 60216.
1<#assign templateUtility = objectUtil("it.eng.tz.liferay.template.TemplateUtility") /> 2<#assign templateHead = templateUtility.getTemplateInclude("TPL_Include_head")/> 3 4<!--Inclusione template Head--> 5<#include "${templatesPath}/${templateHead}" /> 6<#assign templateGuppiDoc = templateUtility.getTemplateInclude("TPL_Include_GruppiDocumenti" ) /> 7 8<#assign templateListaLink = templateUtility.getTemplateInclude("TPL_INCLUDE_ListaLinkCollegati" ) /> 9 10<#if (.vars['reserved-article-id'].data)?? > 11 <#assign dmaId= .vars['reserved-article-id'].data /> 12</#if> 13 14 15 16<div class="cont-info"> 17 18<#if (denominazione)?? && denominazione?has_content> 19 <h2 class="Titoli-news Titoli-news-home-19">${denominazione.getData()}</h2> 20 </#if> 21<div class="f_left"> 22<#if (immagine.getData())?? && immagine?has_content && immagine.getData()!=""> 23 <div class="cont-img"><!--p style="text-align: center;"--> 24 <!--img class="position_content" src="${immagine.getData()}" alt="" width="auto" height="394" style="margin-bottom:10px;"--> 25 <img class="position_content" src="${immagine.getData()}" alt="" /> 26 <!--/p--></div> 27</#if> 28 29<#if (descrizione.getData())?? && (descrizione.getData())?has_content && descrizione.getData()!=""> 30 <div class="descrizione" id="descrizioneTesto${dmaId}"><p>${descrizione.getData()}</p></div> 31</#if> 32 33 34 <!--Inclusione template Documenti Raggruppati--> 35 <#if (repeatableEtichettaAllegati.getData())?? && (repeatableEtichettaAllegati.getSiblings())?? > 36 <#include "${templatesPath}/${templateGuppiDoc}" /> 37 </#if> 38 39 40 41<#if (repeatableTitoloSezione.getData())?? && repeatableTitoloSezione.getData()!= "" && (repeatableTitoloSezione.getSiblings())?? && repeatableTitoloSezione.getSiblings()?has_content > 42 <div id="contInfoRelazioni${dmaId}"> 43 <#assign intero = 0 /> 44 <#list repeatableTitoloSezione.getSiblings() as cur_repeatableTitoloSezione> 45 <#assign intero = intero+1 /> 46 <#assign idParziale= cur_repeatableTitoloSezione.getData()?replace("[^a-zA-Z0-9]", "", "r")/> 47 <#if intero == 1 && (cur_repeatableTitoloSezione.repeatableRelazioneStruttura.getData())?? && cur_repeatableTitoloSezione.repeatableRelazioneStruttura.getData()== "" && (cur_repeatableTitoloSezione.getData())?? && cur_repeatableTitoloSezione.getData()==""> 48 <script> 49 var contInfoRelazioni = "#contInfoRelazioni${dmaId}"; 50 $(contInfoRelazioni).hide(); 51 if($( "div[id^='idDocEMod']" ).length == 1){ 52 var divSelected = $( "div[id^='idDocEMod']" )[0]; 53 $(divSelected).removeClass( 'closed'); 54 } 55 </script> 56 <#else> 57 <div class ="section toggle-esterno closed"> 58 <h3 class="toggle-head-esterno"> 59 <a href="#${idParziale}" 60 onclick="cercaRelazionati(0, true,'${cur_repeatableTitoloSezione.repeatableRelazioneStruttura.getData()}','${idParziale}','divBottoniContLivello1');"> 61 ${cur_repeatableTitoloSezione.getData()} 62 </a> 63 <#if (cur_repeatableTitoloSezione.repeatableBreveDescrizione)?? && cur_repeatableTitoloSezione.repeatableBreveDescrizione.getData()!=""> 64 <span class="sottotitolo">${cur_repeatableTitoloSezione.repeatableBreveDescrizione.getData()}</span> 65 </#if> 66 </h3> 67 <div class="toggle-body"> 68 <div id = "relazionatiAccordion${idParziale}" class="divBottoniContLivello1"></div> 69 </div></div> 70 </#if> 71</#list> 72 </div> 73 <#else> 74 <script> 75 if($( "div[id^='idDocEMod']" ).length == 1){ 76 var divSelected = $( "div[id^='idDocEMod']" )[0]; 77 $(divSelected).removeClass( 'closed'); 78 } 79 </script> 80 81</#if> 82 83</div> 84 85 86 <#if (repeatableTitoloLink.getData())?? && (repeatableTitoloLink.getData())!="" && repeatableTitoloLink.getSiblings()?has_content> 87 <!--Inclusione template Documenti Raggruppati--> 88 <#include "${templatesPath}/${templateListaLink}" /> 89 </#if> 90 91</div> 92 93 94 <#if (repeatableTitoloLink.getData())?? && (repeatableTitoloLink.getData())!="" && repeatableTitoloLink.getSiblings()?has_content> 95 <script type="text/javascript"> 96 var allegatiPresenti = false; 97 <#if (repeatableEtichettaAllegati.getData())?? && (repeatableEtichettaAllegati.getSiblings())?? > 98 <#list repeatableEtichettaAllegati.getSiblings() as itemDataTitoloAccordion> 99 <#if (itemDataTitoloAccordion.repeatableAllegato.getSiblings())?? > 100 <#list itemDataTitoloAccordion.repeatableAllegato.getSiblings() as itemDataAllegato> 101 <#list itemDataAllegato.getChildren() as itemAllegato> 102 <#if itemAllegato.getData()?has_content> 103 allegatiPresenti = true; 104 </#if> 105 </#list> 106 </#list> 107 </#if> 108 </#list> 109 </#if> 110 if( "${immagine.getData()}" == "" && $(".f_right_2") && $(".f_right_2").html() && $(".f_right_2").html().trim() == ""){ 111 $(".f_left").css("width", "100%"); 112 } else if( $(".f_right_2").html().trim() != ""){ 113 $(".f_right_2").css("width", "25%"); 114 <#if ((repeatableTitoloSezione.getData())?? && repeatableTitoloSezione.getData()?has_content && repeatableTitoloSezione.getData()!= "") || 115 ((descrizione.getData())?? && descrizione.getData()?has_content && descrizione.getData()!= "") || 116 ((immagine.getData())?? && immagine.getData()?has_content && immagine.getData()!= "")> 117 $(".f_left").css("width", "70%"); 118 <#if (denominazione.getData())?? && denominazione.getData()?has_content > 119 $(".f_right_2").css("margin-left", "3em"); 120 $(".f_right_2").css("margin-top", "-3.25em"); 121 <#else> 122 $(".f_right_2").css("margin-top", "0px"); 123 $(".f_right_2").css("margin-left", "10px"); 124 </#if> 125 <#else> 126 if(allegatiPresenti == true){ 127 $(".f_left").css("width", "70%"); 128 <#if (denominazione.getData())?? && denominazione.getData()?has_content > 129 $(".f_right_2").css("margin-left", "3em"); 130 $(".f_right_2").css("margin-top", "-3.25em"); 131 <#else> 132 $(".f_right_2").css("margin-top", "0px"); 133 $(".f_right_2").css("margin-left", "10px"); 134 </#if> 135 }else{ 136 $(".f_right_2").css("width", "100%"); 137 //$(".f_left").css("display", "none"); 138 } 139 </#if> 140 } else { 141 $(".f_left").css("width", "100%"); 142 } 143 </script> 144 <#else> 145 <script> 146 $(".f_left").css("width", "100%"); 147 </script> 148 </#if> 149 150 151<script> 152$(document).ready(function(){ 153 154 155 if(($(".f_left") && $(".f_left").html() && $(".f_left").html().trim() != "" && $(".f_right_2") && $(".f_right_2").html() && $(".f_right_2").html().trim() != "" && $(".nav-menu") && $(".nav-menu").html() && $(".nav-menu").html().trim() != "")|| 156 ($(".f_left") && $(".f_left").html() && $(".f_left").html().trim() != "" && $(".f_right_2") && $(".f_right_2").html() && $(".f_right_2").html().trim() != "" && $("#p_p_id_cartaDeiServizi_WAR_PugliaSalutePortlet_") && $("#p_p_id_cartaDeiServizi_WAR_PugliaSalutePortlet_").html() && $("#p_p_id_cartaDeiServizi_WAR_PugliaSalutePortlet_").html().trim() != "")){ 157 $(".f_right_2").css("width", "100%"); 158 $(".f_left").css("width", "100%"); 159 $(".f_right_2").css("margin-top","0"); 160 $(".f_right_2").css("margin-left","0"); 161 } 162 else if($(".f_left") && $(".f_left").html().trim()=="" && $(".f_right_2") && $(".Testo-descrizione-link-home full") && ($(".Testo-descrizione-link-home full").length>0 && $(".Testo-descrizione-link-home full").html().trim()=="")){ 163 $(".f_right_2").css("width", "100%"); 164 } 165}); 166 167var _arrayParametri = new Array(); 168var globalId = 0; 169var descInterna = false; 170var immInterna = false; 171var relInterna = false; 172 173Handlebars.registerHelper('controlloContenuto', function(tipoContenuto) { 174 if(tipoContenuto){ 175 if(tipoContenuto=="descInterna"){ 176 descInterna = true; 177 } else if(tipoContenuto=="immInterna"){ 178 immInterna = true; 179 } else if(tipoContenuto=="relInterna"){ 180 relInterna = true; 181 } 182 } 183}); 184 185Handlebars.registerHelper('creaLinkInterni', function(link) { 186 var htmlText= ""; 187 var vuoto = true; 188 htmlText = '<div> <ul>'; 189 if(Array.isArray(link)){ 190 var lung = link.length; 191 } else { 192 var lung = 1; 193 } 194 for (j=0; j< lung; j++){ 195 if( !Array.isArray(link) ){ 196 var theObj = link; 197 }else{ 198 var theObj = link[j]; 199 } 200 try{ 201 theObj = JSON.parse(theObj); 202 203 } catch (err){ 204 if(theObj == ""){ 205 theObj = link; 206 } 207 } 208 var etichetta = ""; 209 var url = "#"; 210 if(theObj.repeatableTitoloLink != "" || theObj.repeatableLinkInterno != "" || theObj.repeatableLinkEsterno != ""){ 211 vuoto = false; 212 if(theObj.repeatableTitoloLink){ 213 etichetta = theObj.repeatableTitoloLink; 214 } else { 215 etichetta= "Approfondimento"; 216 } 217 _target = ""; 218 if(theObj.repeatableLinkInterno && theObj.repeatableLinkInterno!=""){ 219 var indexof = theObj.repeatableLinkInterno.indexOf("@"); 220 var layId = theObj.repeatableLinkInterno.substring(0,indexof); 221 var appoggio = theObj.repeatableLinkInterno.substring(indexof + 1, theObj.repeatableLinkInterno.length); 222 indexof = appoggio.indexOf("@"); 223 var ptv = appoggio.substring(0,indexof); 224 var gid = appoggio.substring(indexof + 1,appoggio.length); 225 226 _dataReq = { layoutId : layId 227 ,private : ptv 228 ,groupId : gid 229 ,fieldValue: theObj.repeatableLinkInterno 230 }; 231 _arrayParametri[j] = _dataReq; 232 } 233 else if(theObj.repeatableLinkEsterno){ 234 url = theObj.repeatableLinkEsterno; 235 if (url.substring(0, 4) != "http"){ 236 url= "http://" + url; 237 } 238 if(theObj.repeatableModAper && theObj.repeatableModAper == "newTab"){ 239 _target = 'target="_blank"'; 240 } 241 } 242 243 htmlText = htmlText + '<li class="Testo-descrizione-link-home full">' + 244 '<a id="link_' + j + '" href="'+url+'" class="Link1" ' + _target + ' style="text-decoration:none;">'+ 245 etichetta + '</a></li>'; 246 } 247 } 248 249 htmlText = htmlText + '</ul></div>'; 250 if(vuoto == true){ 251 htmlText= ""; 252 } 253 254 return new Handlebars.SafeString(htmlText); 255}); 256 257Handlebars.registerHelper('aggiornaId', function(idFigli) { 258 if(idFigli){ 259 if(globalId < idFigli++){ 260 globalId = idFigli++; 261 return globalId; 262 }else if(globalId < idFigli+2){ 263 globalId = idFigli+2; 264 return globalId; 265 }else{ 266 while (globalId >= idFigli){ 267 idFigli++; 268 } 269 globalId = idFigli; 270 return globalId; 271 } 272 }else{ 273 idFigli = new Date().getTime(); 274 if(globalId){ 275 while (globalId >= idFigli){ 276 idFigli++; 277 } 278 globalId = idFigli; 279 return globalId; 280 } 281 } 282}); 283 284 285Handlebars.registerHelper('prendiIdGlobale', function() { 286 if(globalId){ 287 return globalId; 288 } 289}); 290 291 292Handlebars.registerHelper('creaSezioneDoc', function(documento) { 293 var htmlText=""; 294 var vuoto = true; 295 if(Array.isArray(documento)){ 296 var lung = documento.length; 297 } else { 298 var lung = 1; 299 } 300 for (j=0; j< lung; j++){ 301 if( !Array.isArray(documento) ){ 302 var docObj = documento; 303 }else{ 304 var docObj = documento[j]; 305 } 306 try{ 307 docObj = JSON.parse(docObj); 308 309 } catch (err){ 310 if(docObj == ""){ 311 docObj = documento; 312 } 313 } 314 if( lung > 1 || (docObj.repeatableEtichettaAllegati.repeatableEtichettaFile!="" && docObj.repeatableEtichettaAllegati.repeatableAllegato!="")){ 315 idDoc = new Date().getTime(); 316 while(idDoc == globalId){ idDoc++; } 317 globalId = idDoc; 318 var c = docObj; 319 var etichetta = ""; 320 321 //VERIFICO SE I DOCUMENTI HANNO UNA LORO ETICHETTA O DEVO METTERE QUELLA DI DEFAULT: 322 323 if( docObj.repeatableEtichettaAllegati != "" ){ 324 etichetta = docObj.repeatableEtichettaAllegati; 325 } else { 326 etichetta = "Documenti e Modulistica"; 327 } 328 329 var ripetibileAllegatoLung = 1 ; 330 if(Array.isArray(docObj.repeatableAllegato)){ 331 ripetibileAllegatoLung = docObj.repeatableAllegato.length; 332 } 333 if( (descInterna == true || immInterna == true || relInterna == true) || 334 (lung >1 && docObj.repeatableAllegato && ripetibileAllegatoLung > 0)){ 335 htmlText = htmlText + '<div class="section toggle-interno closed" id = "'+ idDoc +'" >'+ 336 '<h3 class="toggle-head-interno"><a href="javascript:void(0)" class ="noHref" onclick="toggleInterno('+idDoc+');">' + etichetta + '</a></h3>'+ 337 '<div class="toggle-body">'; 338 }else{ 339 htmlText = '<div id = '+ idDoc +'>'; 340 } 341 var htmlMedium = ""; 342 if (docObj.repeatableAllegato){ 343 for(i=0;i < ripetibileAllegatoLung; i++){ 344 if(Array.isArray(docObj.repeatableAllegato)){ 345 var documentoIter = docObj.repeatableAllegato[i]; 346 }else{ 347 var documentoIter = docObj.repeatableAllegato; 348 } 349 350 /* var allegatoUrl = creaUrl(documentoIter.repeatableAllegato);*/ 351 var allegatoUrl = documentoIter.repeatableAllegato; 352 var descr= documentoIter.repeatableDescrizioneFile; 353 var nomeAllegato = ""; 354 nomeAllegato = documentoIter.repeatableEtichettaFile; 355 if(nomeAllegato==""){ 356 nomeAllegato = allegatoUrl.substring(0, allegatoUrl.lastIndexOf("/")); 357 nomeAllegato = nomeAllegato.substring(nomeAllegato.lastIndexOf("/")); 358 } 359 _currentUtc = new Date().getTime(); 360 htmlMedium = htmlMedium + '<div class="colore-bold black">'+ 361 '<span class="colore-bold"> » </span>'+ 362 '<span class="si-text-decoration"> '+ nomeAllegato +' </span><br/>'+ 363 '<span class="font-normal">'+descr+'</span>' 364 ; 365 if(isInternetExplorer() && allegatoUrl.indexOf('.pdf') > 0) 366 htmlMedium = htmlMedium + '<span class="doc-download"><a id="download' + _currentUtc + '" href="/html/pdfjs/web/viewer.html?file='+allegatoUrl+'" target="_blank">'; 367 else 368 htmlMedium = htmlMedium + '<span class="doc-download"><a id="download' + _currentUtc + '" href="'+allegatoUrl+'" target="_blank">'; 369 htmlMedium = htmlMedium + '<img src="https://aress.sanita.puglia.it/pugliaSalute-theme/images/custom/download.png" alt="Download" width="24"></a></span></div>'; 370 if( ( nomeAllegato || descr || allegatoUrl) && ( nomeAllegato!= null || descr != null || allegatoUrl != null) && (nomeAllegato!="" || descr != "" || allegatoUrl != "") && i == 0){ 371 var vuoto = false; 372 } 373 } 374 htmlText = htmlText + htmlMedium; 375 } 376 htmlText = htmlText+'</div>'; 377 if( (descInterna == true || immInterna == true || relInterna == true) || 378 (lung >1 && docObj.repeatableAllegato && ripetibileAllegatoLung > 0)){ 379 htmlText = htmlText+'</div>'; 380 } 381 } 382 } 383 if (vuoto == true && lung == 1){ 384 htmlText = ""; 385 } 386 return new Handlebars.SafeString(htmlText); 387 388}); 389 390 391var id = ""; 392 393 394function toggleInterno(id) { 395 var idComp = "#"+id; 396 if(typeof doNotClose != 'undefined' && doNotClose){ 397 $(idComp).toggleClass('closed'); 398 } 399 else{ 400 if($(idComp).hasClass('closed')){ 401 if($(idComp).parent().parent().children().children().length > 0){ 402 $(idComp).parent().parent().children().children().addClass('closed'); 403 } 404 $(idComp).removeClass('closed'); 405 }else{ 406 $(idComp).addClass('closed'); 407 } 408 } 409 }; 410 411function relazionatiAccordionDisplay(id,value,idPar){ 412 var idComp = "#"+id; 413 414 if( $(idComp).is(':hidden')|| $(idComp).display == "none" ){ 415 if($(idComp).parent().parent().children().children().length > 0){ 416 $(idComp).parent().parent().children().children("div").hide(); 417 } 418 $(idComp).show(); 419 cercaRelazionati(0, true,value,idPar,'divBottoniContLivello2'); 420 }else{ 421 $(idComp).hide(); 422 } 423 }; 424 425function valorizzaLinkInterni(){ 426 _indexes = Object.keys(_arrayParametri); 427 for(idx = 0 ; idx < _indexes.length ; idx++){ 428 _currentIndex = _indexes[idx]; 429 var _url = _path_rest_services + "journal/getPageUrl"; 430 $.ajax({url : _url 431 ,contentType: 'application/json; charset=UTF-8' 432 ,type : "POST" 433 ,data : JSON.stringify(_arrayParametri[_currentIndex]) 434 ,success : function (_data) { 435 if(_data && _data.payload.length > 0){ 436<#assign uriLinkInterno = themeDisplay.getPortalURL()+ themeDisplay.getPathFriendlyURLPublic()+themeDisplay.getLayout().getGroup().getFriendlyURL()/> 437 $('#link_' + _currentIndex).attr('href', "${uriLinkInterno}" + _data.payload[0]) 438 } 439 } 440 }); 441 } 442} 443 444function cercaRelazionati(_page, checkFirstTime,dati,idName,classe){ 445 446 447 descInterna = false; 448 immInterna = false; 449 relInterna = false; 450 id = "#relazionatiAccordion"; 451 _struttura = dati; 452 id = id + idName; 453 if (classe == "divBottoniContLivello1"){ 454 455 if ($(id).is(':visible')){ 456 $(id).hide(); 457 } 458 else{ 459 460 if(typeof doNotClose != 'undefined' && doNotClose){ 461 462 } 463 else{ 464 $('.divBottoniContLivello1').hide(); 465 } 466 $(id).show(); 467 } 468 } else { 469 $(id).show(); 470 } 471 if(_struttura == ''){ 472 return ; 473 } 474 findFigliSolr(_page 475 ,"5" 476 ,${groupId} 477 ,_struttura 478 ,loadRelazionati 479 ); 480} 481 482function equalLoad(_data){ 483 //Per le immagini 484 if(_data.payload[0].immagine){ 485 _data.payload[0].immagine = creaUrl(_data.payload[0].immagine); 486 } 487 488 //Per gli allegati (documenti) 489 var arrayDocumentiParserizzati = []; 490 if(_data.payload[0].jsonRepeatableEtichettaAllegati){ 491 arrayDocumentiParserizzati = loadDocumenti (_data.payload[0].jsonRepeatableEtichettaAllegati); 492 } 493 _data.strutturaObjDocumenti = arrayDocumentiParserizzati; 494 495 //Per i link (ripetibili) 496 var arrayLinkCollegati=[]; 497 if(_data.payload[0].jsonRepeatableTitoloLink){ 498 arrayLinkCollegati = loadLink (_data.payload[0].jsonRepeatableTitoloLink); 499 } 500 _data.strutturaObjLinkCollegati = arrayLinkCollegati; 501 502 //Per i relazionati 503 var arrayKeyRelazionato = []; 504 if(_data.payload[0].repeatableTitoloSezione){ 505 arrayKeyRelazionato = [_data.payload[0].repeatableTitoloSezione]; 506 } 507 var arrayValueRelazionato = []; 508 if(_data.payload[0].repeatableRelazioneStruttura){ 509 arrayValueRelazionato = [_data.payload[0].repeatableRelazioneStruttura]; 510 } 511 var arrayDescRelazionato = []; 512 if(_data.payload[0].repeatableBreveDescrizione){ 513 arrayDescRelazionato = [ _data.payload[0].repeatableBreveDescrizione ]; 514 } 515 var j=0; 516 var strutturaObjRelazionati = []; 517 var objRel; 518 if(arrayKeyRelazionato.length>0){ 519 if( !Array.isArray(_data.payload[0].repeatableTitoloSezione) || arrayKeyRelazionato.length == _data.payload[0].repeatableTitoloSezione.length ){ 520 while(j<arrayKeyRelazionato.length){ 521 objRel = {}; 522 var n = new Date().getTime() + j; 523 objRel.key = arrayKeyRelazionato[j]; 524 objRel.value = arrayValueRelazionato[j]; 525 objRel.desc = arrayDescRelazionato[j]; 526 objRel.idPar = n; 527 objRel.chiamaIdPar = "#relazionatiAccordion"+n; 528 objRel.chiamaIdParNoAsh = "relazionatiAccordion"+n; 529 strutturaObjRelazionati[j] = objRel ; 530 j++; 531 } 532 } else if(arrayKeyRelazionato.length < _data.payload[0].repeatableTitoloSezione.length ){ 533 while(j<_data.payload[0].repeatableTitoloSezione.length){ 534 objRel = {}; 535 var n = new Date().getTime() + j; 536 objRel.key = arrayKeyRelazionato[0][j]; 537 if(arrayValueRelazionato.length>0 && arrayValueRelazionato[0] && arrayValueRelazionato[0][j]){ 538 objRel.value = arrayValueRelazionato[0][j]; 539 }else{ 540 objRel.value = ""; 541 } 542 if(arrayDescRelazionato.length>0 && arrayDescRelazionato[0] && arrayDescRelazionato[0][j]){ 543 objRel.desc = arrayDescRelazionato[0][j]; 544 }else{ 545 objRel.desc =""; 546 } 547 objRel.idPar = n; 548 objRel.chiamaIdPar = "#relazionatiAccordion"+n; 549 objRel.chiamaIdParNoAsh = "relazionatiAccordion"+n; 550 strutturaObjRelazionati[j] = objRel ; 551 j++; 552 } 553 } 554 _data.strutturaObjRelazionati = strutturaObjRelazionati; 555 } else { 556 _data.strutturaObjRelazionati = [] 557 } 558 return _data; 559} 560 561 562 563 564function loadRelazionati(_data) { 565 loadHandelbarsTemplateWebContent(); 566 if(_data.size == 1){ 567 _source = $("#listRelazionatiHandlebars").html(); 568 _data = equalLoad(_data) 569 _data.idFigli= new Date().getTime(); 570 _template = Handlebars.compile(_source); 571 $(id).html(_template(_data)); 572 }else{ 573 _source = $("#listRelazionatiHandlebarsMulti").html(); 574 _template = Handlebars.compile(_source); 575 $(id).html(_template(_data)); 576 } 577} 578 579function creaUrl(file){ 580 var output =""; 581 if(file != null && file!= ""){ 582 _url = "/PugliaSalutePortlet/rest/journal/getFileUrl"; 583 _file = ""; 584 try{ 585 _file = JSON.parse(file); 586 }catch (err){ } 587 if(_file == ""){ 588 _file = file; 589 } 590 _dataReq = {groupId : _file.groupId 591 ,uuid : _file.uuid 592 }; 593 $.ajax({url : _url 594 ,dataType : "html" 595 ,type : "POST" 596 ,data : _dataReq 597 ,async : false 598 ,success : function (_data) { 599 output = _data; 600 } 601 ,error : function(_data, text, error ){ 602 } 603 }); 604 } 605 return output; 606 607} 608 609function loadDocumenti(documenti){ 610 if(documenti != null && documenti!= ""){ 611 _documenti = ""; 612 try{ 613 _documenti = JSON.stringify(documenti) 614 _documenti = JSON.parse(_documenti); 615 console.log("LOAD Document OK" + _documenti); 616 return _documenti; 617 } catch (err){ 618 console.log("LOAD Document KO"); 619 if(_documenti == ""){ 620 _documenti = documenti; 621 console.log("LOAD Document KO" + _documenti) 622 return _documenti; 623 } 624 } 625 } 626} 627 628function loadLink (linkCollegati){ 629 if(linkCollegati != null && linkCollegati!= ""){ 630 _link = ""; 631 try{ 632 _link = JSON.stringify(linkCollegati) 633 _link = JSON.parse(_link); 634 return _link; 635 } catch (err){ 636 if(_link == ""){ 637 _link = linkCollegati; 638 return _link; 639 } 640 } 641 } 642} 643 644</script> 645 646<script id="listRelazionatiHandlebars" type="text/x-handlebars-template"> 647 {{#if payload.length}} 648<script type="text/javascript"> 649$(document).ready(function(){ 650valorizzaLinkInterni(); 651}); 652<{{!}}/script> 653 <div> 654 {{#each payload}} 655 {{#if immagine}} 656 {{controlloContenuto 'immInterna'}} 657 <div ><img src="{{immagine}}" alt="" /></div> 658 {{/if}} 659 660 {{#if descrizione}} 661 {{controlloContenuto 'descInterna'}} 662 <div>{{{descrizione}}} </div> 663 {{/if}} 664 {{/each}} 665 666 {{#if strutturaObjLinkCollegati.length}} 667 {{creaLinkInterni strutturaObjLinkCollegati}} 668 {{/if}} 669 {{/if}} 670 671 {{#if strutturaObjRelazionati.length}} 672 {{controlloContenuto 'relInterna'}} 673 {{/if}} 674 675 {{#if strutturaObjDocumenti.length}} 676 {{creaSezioneDoc strutturaObjDocumenti}} 677 678 {{/if}} 679 680 {{#if strutturaObjRelazionati.length}} 681 <div class="cont-info" style="margin-left: -20px !important;"> 682 <div class="list0"> 683 {{#each strutturaObjRelazionati}} 684 <div id = {{aggiornaId idFigli}}> 685 {{#if key}} 686 <h5 class="blueBold">{{key}}</h5> 687 {{/if}} 688 <p class="text-right" class="attAmmLeggiAncora" href="{{aggiornaId idFigli}}" onclick="relazionatiAccordionDisplay('relazionatiAccordion{{prendiIdGlobale}}','{{value}}','{{prendiIdGlobale}}')"> 689 <span class="leggi-ancora"><@liferay.language key="msg.tpl.common.leggi-ancora" /> <span>↓</span></span> 690 </p> 691 <div id = "relazionatiAccordion{{prendiIdGlobale}}" style="display:none;" class="divBottoniContLivello2"></div> 692 <p class="linea-divisoria text-right"></p> 693 </div> 694 {{/each}} 695 </div> 696 </div> 697 {{/if}} 698</div> 699</script> 700 701 702<script id="listRelazionatiHandlebarsMulti" type="text/x-handlebars-template"> 703{{#if payload.length}} 704 <ul> 705 {{#each payload}} 706 <li class = "divMeta"> 707 <!-- 708 <a class="Link1" href="${uri}_det?articleId={{articleId}}&groupId=${groupId}&plabel={{formatParameter denominazione}}"> 709 --> 710 <a class="Link1" href="${uri}_det/-/journal_content/56/${groupId}/{{urlTitle}}"> 711 {{denominazione}} 712 </a> 713 </li> 714 {{/each}} 715 </ul> 716{{/if}} 717</script> 
