1// ARREVA MAIN JS Ver. 16 01 2026 ------ 2 3 4// ONLOAD TO 5 6 7function onloadto(){ 8 var onloadtotb = document.getElementsByClassName("regoptions_table") 9 var onloadtotbl = onloadtotb.length 10 if( onloadtotbl != 0 ){ 11 console.log('onloadtotbl: ' + onloadtotbl) 12 var onloadtotbtr = onloadtotb[0].getElementsByTagName("TR").length 13 console.log('onloadtotbtr: ' + onloadtotbtr) 14 for (i = 0; i < onloadtotbtr; i++) { 15 onloadtotb[0].getElementsByTagName("TR")[i].classList.add("fbh_exp") 16 } 17 } 18} 19 20$( window ).on( "load", function() { 21 onloadto(); 22}); 23 24 25 26 27const toval = []; 28 29 30function fbhto_ecarray(){ 31 var fbhtoarr = document.getElementsByClassName("regoptions_table") 32 var fbhtoarrl = fbhtoarr.length 33 if( fbhtoarr != 0 ){ 34 console.log('pasass2') 35 var fbhtoarrtr = fbhtoarr[0].getElementsByTagName("TR").length 36 console.log('fbhtoarrtr: ' + fbhtoarrtr) 37 for (i = 0; i < fbhtoarrtr; i++) { 38 console.log( fbhtoarr[0].getElementsByTagName("TR")[i].classList ) 39 toval[i]= ''+ fbhtoarr[0].getElementsByTagName("TR")[i].classList + ''; 40 41 } 42 } 43 console.log('toval: ' + toval) 44} 45 46 47 48$(document).on('click', '.fbhto_ec', function () { 49 fbhto_ecarray(); 50}); 51 52 53 54function arrayto(){ 55 var aarrayto = document.getElementsByClassName("regoptions_table") 56 var aarraytol = aarrayto.length 57 if( aarraytol != 0 ){ 58 console.log('pasass arrayto') 59 var aarraytotr = aarrayto[0].getElementsByTagName("TR").length 60 console.log('aarraytotr: ' + aarraytotr) 61 console.log('toval: ' + toval) 62 console.log('toval i : ' + toval[0]) 63 for (i = 0; i < aarraytotr; i++) { 64 aarrayto[0].getElementsByTagName("TR")[i].classList.add( toval[i] ) 65 } 66 67 } 68 69} 70 71 72$(document).on('click', '.regoptions_table_cont', function () { 73 //arrayto(); 74 setTimeout(arrayto, 400); 75 setTimeout(arrayto, 800); 76}); 77 78 79 80 81 82 83// ASSET PUBLISHER 84 85function aptemplates(){ 86 87 var aportlets = document.getElementsByClassName('portlet-asset-publisher').length 88 89 //console.log('aportlets: ' + aportlets) 90 91 if(aportlets > 0){ 92 93 //alert(aportlets) 94 95 var y; 96 for (y = 0; y < aportlets; y++) { 97 98 var aptemplatesname = document.getElementsByClassName('portlet-asset-publisher')[y]; 99 var asset_full_content = aptemplatesname.getElementsByClassName('asset-full-content').length 100 //console.log(asset_full_content) 101 var moreheight = "0" 102 var i; 103 for (i = 0; i < asset_full_content; i++) { 104 var apbheight = aptemplatesname.getElementsByClassName('asset-full-content')[i].offsetHeight 105 //console.log('apbheight: '+ apbheight) 106 if(apbheight >= moreheight){ 107 moreheight = apbheight 108 } 109 } 110 111 //console.log('moreheight: '+ moreheight) 112 113 for (i = 0; i < asset_full_content; i++) { 114 aptemplatesname.getElementsByClassName('asset-full-content')[i].style.height = ""+ moreheight +"px" 115 } 116 117 118 var aptemplatesname = document.getElementsByClassName('portlet-asset-publisher custom')[y]; 119 var apt_asset_abstract = aptemplatesname.getElementsByClassName('asset-abstract').length 120 121 //console.log('aptemplatesname: '+ aptemplatesname) 122 //console.log('apt_asset_abstract: '+ apt_asset_abstract) 123 var maxboxhdef 124 var maxboxhprov = 0 125 126 var i; 127 for (i = 0; i < apt_asset_abstract; i++) { 128 129 130 131 try { 132 imgsrc = aptemplatesname.getElementsByClassName('asset-abstract')[i].getElementsByClassName('img-thumbnail')[0].src 133 assabtitle = aptemplatesname.getElementsByClassName('asset-abstract')[i].getElementsByClassName('asset-title')[0] 134 assabtitlelink = assabtitle.getElementsByTagName("A")[0].href 135 assabtitlelinkcont = assabtitle.getElementsByTagName("A")[0].innerHTML 136 if(assabtitlelinkcont.length >= 60){ 137 assabtitlelinkcontslice = assabtitlelinkcont.slice(0, 60); 138 assabtitle.getElementsByTagName("A")[0].innerHTML = assabtitlelinkcontslice + "..." 139 } 140 141 assabtitle.className = "asset-title bg2 coinv fs90 fw600 test" 142 asssummary = aptemplatesname.getElementsByClassName('asset-abstract')[i].getElementsByClassName('asset-summary')[0] 143 asssummary.className = "asset-summary fs80 coinv fw400" 144 asspullrightl = aptemplatesname.getElementsByClassName('asset-abstract')[i].getElementsByClassName('pull-right').length 145 146 if(asspullrightl == 1){ 147 asssumm = aptemplatesname.getElementsByClassName('asset-abstract')[i].getElementsByClassName('asset-summary')[0] 148 asssummih = asssumm.innerHTML 149 asssummaryit = asssumm.innerText 150 asssummrep = asssummih.replace(asssummaryit, ""); 151 asssummdef = asssummrep + "<div class='padding05em width100 display_block'>
151" + asssummaryit + "</div><a class='coinv float_right padding05em' href='"+ assabtitlelink +"'><i class='fas fa-arrow-right'></i> Read More</a>" 152 asssumm.innerHTML = asssummdef 153 } 154 155 asssmallimage = aptemplatesname.getElementsByClassName('asset-abstract')[i].getElementsByClassName('asset-small-image')[0] 156 //aptemplatesname.getElementsByClassName('asset-abstract')[i].style.backgroundImage = "url('" + imgsrc + "')" 157 asssmallimage.style.backgroundImage = "url('" + imgsrc + "')" 158 159 assentrybody = aptemplatesname.getElementsByClassName('asset-abstract')[i].getElementsByClassName('entry-body')[0] 160 assentrybody.className = "entry-body coinv fw400" 161 162 assentrybodyl = aptemplatesname.getElementsByClassName('asset-abstract')[i].getElementsByClassName('entry-body').length 163 164 assentrybodysum = assentrybody.innerHTML + '<br><a class="coinv" href="'+ assabtitlelink +'"><i class="fas fa-arrow-right"></i> Read More</a>' 165 assentrybody.innerHTML = assentrybodysum 166 } 167 catch(err){} 168 169 maxboxh = aptemplatesname.getElementsByClassName('asset-abstract')[i].getElementsByClassName('asset-content')[0].offsetHeight 170 if(maxboxhprov <= maxboxh){ 171 maxboxhprov = maxboxh + 40 172 } 173 174 } 175 176 for (i = 0; i < apt_asset_abstract; i++) { 177 aptemplatesname.getElementsByClassName('asset-abstract')[i].style.height = maxboxhprov + "px" 178 //aptemplatesname.getElementsByClassName('asset-abstract')[i].style.height = "max-content" 179 180 } 181 } 182 } 183} 184 185 186window.addEventListener('load', function() { 187 aptemplates(); 188 //setTimeout(aptemplates, 200); 189}); 190 191 192// AP LOOK N FEEL 193 194function ap_styles(){ 195 196 //console.log('pasa1') 197 198 try { 199 var fieldcss = document.getElementById('lfr-portlet-info') 200 var fieldcsslen = fieldcss.innerHTML.length 201 //alert(fieldcss.innerHTML.length)
202 var validateapstyle = document.getElementById('validateapstyle').value 203 var fieldcssseg = fieldcss.getElementsByTagName("STRONG")[1].innerHTML 204 //fieldcss2 = fieldcss + "xxx" 205 //alert('2') 206 if(fieldcssseg == ".portlet-decorate.portlet-asset-publisher .portlet-content.portlet-content-editable" || fieldcssseg == ".portlet-barebone.portlet-asset-publisher .portlet-content.portlet-content-editable"){ 207 if(validateapstyle == "0" && fieldcsslen < 300){ 208 fieldcsscont = document.getElementById('lfr-portlet-info').innerHTML; 209 document.getElementById('lfr-portlet-info').innerHTML = fieldcsscont + '<br class="br1"><div class="co1"><b>SELECT</b><br class="br1"> <b>ASSET PUBLISHER CONTENT:</b> <select id="apub_content" onchange="apstylesel(this.value);" class="marginleft05em"> <option selected></option><option value="ap_blog"> Only Blog Entries with Descriptions </option><option value="ap_wc"> Only Web Content Articles </option><option value="ap_blog_wc"> Blog Entries and Web Content Articles </option></select> <br class="br1"><b>ASSET PUBLISHER STYLE:</b> <select id="apub_style" onchange="apstylesel(this.value);" class="marginleft05em"> <option selected></option><option value="fullcontent columns2"> Full Content / 2 Columns </option><option value="fullcontent columns3"> Full Content / 3 Columns </option><option value="fullcontent columns4"> Full Content / 4 Columns </option><option value="custom columns1">Abstracts / Custom Style / 1 Column </option><option value="custom columns2">Abstracts / Custom Style / 2 Columns </option><option value="custom columns3">Abstracts / Custom Style / 3 Columns </option><option value="custom columns4">Abstracts / Custom Style / 4 Columns </option><option value="custom columns3 colors3">Abstracts / Custom Style / 3 Columns / 3 Color Label Alternate </option><option value="custom columns4 colors3">Abstracts / Custom Style / 4 Columns / 3 Color Label Alternate </option><option value="custom columns3 colors4"> Abstracts / Custom Style / 3 Columns / 4 Color Label Alternate </option><option value="custom columns4 colors4">Abstracts / Custom Style / 4 Columns / 4 Color Label Alternate </option></select></div>';
210 //document.getElementById('validateapstyle').value = "1" 211 } 212 } 213 }catch(err){ 214 215 } 216} 217function apstylesel(thevalue){ 218 var apcontent = document.getElementById('apub_content').value 219 var apstyle = document.getElementById('apub_style').value 220 document.getElementById('_com_liferay_portlet_configuration_css_web_portlet_PortletConfigurationCSSPortlet_lfr-custom-css-class-name').value = apcontent + " " +apstyle; 221 document.getElementById('_com_liferay_portlet_configuration_css_web_portlet_PortletConfigurationCSSPortlet_lfr-custom-css-class-name').readOnly = true; 222 223} 224 225$( window ).on( "load", function() { 226 // ap_styles(); 227}); 228 229 230$(document).on('click', '.tab-label', function () { 231 ap_styles(); 232}); 233 234 235 236// OPEN CLOSE FUNCTION 237 238function fun_opcont(elem){ 239elem.classList.add("open"); 240} 241function fun_opclose(elem){ 242var pare = elem.parentElement; 243 244pare.classList.toggle("openclose"); 245elem.classList.toggle("clopen"); 246 247} 248 249 250 251 252 253 254// STICKY RESPONSIVE 255 256function sticky_res_ol(){ 257 if(screen.width <= 768){ 258 try { 259 var top_header_h = document.getElementById("top_header").offsetHeight; 260 //console.log('top_header_h: '+ top_header_h); 261 document.getElementById("banner").style.marginTop = top_header_h + "px"; 262 }catch(err){ 263 264 } 265 } 266} 267$( window ).on( "load", function() { 268 sticky_res_ol(); 269}); 270 271 272 273// STICKY CLASS 274 275function sticky_class(){ 276 if(screen.width > 768){ 277 try { 278 279 var wpyo = window.pageYOffset 280 console.log("wpyo xx " + wpyo) 281 282 if (wpyo > 1) { 283 document.getElementById("wrapper").classList.add("sticky_pc"); 284 } 285 if (wpyo == 0) { 286 document.getElementById("wrapper").classList.remove("sticky_pc"); 287 } 288 }catch(err){ 289 290 } 291 } 292} 293$( window ).on( "load", function() { 294 //sticky_class(); 295}); 296 297$(window).scroll(function() { 298 //sticky_class(); 299}); 300 301 302function sticky_res(){ 303 304 if(screen.width <= 768){ 305 try { 306 var top_header_h = document.getElementById("top_header").offsetHeight; 307 var top_header_t = document.getElementById("top_header").offsetTop; 308 var wpyo = window.pageYOffset 309 console.log("wpyo " + wpyo) 310 311 if (wpyo > 1) { 312 document.getElementById("wrapper").classList.add("sticky_res"); 313 } 314 if (wpyo == 0) { 315 document.getElementById("wrapper").classList.remove("sticky_res"); 316 } 317 }catch(err){ 318 319 } 320 } 321} 322 323$(window).scroll(function() { 324 sticky_res(); 325}); 326 327 328 329// MULTIBLOCK STANDARD FIX HEIGHT 330 331function mbfixh(){ 332 333 var nummbtem = document.getElementsByClassName('spg_box') 334 var nummbteml = nummbtem.length 335 336 if(nummbteml > 0){ 337 338 var y; 339 for (y = 0; y < nummbteml; y++) { 340 341 //console.log('contains: ' + nummbtem[y].classList.contains('columns1')) 342 343 if( nummbtem[y].classList.contains('columns1') != true ){ 344 345 var nummbtemst = nummbtem[y].getElementsByClassName('spg_standard'); 346 var nummbtemstl = nummbtem[y].getElementsByClassName('spg_standard').length; 347 //console.log(y + ' - nummbtemstl: ' + nummbtemstl) 348 if(nummbtemstl > 0){ 349 //console.log('pasa: ' + nummbtemstl) 350 var maxh = 0 351 for (z = 0; z < nummbtemstl; z++) { 352 353 var nsttitle = 0 354 if(nummbtemst[z].getElementsByClassName('spg_item_title').length > 0){ 355 nsttitle = nummbtemst[z].getElementsByClassName('spg_item_title')[0].offsetHeight; 356 357 } 358 if(nummbtemst[z].getElementsByClassName('spg_item_title_o').length > 0){ 359 nsttitle = 0 360 } 361 362 var nstimgbox = 0 363 if(nummbtemst[z].getElementsByClassName('spg_img_box').length > 0){ 364 nstimgbox = nummbtemst[z].getElementsByClassName('spg_img_box')[0].offsetHeight; 365 } 366 367 var nsticont = 0 368 if(nummbtemst[z].getElementsByClassName('spg_item_content').length > 0){ 369 nsticont = nummbtemst[z].getElementsByClassName('spg_item_content')[0].offsetHeight; 370 } 371 372 var nstbut = 0 373 if(nummbtemst[z].getElementsByClassName('spg_buttons').length > 0){ 374 nstbut = nummbtemst[z].getElementsByClassName('spg_buttons')[0].offsetHeight; 375 } 376 377 var htot = nsttitle + nstimgbox + nsticont + nstbut 378 379 nummbtemst[z].getElementsByClassName('spg_item_int')[0].style.height = htot + "px" 380 381 if(maxh <= htot){ 382 maxh = htot 383 } 384 console.log('htot: ' + htot) 385 } 386 //console.log('screen: ' + screen.width) 387 if(screen.width > 480){ 388 for (z = 0; z < nummbtemstl; z++) { 389 nummbtemst[z].getElementsByClassName('spg_item_int')[0].style.height = maxh + "px" 390 var elementsopa = document.querySelectorAll('.button.borderco2.opacity0');
391 elementsopa.forEach(function(element) { 392 element.classList.remove('opacity0'); 393 }); 394 395 } 396 } 397 } 398 } 399 } 400 } 401 402 403} 404 405 406$( window ).on( "load", function() { 407 //mbfixh(); 408 setTimeout(mbfixh, 400); 409}); 410 411$(window).on('resize', function(){ 412 setTimeout(mbfixh, 400); 413}); 414 415 416 417// TOP HEADER R FIX 418 419function tophhfix(){ 420 421 if(screen.width <= 768){ 422 var top_header_h = document.getElementById("top_header").offsetHeight; 423 var top_header_t = document.getElementById("top_header").offsetTop; 424 var wpyo = window.pageYOffset 425 426 if (wpyo > top_header_t) { 427 document.getElementById("wrapper").classList.add("sticky_res"); 428 } 429 if (wpyo <= top_header_t) { 430 document.getElementById("wrapper").classList.remove("sticky_res"); 431 } 432 } 433 434} 435 436$( window ).on( "load", function() { 437 //tophhfix(); 438}); 439 440 441// FIX LIST 442 443function fixlist(){ 444 445 var numtmlist = document.getElementsByClassName('aa_list') 446 var numtmlistl = numtmlist.length 447 //console.log('numtmlistl: ' + numtmlistl) 448 449 if(numtmlistl > 0){ 450 var y; 451 for (y = 0; y < numtmlistl; y++) { 452 var numtmlistw = numtmlist[y].offsetWidth 453 if( numtmlistw < 900){ 454 numtmlist[y].classList.add("widthlimit"); 455 } 456 //console.log('numtmlistw: ' + numtmlistw) 457 } 458 } 459 460} 461 462$( window ).on( "load", function() { 463 fixlist(); 464}); 465 466 467// FIX BACKGROUND TEMPLATE 468 469function fixbgtempl(){ 470 471 //var fixbgt = document.getElementById('column-1').currentStyle 472 473 var fixbgtc1 = document.getElementById("column-1"); 474 var fbgtc1br = window.getComputedStyle(fixbgtc1, null).getPropertyValue("border-radius"); 475 if(fbgtc1br == "8px"){ 476 //console.log('pasa si') 477 var fbgtdiv = document.createElement("div"); 478 fbgtdiv.id = 'fbgtdivid'; 479 document.body.appendChild(fbgtdiv); 480 var fbgtdivcont = "<style>body.aa01.signed-out .arreva_grid .grid_int{z-index:-1;}body.signed-in #column-1.portlet-column{margin: 0;width: 100%;padding: 0%;float: none;}</style>"; 481 document.getElementById("fbgtdivid").innerHTML = fbgtdivcont 482 } 483 484} 485 486$( window ).on( "load", function() { 487 fixbgtempl(); 488}); 489 490 491// FIX PDF PORTLET HEIGHT 492 493 494// PDF HEIGHT 495 496function pdffix(){ 497 498 var pdfw = document.getElementById('fixpdfw').innerText 499 500 // if R 501 if(screen.width > 1024){ 502 var pdfwfix = pdfw - 65 503 } 504 if(screen.width <= 1024){ 505 var pdfwfix = pdfw - 67 506 } 507 if(screen.width <= 768){ 508 var pdfwfix = pdfw - 82 509 } 510 if(screen.width <= 640){ 511 var pdfwfix = pdfw - 87 512 } 513 if(screen.width <= 480){ 514 var pdfwfix = pdfw - 110 515 } 516 if(screen.width <= 380){ 517 var pdfwfix = pdfw - 100 518 } 519 520 console.log('pdfwfix ' + pdfwfix) 521 522 523 var pdfh = document.getElementById('fixpdfh').innerText 524 var pdfmod = pdfwfix / pdfh 525 var pdfview = document.getElementById('adobe-dc-view').offsetWidth; 526 527 if(screen.width > 380){ 528 var pdfviewfix = pdfview - 65 529 } 530 if(screen.width <= 380){ 531 var pdfviewfix = pdfview - 19 532 } 533 var pdfnh = Math.round( pdfviewfix / pdfmod ) 534 535 document.getElementById('adobe-dc-view').style.height = "" + pdfnh + "px"; 536 537} 538 539// FIX FULL WIDTH HEIGHT 540 541function fwb_fixh(){ 542 543 544 var fwb_fixh = document.getElementsByClassName('flwb coverarea') 545 var fwb_fixhl = fwb_fixh.length 546 547 if(fwb_fixhl > 0){ 548 var fwb_fixhel = fwb_fixh[0].getElementsByClassName('flwb_cont_int')[0].offsetHeight 549 var fwb_fixhelimg = fwb_fixh[0].getElementsByClassName('flwb_img')[0].offsetHeight 550 console.log('fwb_fixhelimg: ' + fwb_fixhelimg) 551 if( fwb_fixhel > fwb_fixhelimg ){ 552 fwb_fixh[0].getElementsByClassName('flwb_cont')[0].style.height = "" + fwb_fixhel + "px" 553 fwb_fixh[0].style.minHeight = "" + fwb_fixhel + "px" 554 console.log('fwb_fixhel: ' + fwb_fixhel) 555 } 556 } 557 //console.log('fwb_fixhl: ' + fwb_fixhl) 558 559 560} 561 562$( window ).on( "load", function() { 563 fwb_fixh(); 564}); 565 566 567 568// CLOSE POP UP PEND. 569 570 571 572// SVG LIB 573 574 class CustomSVG extends HTMLElement { 575 constructor() { 576 super(); 577 } 578 connectedCallback() { 579 fetch(this.getAttribute('src')) 580 .then(response => response.text()) 581 .then(text => { 582 this.innerHTML = text; 583 }); 584 } 585 } 586 customElements.define('custom-svg', CustomSVG); 587 588 589// TOP ADMIN SIGN OUT 590
591function topadm_sob(){ 592 var bodysi = document.getElementsByClassName('signed-in') 593 var bodysil = bodysi.length 594 if( bodysil > 0){ 595 var top_ucg = document.getElementsByClassName('user-control-group')[0] 596 top_ucg.innerHTML = top_ucg.innerHTML + '<a class="topsi_so coinv " href="/c/portal/logout"><i class="fas fa-lock-open marginright05em"></i>Sign Out</a>' 597 } 598} 599 600$( window ).on( "load", function() { 601 topadm_sob(); 602}); 603 604 605// FIX EMPTY DIVS 606 607function fixemptydivs(){ 608 609 var fixedivs = document.getElementsByClassName('ui-datagrid-column ui-g-12 ui-md-6') 610 var fixedivsl = fixedivs.length 611 612 if(fixedivsl > 0){ 613 614 for (i = 0; i < fixedivsl; i++) { 615 var fixedivscont = fixedivs[i].innerHTML 616 var fixedivscontl = fixedivscont.length 617 console.log('fixedivscontl: ' + fixedivscontl) 618 if(fixedivscontl == 0){ 619 fixedivs[i].style.display = "none" 620 fixedivs[i].parentElement.classList.add("jc_content_center") 621 } 622 } 623 } 624 625} 626 627$( window ).on( "load", function() { 628 fixemptydivs(); 629}); 630 631// COLAPSE STAY 632 633function tpcolap(colap){ 634 //alert(colap.classList) 635 if(colap.classList.contains('up')){ 636 colap.classList.remove('up') 637 colap.classList.add('down') 638 colap.title = 'Expand' 639 colap.parentElement.parentElement.classList.add('down') 640 641 }else{ 642 colap.classList.remove('down') 643 colap.classList.add('up') 644 colap.title = 'Collapse' 645 colap.parentElement.parentElement.classList.remove('down') 646 } 647} 648 649 650// FIX SEARCH RESULTS 651 652function fixsearchr(){ 653 var fsearchr = document.getElementsByClassName('lfr-search-container-wrapper main-content-body') 654 var fsearchrl = fsearchr.length 655 if(fsearchrl > 0){ 656 657 var fsearchrit = fsearchr[0].getElementsByClassName('list-group-item-content') 658 var fsearchritl = fsearchrit.length 659 660 for (i = 0; i < fsearchritl; i++) { 661 var fsitcont = fsearchrit[i].innerHTML 662 var fsitconta = fsearchrit[i].getElementsByTagName("A")[0].href 663 //var fsitcontaclass = fsearchrit[i].getElementsByTagName("A")[0] 664 fsearchrit[i].getElementsByTagName("A")[0].classList.toggle("co2") 665 var fsitcontal = fsitconta.length 666 //console.log('fsitcontal: ' + fsitcontal) 667 var fsitslicetot = "" 668 for (y = 0; y < fsitcontal; y++) { 669 var fsitslice = fsitconta.slice(y, y+1) 670 var fsitslicetot = fsitslicetot + fsitslice 671 if( y >= 120){ 672 var fsitslicetot = fsitslicetot + "..." 673 break 674 } 675 } 676 //console.log('fsitslicetot: ' + fsitslicetot) 677 fsearchrit[i].innerHTML = fsitcont + '<a class="fixsearchurl co2" href="'+ fsitconta +'">'+ fsitslicetot +'</a>' 678 } 679 var fsearchnb = document.getElementsByClassName('lfr-ddm-field-group lfr-ddm-field-group-inline field-wrapper')[0] 680 console.log('fsearchnb: ' + fsearchnb.innerHTML) 681 fsearchnb.innerHTML = fsearchnb.innerHTML + '<button class="btn btn-default" onclick="shhisearchm();"><i class="icon-filter"></i> Search Filters</button>' 682 } 683} 684 685$( window ).on( "load", function() { 686 //fixsearchr(); 687}); 688 689function shhisearchm(){ 690 691 692 var colsearchleft = document.getElementsByClassName('col-md-3')[0] 693 var colsearchright = document.getElementsByClassName('col-md-9 result')[0] 694 if(colsearchleft.classList.contains('show')){ 695 colsearchleft.classList.remove('show') 696 }else{ 697 colsearchleft.classList.add('show') 698 } 699 700 701} 702 703 704// UPLOAD BUTTON STYLE 705 706 707function upbuttsty(){ 708 //console.log('pasa init') 709 var upbuttstye = document.getElementsByClassName('qq-upload-button') 710 var upbuttstyel = upbuttstye.length 711 if(upbuttstyel > 0){ 712 for (i = 0; i < upbuttstyel; i++) { 713 upbuttstye[i].classList.add('coinv') 714 upbuttstye[i].classList.add('bg2') 715 } 716 } 717} 718 719$( window ).on( "load", function() { 720 upbuttsty(); 721}); 722 723 724/* VOLUNTEER DISPLAY OPTIONS */ 725 726 727function move_vol_disp_opt(butpos){ 728 var movea = document.getElementsByClassName('movea') 729 var moveb = document.getElementsByClassName('moveb') 730 var movec = document.getElementsByClassName('movec') 731 if( butpos == "pos1"){ 732 movea[0].classList.remove('b2') 733 moveb[0].classList.remove('b2')
734 movec[0].classList.remove('b2') 735 movea[0].classList.remove('b3') 736 moveb[0].classList.remove('b3') 737 movec[0].classList.remove('b3') 738 movea[0].classList.add('b1') 739 moveb[0].classList.add('b1') 740 movec[0].classList.add('b1') 741 } 742 if( butpos == "pos2"){ 743 movea[0].classList.remove('b1') 744 moveb[0].classList.remove('b1') 745 movec[0].classList.remove('b1') 746 movea[0].classList.remove('b3') 747 moveb[0].classList.remove('b3') 748 movec[0].classList.remove('b3') 749 movea[0].classList.add('b2') 750 moveb[0].classList.add('b2') 751 movec[0].classList.add('b2') 752 } 753 if( butpos == "pos3"){ 754 movea[0].classList.remove('b1') 755 moveb[0].classList.remove('b1') 756 movec[0].classList.remove('b1') 757 movea[0].classList.remove('b2') 758 moveb[0].classList.remove('b2') 759 movec[0].classList.remove('b2') 760 movea[0].classList.add('b3') 761 moveb[0].classList.add('b3') 762 movec[0].classList.add('b3') 763 } 764} 765 766 767// TF LEADER BOX ADJUST 768 769function tfleadercols(){ 770 if(screen.width > 1180){ 771 var tfleadercolsr = document.getElementsByClassName('tf_leader_3_cols') 772 var tfleadercolsrl = tfleadercolsr.length 773 if(tfleadercolsrl > 0){ 774 console.log('tfleadercols:' + tfleadercolsrl) 775 var tfleadercolsrit = tfleadercolsr[0].getElementsByClassName('tableRecent') 776 var tfleadercolsritl = tfleadercolsrit.length 777 console.log('tfleadercolsritl:' + tfleadercolsritl) 778 if(tfleadercolsritl == 1){ 779 tfleadercolsr[0].classList.add('ledcols1'); 780 } 781 if(tfleadercolsritl == 2){ 782 tfleadercolsr[0].classList.add('ledcols2'); 783 } 784 if(tfleadercolsritl == 3){ 785 tfleadercolsr[0].classList.add('ledcols3'); 786 } 787 if(tfleadercolsritl == 4){ 788 tfleadercolsr[0].classList.add('ledcols4'); 789 } 790 } 791 } 792} 793 794$( window ).on( "load", function() { 795 //; 796}); 797 798 799 800$(document).on('keyup', '.maxh48px', function () { 801 //setTimeout(tfleadercols, 400); 802 //setTimeout(tfleadercols, 1000); 803}); 804 805 806// 807 808 809// DONATE TF PFB 810 811 812function donaselpfb_func(orig){ 813 814 815 var donampfb_sel = document.getElementsByClassName('donampfb_sel') 816 var donampfb_sell = donampfb_sel.length 817 if(donampfb_sell > 0){ 818 819 var donampfbselit = donampfb_sel[0].getElementsByClassName('label_button_nc') 820 var donampfbselitl = donampfbselit.length 821 822 for (i = 0; i < donampfbselitl; i++) { 823 donampfbselit[i].classList.remove('bg2'); 824 donampfbselit[i].classList.remove('coinv'); 825 } 826 } 827 document.getElementById(orig).classList.remove('bg_ddd'); 828 document.getElementById(orig).classList.add('bg2'); 829 document.getElementById(orig).classList.add('coinv'); 830} 831 832 833 834// COPY TEXT FUNCTION 835 836function copyTextFunc(elid) { 837 var copyText = document.getElementsByClassName(elid)[0]; 838 copyText.select(); 839 copyText.setSelectionRange(0, 99999); 840 navigator.clipboard.writeText(copyText.value); 841 842 var tooltip = document.getElementById("myTooltip"); 843 tooltip.innerHTML = "Copied!"; 844} 845 846function copyTextOutFunc() { 847 var tooltip = document.getElementById("myTooltip"); 848 tooltip.innerHTML = "Copy to clipboard"; 849} 850 851// FIX CHECKS VERTICAL ALIGN 852 853 854function fixChecksva(){ 855 856 var checksintotd = document.getElementsByClassName('ui-chkbox ui-widget') 857 var checksintotdl = checksintotd.length 858 //console.log('checksintotdl ' + checksintotdl) 859 if(checksintotdl > 0){ 860 for (i = 0; i < checksintotdl; i++) { 861 var td_parent = checksintotd[i].parentElement 862 var tdparent = checksintotd[i].parentElement.tagName 863 //console.log('tdparent ' + tdparent) 864 if(tdparent == "TD"){ 865 td_parent.classList.add('fix_check_td'); 866 } 867 } 868 } 869} 870 871$( window ).on( "load", function() { 872 //fixChecksva(); 873}); 874 875// FIX TF TABS 876 877function tfsettabfunc(){ 878 var tfsettab = document.getElementsByClassName('tfsettabsext') 879 var tfsettabsrbut = document.getElementsByClassName('tfsettabsrbut') 880 881 if( tfsettab[0].classList.contains('up') ){ 882 tfsettab[0].classList.remove('up') 883 }else{ 884 tfsettab[0].classList.add('up') 885 } 886 887 if( tfsettabsrbut[0].classList.contains('up') ){ 888 tfsettabsrbut[0].classList.remove('up') 889 }else{ 890 tfsettabsrbut[0].classList.add('up') 891 } 892 893 894} 895 896 897// FIX DROP 898 899function fix_copy_tf_js(){ 900 901 var fix_copy_tf_js_ver = document.getElementsByClassName('ui-autocomplete-panel')[0] 902 var fix_copy_tf_js_val = document.getElementById('fix_copy_tf_js') 903 if (fix_copy_tf_js_val != null){ 904 var thetop = fix_copy_tf_js_ver.style.top 905 document.getElementById('fix_copy_tf_js').innerHTML= '<style>body.signed-in .ui-autocomplete-panel.ui-input-overlay{top:calc('+thetop+' - 64px)!important;}</style>'; 906 } 907} 908 909$(document).on('click', '.ui-autocomplete-dropdown', function () { 910 setTimeout(fix_copy_tf_js, 400); 911}); 912 913 914// RESPONSIVE NO HORIZONTAL MODE 915 916function resp_no_hor(){ 917 var screenh = screen.height; 918 var screenw = screen.width; 919 if(screenw > screenh && screenw < 1024){ 920 alert('RESPONSIVE HORIZONTAL MODE MESSAGE'); 921 } 922} 923 924// SIMPLE DONATE 925 926function simpledonatedetect(){ 927 928 var sddetect = document.getElementsByClassName('simple_donate') 929 var sddetectl = sddetect.length 930 931 if(sddetectl > 0){ 932 //alert('sddetect') 933 document.getElementsByTagName("BODY")[0].classList.add('simple_donate_body') 934 935 } 936 937 var btsdon = document.getElementsByClassName('but_simdon') 938 var btsdonl = btsdon.length 939 //console.log('btsdonl - ' + btsdonl ) 940 941 if(btsdonl > 0){ 942 for (i = 0; i < btsdonl; i++) { 943 944 if( btsdon[i].classList.contains('ui-state-active') ){ 945 btsdon[i].classList.add("bg2") 946 } 947 948 } 949 } 950 951} 952 953 954 955 956function simdon_amo2(){ 957 958 var donamo = document.getElementsByClassName('rb_simdon_amount') 959 var donamol = donamo.length 960 //console.log('donamol' + donamol) 961 962 963 964 if(donamol > 0){ 965 966 var donamoin = donamo[0].getElementsByTagName("INPUT") 967 var donamoinl = donamoin.length 968 969 for (y = 0; y < donamoinl; y++) { 970 var donamoini = donamo[0].getElementsByTagName("INPUT")[y] 971 //var donamoinval = donamo[0].getElementsByTagName("INPUT")[y].value 972 var donamoinvalck = donamo[0].getElementsByTagName("INPUT")[y].checked 973 974 if(donamoinvalck == true){ 975 donamoini.parentElement.classList.add("coinv") 976 donamoini.parentElement.classList.add("bg2") 977 }else{ 978 donamoini.parentElement.classList.remove("coinv") 979 donamoini.parentElement.classList.remove("bg2") 980 } 981 } 982 983 } 984 //console.log('simdon_amo2') 985} 986 987 988function simdon_amo(){ 989 990 var donamo = document.getElementsByClassName('rb_simdon_amount') 991 var donamol = donamo.length 992 //console.log('donamol' + donamol) 993 994 var donamoin = donamo[0].getElementsByTagName("INPUT") 995 var donamoinl = donamoin.length 996 997 if(donamol > 0){ 998 for (i = 0; i < donamoinl; i++) { 999 var donamoini = donamo[0].getElementsByTagName("INPUT")[i] 1000 1001 donamoini.parentElement.classList.remove("coinv") 1002 donamoini.parentElement.classList.remove("bg2") 1003 } 1004 1005 } 1006 //setTimeout(simdon_amo2, 400); 1007} 1008 1009 1010 1011 1012$(document).on('click', '.rb_simdon_amount', function () { 1013 setTimeout(simdon_amo2, 400); 1014}); 1015 1016$( window ).on( "load", function() { 1017 setTimeout(simdon_amo2, 400); 1018 //console.log('simdon_amo2 onload') 1019}); 1020 1021 1022// TF LIST FIX HEIGHT LI 1023 1024 1025function tf_fix_lixt_box_h(){ 1026 1027 var tflistdetect = document.getElementsByClassName('teamf_grid') 1028 var tflistdetectl = tflistdetect.length 1029 1030 if(tflistdetectl > 0){ 1031 1032 console.log('tf pasa') 1033 } 1034 1035} 1036 1037$( window ).on( "load", function() { 1038 tf_fix_lixt_box_h(); 1039}); 1040 1041 1042// donate amount 1043 1044function don_amo(){ 1045 1046 var donamo = document.getElementsByClassName('rb_don_amount') 1047 var donamol = donamo.length 1048 //console.log('donamol' + donamol) 1049 1050 if(donamol > 0){ 1051 1052 var donamoin = donamo[0].getElementsByTagName("INPUT") 1053 var donamoinl = donamoin.length 1054 1055 for (i = 0; i < donamoinl; i++) { 1056 var donamoini = donamo[0].getElementsByTagName("INPUT")[i] 1057 var donamoinval = donamo[0].getElementsByTagName("INPUT")[i].value 1058 var donamoinvalck = donamo[0].getElementsByTagName("INPUT")[i].checked 1059 //console.log('donamoinval' + donamoinval + 'donamoinvalck' + donamoinvalck ) 1060 1061 donamoini.parentElement.classList.remove("coinv") 1062 donamoini.parentElement.classList.remove("bg2") 1063 1064 1065 if(donamoinvalck == true){ 1066 donamoini.parentElement.classList.add("coinv") 1067 donamoini.parentElement.classList.add("bg2") 1068 1069 //document.getElementsByClassName('input_your_donation')[0].value = donamoinval 1070 } 1071 1072 if(donamoinval != "Other"){
1073 //document.getElementsByClassName('ext_input_other_amount')[0].style.display = "none" 1074 } 1075 1076 //document.getElementsByClassName('input_your_donation')[0].value = "" 1077 1078 if(donamoinvalck == true && donamoinval == "Other"){ 1079 //document.getElementsByClassName('ext_input_other_amount')[0].style.display = "block" 1080 //document.getElementsByClassName('input_other_amount')[0].focus() 1081 //document.getElementsByClassName('input_other_amount')[0].value = "" 1082 //document.getElementsByClassName('input_your_donation')[0].value = "" 1083 } 1084 1085 } 1086 //console.log('donamoinl' + donamoinl) 1087 } 1088} 1089 1090 1091 1092 1093 1094$(document).on('keyup', '.input_other_amount', function () { 1095 //console.log('change value x') 1096 document.getElementsByClassName('input_your_donation')[0].value = document.getElementsByClassName('input_other_amount')[0].value 1097}); 1098 1099 1100$(document).on('click', '.rb_don_amount', function () { 1101 don_amo(); 1102 console.log('don_amo') 1103}); 1104 1105 1106$( window ).on( "load", function() { 1107 don_amo(); 1108 //console.log('don_amo onload') 1109}); 1110 1111 1112// ONLINE DONATION DETECT 1113 1114function onldondetect(){ 1115 1116 var onlddetect = document.getElementsByClassName('onl_don') 1117 var onlddetectl = onlddetect.length 1118 1119 if(onlddetectl > 0){ 1120 //alert('sddetect') 1121 document.getElementsByTagName("BODY")[0].classList.add('onl_don_body') 1122 1123 } 1124 1125} 1126 1127 1128 1129// ONL _DON FOCUS 1130 1131 1132function don_amo_foc(){ 1133 1134 var donamo = document.getElementsByClassName('rb_don_amount') 1135 var donamol = donamo.length 1136 //console.log('donamol' + donamol) 1137 1138 var donamoin = donamo[0].getElementsByTagName("INPUT") 1139 var donamoinl = donamoin.length 1140 1141 if(donamol > 0){ 1142 for (i = 0; i < donamoinl; i++) { 1143 var donamoini = donamo[0].getElementsByTagName("INPUT")[i] 1144 var donamoinval = donamo[0].getElementsByTagName("INPUT")[i].value 1145 var donamoinvalck = donamo[0].getElementsByTagName("INPUT")[i].checked 1146 //console.log('donamoinval' + donamoinval + 'donamoinvalck' + donamoinvalck ) 1147 1148 donamoini.parentElement.classList.remove("coinv") 1149 donamoini.parentElement.classList.remove("bg2") 1150 1151 if(donamoinval == "Other"){ 1152 donamoini.parentElement.classList.add("coinv") 1153 donamoini.parentElement.classList.add("bg2") 1154 //document.getElementsByClassName('input_your_donation')[0].value = donamoinval 1155 } 1156 1157 } 1158 //console.log('donamoinl' + donamoinl) 1159 } 1160} 1161 1162 1163 1164$(document).on('focus', '.input_your_donation', function () { 1165 don_amo_foc() 1166}); 1167 1168 1169// SIMPLE DONATE FIX BG2 BUTTONS 1170 1171function sdbg2but(){ 1172 1173 var sdbg2butport = document.getElementsByClassName('simple_donate') 1174 var sdbg2butportl = sdbg2butport.length 1175 //console.log('sdbg2butportl' + sdbg2butportl) 1176} 1177 1178 1179$( window ).on( "load", function() { 1180 sdbg2but(); 1181}); 1182 1183 1184 1185// REMOVE H1 1186 1187 1188function remh1(){ 1189 1190 var remh1 = document.getElementsByClassName('hide-accessible') 1191 var remh1l = remh1.length 1192 //console.log('remh1l' + remh1l) 1193 //document.getElementsByClassName('hide-accessible')[0].remove() 1194 //document.getElementsByClassName('hide-accessible')[1].remove() 1195 if(remh1l > 0){ 1196 for (i = 0; i < remh1l; i++) { 1197 //document.getElementsByClassName('hide-accessible')[0].remove() 1198 //console.log('remove' + i) 1199 } 1200 } 1201 try { 1202 //document.getElementsByClassName('gray')[0].remove() 1203 }catch(err) {} 1204} 1205 1206 1207$( window ).on( "load", function() { 1208 //remh1(); 1209}); 1210 1211 1212 1213// A NOFOLLOW FORGOT PASS 1214 1215function anofollow_forgot(){ 1216 try { 1217 var afforgot = document.getElementById("_com_liferay_login_web_portlet_LoginPortlet_ctvk__null__null").rel = "nofollow" 1218 }catch(err){} 1219} 1220 1221$( window ).on( "load", function() { 1222 anofollow_forgot() 1223}); 1224 1225 1226 1227// FIX BG IMAGE TEMPLATE 1228 1229function fixbgtemp(){ 1230 var fixbgt = document.getElementsByTagName("B") 1231 var fixbgtl = fixbgt.length; 1232 //console.log('fixbgtl: ' + fixbgtl); 1233 if(fixbgtl > 0){ 1234 for (i = 0; i < fixbgtl; i++) { 1235 var fixbgtc = fixbgt[i].innerHTML; 1236 //console.log('fixbgtc: ' + fixbgtc); 1237 if( fixbgtc == 'BACKGROUND IMAGE ADMIN VIEW'){ 1238 const fixbgsty = document.createElement("div"); 1239 fixbgsty.id = "fixbgstydiv"; 1240 document.body.appendChild(fixbgsty); 1241 document.getElementById("fixbgstydiv").innerHTML = '<style>body.aa01.signed-out .arreva_grid .grid_int{z-index: -1;}</style>'; 1242 document.getElementsByTagName("BODY")[0].classList.add('fixbgimgtemplate') 1243 } 1244 } 1245 } 1246} 1247 1248$( window ).on( "load", function() { 1249 fixbgtemp(); 1250}); 1251 1252// AUTO COMPLETE OFF 1253 1254$(document).ready(function() { 1255$('input').attr('autocomplete', 'new-password'); 1256}); 1257 1258
1259// GRANTS RADIO BUTTONS 1260 1261 1262function grantsradio(){ 1263 1264 var graradio = document.getElementsByClassName('grants_radio') 1265 var graradiol = graradio.length 1266 //console.log("graradiol - " + graradiol ) 1267 1268 if(graradiol > 0){ 1269 for (i = 0; i < 2; i++) { 1270 var graradiorb = graradio[0].getElementsByTagName("INPUT")[i] 1271 //console.log("graradiorb - " + graradiorb.checked ) 1272 if( graradiorb.checked == true ){ 1273 graradiorb.parentElement.classList.add("bg2") 1274 graradiorb.parentElement.classList.add("coinv") 1275 } 1276 if( graradiorb.disabled == true && graradiorb.checked != true ){ 1277 graradiorb.parentElement.classList.add("display_none") 1278 } 1279 } 1280 1281 } 1282} 1283 1284$( window ).on( "load", function() { 1285 grantsradio(); 1286}); 1287 1288 1289$(document).on('click', '.grants_radio', function () { 1290 setTimeout(grantsradio, 400); 1291 setTimeout(grantsradio, 600); 1292 setTimeout(grantsradio, 800); 1293}); 1294 1295// MULTI STANDARD 1:33 1296 1297function mb_stand_133(){ 1298 1299 var mb_standul = document.getElementsByClassName('type_standard') 1300 var mb_standull = mb_standul.length 1301 //console.log('mb_standull ' + mb_standull) 1302 1303 if(mb_standull > 0){ 1304 1305 for (i = 0; i < mb_standull; i++) { 1306 var mb_standulimg = mb_standul[i].getElementsByClassName('spg_img_box') 1307 var mb_standulimgl = mb_standulimg.length 1308 console.log('mb_standulimgl ' + mb_standulimgl) 1309 1310 for (y = 0; y < mb_standulimgl; y++) { 1311 var mb_standulimgimg = mb_standulimg[y].getElementsByTagName("IMG")[0] 1312 var mb_standulimgimgw = mb_standulimgimg.offsetWidth 1313 console.log('mb_standulimgimgw ' + mb_standulimgimgw) 1314 var mb_standulimgimgh = (mb_standulimgimgw / 1.33333) 1315 console.log('mb_standulimgimgh ' + mb_standulimgimgh) 1316 mb_standulimgimg.style.height = "" + mb_standulimgimgh + "px" 1317 mb_standulimgimg.style.maxHeight = "" + mb_standulimgimgh + "px" 1318 mb_standulimgimg.parentElement.parentElement.style.height = "" + mb_standulimgimgh + "px" 1319 mb_standulimgimg.parentElement.parentElement.style.maxHeight = "" + mb_standulimgimgh + "px" 1320 } 1321 1322 } 1323 //console.log('donamoinl' + donamoinl) 1324 } 1325 1326 1327 1328} 1329 1330$( window ).on( "load", function() { 1331 mb_stand_133(); 1332}); 1333 1334$(window).on('resize', function(){ 1335 mb_stand_133(); 1336}); 1337 1338 1339// BG2 COINV UPLOAD BUTTON 1340 1341 1342function upbutcoinvbg2(){ 1343 1344 var upbutc = document.getElementsByClassName('qq-upload-button') 1345 var upbutcl = upbutc.length 1346 //console.log('upbutcl ' + upbutcl) 1347 1348 if(upbutcl > 0){ 1349 1350 for (i = 0; i < upbutcl; i++) { 1351 1352 try { 1353 var upbutspan = upbutc[i].getElementsByTagName("SPAN")[0] 1354 upbutspan.classList.add("bg2") 1355 upbutspan.classList.add("coinv") 1356 }catch(err){ 1357 1358 } 1359 1360 } 1361 } 1362} 1363 1364$( window ).on( "load", function() { 1365 upbutcoinvbg2(); 1366}); 1367 1368$( window ).scroll(function() { 1369 upbutcoinvbg2(); 1370}); 1371 1372 1373 1374// fix select wirh search 1375 1376 1377function uiselectonemenu(){ 1378 1379 var uisele = document.getElementsByClassName('ui-selectonemenu-items') 1380 var uiselel = uisele.length 1381 //console.log('uiselel ' + uiselel) 1382 1383 if(uiselel > 0){ 1384 1385 for (i = 0; i < uiselel; i++) { 1386 uisele[i].classList.add("ff1") 1387 } 1388 } 1389} 1390 1391$(document).on('click', '.ui-selectonemenu', function () { 1392 setTimeout(uiselectonemenu, 0); 1393 setTimeout(uiselectonemenu, 400); 1394}); 1395 1396 1397// DISPLAY NONE ALERT CHECK TF ONLY P5 1398 1399 1400function fapplychanges(){ 1401 var dapplyc = document.getElementsByClassName('ui-dialog-content') 1402 var dapplycl = dapplyc.length 1403 //console.log('xx dapplycl ' + dapplycl) 1404 1405 if(dapplycl > 0){ 1406 1407 for (i = 0; i < dapplycl; i++) { 1408 1409 var dapplyctd = dapplyc[i].getElementsByTagName("TD") 1410 var dapplyctdl = dapplyctd.length 1411 1412 1413 for (j = 0; j < dapplyctdl; j++) { 1414 var tdval = dapplyctd[j].innerHTML 1415 //console.log('yy ' + tdval) 1416 if(tdval == "Apply changes to existing fundraising webpages?"){ 1417 1418 try { 1419 dapplyctd[j].parentElement.classList.add("display_none") 1420 }catch(err){ 1421 1422 } 1423 1424 } 1425 1426 } 1427 } 1428 } 1429 1430 1431} 1432 1433$( window ).on( "load", function() { 1434 fapplychanges(); 1435}); 1436 1437$(document).on('click', '.teamfundraisingportlet', function () { 1438 fapplychanges(); 1439}); 1440 1441 1442// SIMPLE DONATE BUTTONS 1443 1444 1445function simdonbut(){ 1446 1447 var sdonbut = document.getElementsByClassName('but_simdon') 1448 var sdonbutl = sdonbut.length 1449 //console.log('sdonbutl ' + sdonbutl) 1450 1451 if(sdonbutl > 0){ 1452 for (i = 0; i < sdonbutl; i++) { 1453 if( sdonbut[i].classList.contains('ui-state-active') ){ 1454 sdonbut[i].classList.add("bg2") 1455 sdonbut[i].classList.add("coinv") 1456 } 1457 } 1458 } 1459} 1460 1461$( window ).on( "load", function() { 1462 simdonbut(); 1463}); 1464 1465$(document).on('click', '.but_simdon', function () { 1466 setTimeout(simdonbut, 0); 1467 setTimeout(simdonbut, 400); 1468 setTimeout(simdonbut, 800); 1469}); 1470 1471 1472 1473// FIELDSET EXP COL 1474 1475function fbhec(but){ 1476 var butfsparent = but.parentElement.classList 1477 1478 if( butfsparent.contains('fbh_exp') ){ 1479 butfsparent.add("fbh_col") 1480 butfsparent.remove("fbh_exp") 1481 but.classList.add("arrow_up") 1482 but.classList.remove("arrow_down") 1483 }else{ 1484 butfsparent.remove("fbh_col") 1485 butfsparent.add("fbh_exp") 1486 but.classList.remove("arrow_up") 1487 but.classList.add("arrow_down") 1488 } 1489 1490 //alert('butfsparent: ' + butfsparent) 1491 1492 1493} 1494 1495 1496// FIELDSET EXP COL TOPTIONS 1497 1498function fbhtoec(but){ 1499 var butfsparent = but.parentElement.parentElement.parentElement.classList 1500 1501 if( butfsparent.contains('fbh_exp') || butfsparent == '' ){ 1502 butfsparent.add("fbh_col") 1503 butfsparent.remove("fbh_exp") 1504 but.classList.add("arrow_up") 1505 but.classList.remove("arrow_down") 1506 }else{ 1507 butfsparent.remove("fbh_col") 1508 butfsparent.add("fbh_exp") 1509 but.classList.remove("arrow_up") 1510 but.classList.add("arrow_down") 1511 } 1512 1513} 1514 1515 1516// FIX ui-selectcheckboxmenu-panel 1517 1518function fixschbmp(){ 1519 1520 var fixschbmpvar = document.getElementsByClassName('ui-selectcheckboxmenu-panel') 1521 var fixschbmpvarl = fixschbmpvar.length 1522 1523 if(fixschbmpvarl > 0){ 1524 for (y = 0; y < fixschbmpvarl; y++) { 1525 1526 var fixschbmpvartop = fixschbmpvar[y].style.top 1527 1528 //console.log('fixschbmpvartop ' + (Number(fixschbmpvartop.slice(-0, -2)) - 64) ) 1529 1530 //fixschbmpvar[y].style.top = "" + (Number(fixschbmpvartop.slice(-0, -2)) - 64) + "px"; 1531 1532 1533 //alert(fixschbmpvartop.slice(-0, -2)) 1534 1535 var fixschbmpli = fixschbmpvar[y].getElementsByClassName('ui-selectcheckboxmenu-item') 1536 var fixschbmplil = fixschbmpli.length 1537 1538 for (i = 0; i < fixschbmplil; i++) { 1539 1540 fixschbmpli[i].classList.add("ff1") 1541 fixschbmpli[i].classList.add("fs75") 1542 fixschbmpli[i].classList.add("fw400") 1543 } 1544 } 1545 } 1546} 1547 1548$(document).on('click', '.ui-selectcheckboxmenu', function () { 1549 setTimeout(fixschbmp, 100); 1550}); 1551 1552 1553 1554 1555 1556// FIELDSET EXP COL PROMO CODES 1557 1558function fbhpcec(but){ 1559 var butfsparent = but.parentElement.parentElement.parentElement.classList 1560 1561 if( butfsparent.contains('fbh_exp') || butfsparent == '' ){ 1562 butfsparent.add("fbh_col") 1563 butfsparent.remove("fbh_exp") 1564 but.classList.add("arrow_up") 1565 but.classList.remove("arrow_down") 1566 }else{ 1567 butfsparent.remove("fbh_col") 1568 butfsparent.add("fbh_exp") 1569 but.classList.remove("arrow_up") 1570 but.classList.add("arrow_down") 1571 } 1572 1573} 1574 1575 1576 1577// EXPAND COLLAPSE ALL 1578 1579function expaall(){ 1580 var blocec = document.getElementsByTagName("FIELDSET") 1581 var blocecl = blocec.length 1582 console.log('blocecl:' + blocecl) 1583 for (i = 0; i < blocecl; i++) { 1584 if( blocec[i].classList.contains('fbh_col') ){ 1585 blocec[i].classList.remove('fbh_col') 1586 blocec[i].classList.add('fbh_exp') 1587 blocec[i].getElementsByClassName('fbh_ec')[0].classList.remove('arrow_up') 1588 blocec[i].getElementsByClassName('fbh_ec')[0].classList.add('arrow_down') 1589 } 1590 } 1591 1592 1593 1594} 1595 1596function collaall(){ 1597 var blocec = document.getElementsByTagName("FIELDSET") 1598 var blocecl = blocec.length 1599 console.log('blocecl:' + blocecl) 1600 for (i = 0; i < blocecl; i++) { 1601 if( blocec[i].classList.contains('fbh_exp') ){ 1602 blocec[i].classList.remove('fbh_exp') 1603 blocec[i].classList.add('fbh_col') 1604 blocec[i].getElementsByClassName('fbh_ec')[0].classList.remove('arrow_down') 1605 blocec[i].getElementsByClassName('fbh_ec')[0].classList.add('arrow_up') 1606 } 1607 } 1608} 1609 1610 1611 1612 1613function excoall(excoid){ 1614 var excoide = document.getElementById(excoid) 1615 var excoideit = excoide.innerText 1616 //console.log("excoideit:" + excoideit) 1617 1618 if( excoideit == 'EXPAND ALL' ){ 1619 excoide.innerText = "COLLAPSE ALL" 1620 excoide.classList.add("collapse") 1621 excoide.classList.remove("expand") 1622 expaall() 1623 } 1624 1625 if( excoideit == 'COLLAPSE ALL' ){ 1626 excoide.innerText = "EXPAND ALL" 1627 excoide.classList.add("expand") 1628 excoide.classList.remove("collapse") 1629 collaall() 1630 } 1631 1632} 1633 1634 1635 1636/* OD DISPLAY OPTIONS */ 1637 1638 1639function move_od_disp_opt(butpos){ 1640 var movea = document.getElementsByClassName('movea') 1641 var moveb = document.getElementsByClassName('moveb') 1642 var movec = document.getElementsByClassName('movec') 1643 var moved = document.getElementsByClassName('moved') 1644 var movee = document.getElementsByClassName('movee') 1645 var movef = document.getElementsByClassName('movef') 1646 var moveg = document.getElementsByClassName('moveg') 1647 if( butpos == "pos1"){ 1648 movea[0].classList.remove('b2') 1649 moveb[0].classList.remove('b2')
1650 movec[0].classList.remove('b2') 1651 moved[0].classList.remove('b2') 1652 movee[0].classList.remove('b2') 1653 movef[0].classList.remove('b2') 1654 moveg[0].classList.remove('b2') 1655 movea[0].classList.remove('b3') 1656 moveb[0].classList.remove('b3') 1657 movec[0].classList.remove('b3') 1658 moved[0].classList.remove('b3') 1659 movee[0].classList.remove('b3') 1660 movef[0].classList.remove('b3') 1661 moveg[0].classList.remove('b3') 1662 movea[0].classList.add('b1') 1663 moveb[0].classList.add('b1') 1664 movec[0].classList.add('b1') 1665 moved[0].classList.add('b1') 1666 movee[0].classList.add('b1') 1667 movef[0].classList.add('b1') 1668 moveg[0].classList.add('b1') 1669 } 1670 if( butpos == "pos2"){ 1671 movea[0].classList.remove('b1') 1672 moveb[0].classList.remove('b1') 1673 movec[0].classList.remove('b1') 1674 moved[0].classList.remove('b1') 1675 movee[0].classList.remove('b1') 1676 movef[0].classList.remove('b1') 1677 moveg[0].classList.remove('b1') 1678 movea[0].classList.remove('b3') 1679 moveb[0].classList.remove('b3') 1680 movec[0].classList.remove('b3') 1681 moved[0].classList.remove('b3') 1682 movee[0].classList.remove('b3') 1683 movef[0].classList.remove('b3') 1684 moveg[0].classList.remove('b3') 1685 movea[0].classList.add('b2') 1686 moveb[0].classList.add('b2') 1687 movec[0].classList.add('b2') 1688 moved[0].classList.add('b2') 1689 movee[0].classList.add('b2') 1690 movef[0].classList.add('b2') 1691 moveg[0].classList.add('b2') 1692 } 1693 if( butpos == "pos3"){ 1694 movea[0].classList.remove('b2') 1695 moveb[0].classList.remove('b2') 1696 movec[0].classList.remove('b2') 1697 moved[0].classList.remove('b2') 1698 movee[0].classList.remove('b2') 1699 movef[0].classList.remove('b2') 1700 moveg[0].classList.remove('b2') 1701 movea[0].classList.remove('b1') 1702 moveb[0].classList.remove('b1') 1703 movec[0].classList.remove('b1') 1704 moved[0].classList.remove('b1') 1705 movee[0].classList.remove('b1') 1706 movef[0].classList.remove('b1') 1707 moveg[0].classList.remove('b1') 1708 movea[0].classList.add('b3') 1709 moveb[0].classList.add('b3') 1710 movec[0].classList.add('b3') 1711 moved[0].classList.add('b3') 1712 movee[0].classList.add('b3') 1713 movef[0].classList.add('b3') 1714 moveg[0].classList.add('b3') 1715 } 1716} 1717 1718function move_od_disp_optn(butpos){ 1719 var movea = document.getElementsByClassName('nmovea') 1720 var moveb = document.getElementsByClassName('nmoveb') 1721 var movec = document.getElementsByClassName('nmovec') 1722 var moved = document.getElementsByClassName('nmoved') 1723 var movee = document.getElementsByClassName('nmovee') 1724 var movef = document.getElementsByClassName('nmovef') 1725 var moveg = document.getElementsByClassName('nmoveg') 1726 var moveh = document.getElementsByClassName('nmoveh') 1727 var movei = document.getElementsByClassName('nmovei') 1728 var movej = document.getElementsByClassName('nmovej') 1729 1730 if( butpos == "pos1"){ 1731 movea[0].classList.remove('b2') 1732 moveb[0].classList.remove('b2') 1733 movec[0].classList.remove('b2') 1734 moved[0].classList.remove('b2') 1735 movee[0].classList.remove('b2') 1736 movef[0].classList.remove('b2') 1737 moveg[0].classList.remove('b2') 1738 moveh[0].classList.remove('b2') 1739 movei[0].classList.remove('b2') 1740 movej[0].classList.remove('b2') 1741 1742 movea[0].classList.remove('b3') 1743 moveb[0].classList.remove('b3') 1744 movec[0].classList.remove('b3') 1745 moved[0].classList.remove('b3') 1746 movee[0].classList.remove('b3') 1747 movef[0].classList.remove('b3') 1748 moveg[0].classList.remove('b3') 1749 moveh[0].classList.remove('b3') 1750 movei[0].classList.remove('b3') 1751 movej[0].classList.remove('b3') 1752 1753 movea[0].classList.remove('b4') 1754 moveb[0].classList.remove('b4') 1755 movec[0].classList.remove('b4') 1756 moved[0].classList.remove('b4') 1757 movee[0].classList.remove('b4') 1758 movef[0].classList.remove('b4') 1759 moveg[0].classList.remove('b4') 1760 moveh[0].classList.remove('b4') 1761 movei[0].classList.remove('b4') 1762 movej[0].classList.remove('b4') 1763 1764 movea[0].classList.add('b1') 1765 moveb[0].classList.add('b1') 1766 movec[0].classList.add('b1') 1767 moved[0].classList.add('b1') 1768 movee[0].classList.add('b1') 1769 movef[0].classList.add('b1') 1770 moveg[0].classList.add('b1') 1771 moveh[0].classList.add('b1') 1772 movei[0].classList.add('b1') 1773 movej[0].classList.add('b1') 1774 1775 } 1776 if( butpos == "pos2"){ 1777 movea[0].classList.remove('b1') 1778 moveb[0].classList.remove('b1')
1779 movec[0].classList.remove('b1') 1780 moved[0].classList.remove('b1') 1781 movee[0].classList.remove('b1') 1782 movef[0].classList.remove('b1') 1783 moveg[0].classList.remove('b1') 1784 moveh[0].classList.remove('b1') 1785 movei[0].classList.remove('b1') 1786 movej[0].classList.remove('b1') 1787 1788 movea[0].classList.remove('b3') 1789 moveb[0].classList.remove('b3') 1790 movec[0].classList.remove('b3') 1791 moved[0].classList.remove('b3') 1792 movee[0].classList.remove('b3') 1793 movef[0].classList.remove('b3') 1794 moveg[0].classList.remove('b3') 1795 moveh[0].classList.remove('b3') 1796 movei[0].classList.remove('b3') 1797 movej[0].classList.remove('b3') 1798 1799 movea[0].classList.remove('b4') 1800 moveb[0].classList.remove('b4') 1801 movec[0].classList.remove('b4') 1802 moved[0].classList.remove('b4') 1803 movee[0].classList.remove('b4') 1804 movef[0].classList.remove('b4') 1805 moveg[0].classList.remove('b4') 1806 moveh[0].classList.remove('b4') 1807 movei[0].classList.remove('b4') 1808 movej[0].classList.remove('b4') 1809 1810 movea[0].classList.add('b2') 1811 moveb[0].classList.add('b2') 1812 movec[0].classList.add('b2') 1813 moved[0].classList.add('b2') 1814 movee[0].classList.add('b2') 1815 movef[0].classList.add('b2') 1816 moveg[0].classList.add('b2') 1817 moveh[0].classList.add('b2') 1818 movei[0].classList.add('b2') 1819 movej[0].classList.add('b2') 1820 } 1821 if( butpos == "pos3"){ 1822 movea[0].classList.remove('b1') 1823 moveb[0].classList.remove('b1') 1824 movec[0].classList.remove('b1') 1825 moved[0].classList.remove('b1') 1826 movee[0].classList.remove('b1') 1827 movef[0].classList.remove('b1') 1828 moveg[0].classList.remove('b1') 1829 moveh[0].classList.remove('b1') 1830 movei[0].classList.remove('b1') 1831 movej[0].classList.remove('b1') 1832 1833 movea[0].classList.remove('b2') 1834 moveb[0].classList.remove('b2') 1835 movec[0].classList.remove('b2') 1836 moved[0].classList.remove('b2') 1837 movee[0].classList.remove('b2') 1838 movef[0].classList.remove('b2') 1839 moveg[0].classList.remove('b2') 1840 moveh[0].classList.remove('b2') 1841 movei[0].classList.remove('b2') 1842 movej[0].classList.remove('b2') 1843 1844 movea[0].classList.remove('b4') 1845 moveb[0].classList.remove('b4') 1846 movec[0].classList.remove('b4') 1847 moved[0].classList.remove('b4') 1848 movee[0].classList.remove('b4') 1849 movef[0].classList.remove('b4') 1850 moveg[0].classList.remove('b4') 1851 moveh[0].classList.remove('b4') 1852 movei[0].classList.remove('b4') 1853 movej[0].classList.remove('b4') 1854 1855 movea[0].classList.add('b3') 1856 moveb[0].classList.add('b3') 1857 movec[0].classList.add('b3') 1858 moved[0].classList.add('b3') 1859 movee[0].classList.add('b3') 1860 movef[0].classList.add('b3') 1861 moveg[0].classList.add('b3') 1862 moveh[0].classList.add('b3') 1863 movei[0].classList.add('b3') 1864 movej[0].classList.add('b3') 1865 } 1866 if( butpos == "pos4"){ 1867 movea[0].classList.remove('b1') 1868 moveb[0].classList.remove('b1') 1869 movec[0].classList.remove('b1') 1870 moved[0].classList.remove('b1') 1871 movee[0].classList.remove('b1') 1872 movef[0].classList.remove('b1') 1873 moveg[0].classList.remove('b1') 1874 moveh[0].classList.remove('b1') 1875 movei[0].classList.remove('b1') 1876 movej[0].classList.remove('b1') 1877 1878 movea[0].classList.remove('b2') 1879 moveb[0].classList.remove('b2') 1880 movec[0].classList.remove('b2') 1881 moved[0].classList.remove('b2') 1882 movee[0].classList.remove('b2') 1883 movef[0].classList.remove('b2') 1884 moveg[0].classList.remove('b2') 1885 moveh[0].classList.remove('b2') 1886 movei[0].classList.remove('b2') 1887 movej[0].classList.remove('b2') 1888 1889 movea[0].classList.remove('b3') 1890 moveb[0].classList.remove('b3') 1891 movec[0].classList.remove('b3') 1892 moved[0].classList.remove('b3') 1893 movee[0].classList.remove('b3') 1894 movef[0].classList.remove('b3') 1895 moveg[0].classList.remove('b3') 1896 moveh[0].classList.remove('b3') 1897 movei[0].classList.remove('b3') 1898 movej[0].classList.remove('b3') 1899 1900 movea[0].classList.add('b4') 1901 moveb[0].classList.add('b4') 1902 movec[0].classList.add('b4') 1903 moved[0].classList.add('b4') 1904 movee[0].classList.add('b4') 1905 movef[0].classList.add('b4') 1906 moveg[0].classList.add('b4') 1907 moveh[0].classList.add('b4') 1908 movei[0].classList.add('b4') 1909 movej[0].classList.add('b4') 1910 } 1911} 1912 1913 1914// MEMBERSHIP ANCHOR 1915 1916function ms_anchor_position_func(){ 1917 document.getElementById('ms_anchor_position').scrollIntoView({ 1918 behavior: 'smooth' 1919 });
1920} 1921 1922$(document).on('click', '.memship_button_link', function () { 1923 //console.log('autoRenewMembership'); 1924 document.getElementById('ms_anchor_position').scrollIntoView({ 1925 behavior: 'smooth' 1926 }); 1927 setTimeout(ms_anchor_position_func, 200); 1928}); 1929 1930 1931// AP 1932 1933function ap_fixheight(){ 1934 //var apelem = document.querySelectorAll('.ap_blog_wc.custom.columns3'); 1935 var apelem = document.querySelectorAll('.portlet-asset-publisher.custom'); 1936 var apeleml = apelem.length 1937 //console.log('apeleml:' + apeleml) 1938 1939 if(apeleml > 0){ 1940 for (y = 0; y < apeleml; y++) { 1941 1942 var apelemli = apelem[y].getElementsByClassName('asset-abstract') 1943 var apelemltxt= apelem[y].querySelectorAll('.padding05em.width100.display_block'); 1944 1945 var apelemlil = apelemli.length 1946 1947 console.log('apelemlil:' + apelemlil) 1948 console.log('apelemltxt:' + apelemltxt) 1949 1950 var apelemlilhmaxf = 0 1951 var apelemltxtlhmaxf = 0 1952 1953 for (i = 0; i < apelemlil; i++) { 1954 1955 var apelemlilh = apelemli[i].offsetHeight 1956 var apelemltxth = apelemltxt[i].offsetHeight 1957 1958 console.log('apelemltxth:' + apelemltxth) 1959 1960 var apelemlilhmax = apelemlilh 1961 if (apelemlilhmax > apelemlilhmaxf) { 1962 apelemlilhmaxf = apelemlilhmax 1963 } 1964 var apelemltxthmax = apelemltxth 1965 if (apelemltxthmax > apelemltxtlhmaxf) { 1966 apelemltxtlhmaxf = apelemltxthmax 1967 } 1968 } 1969 1970 console.log('apelemlilhmaxf:' + apelemlilhmaxf)
1971 console.log('apelemltxtlhmaxf:' + apelemltxtlhmaxf) 1972 1973 for (z = 0; z < apelemlil; z++) { 1974 1975 apelemli[z].style.minHeight = '' + apelemlilhmaxf + 'px' 1976 //apelemltxt[z].style.minHeight = '' + apelemltxtlhmaxf + 'px' 1977 1978 } 1979 1980 } 1981 } 1982 1983} 1984 1985window.addEventListener('load', function() { 1986 //ap_fixheight(); 1987 setTimeout(ap_fixheight, 400); 1988}); 1989 1990 1991 1992//TF 1993 1994 1995 1996 1997function tflabel_txt(){ 1998 var tflabeltxt = document.querySelectorAll('.label_txt'); 1999 var tflabeltxtl = tflabeltxt.length 2000 //console.log('tflabeltxtl:' + tflabeltxtl) 2001 2002 if(tflabeltxtl > 0){ 2003 for (y = 0; y < tflabeltxtl; y++) { 2004 2005 var tflabeltxtlhtml = tflabeltxt[y].innerHTML 2006 var tflabeltxtlhtmll = tflabeltxtlhtml.length 2007 //console.log('tflabeltxtlhtml:' + tflabeltxtlhtml) 2008 //console.log('tflabeltxtlhtmll:' + tflabeltxtlhtmll) 2009 2010 if(tflabeltxtlhtmll <= 2){ 2011 tflabeltxt[y].style.color = "red" 2012 tflabeltxt[y].style.paddingRight = "0.15em" 2013 } 2014 2015 } 2016 } 2017 2018} 2019 2020 2021window.addEventListener('load', function() { 2022 2023 tflabel_txt(); 2024 2025 setInterval(function() { 2026 tflabel_txt(); 2027 }, 5000); 2028}); 2029 2030 2031// AP COL 1 2032 2033function ap_fixheightimg(){ 2034 var apelemim = document.querySelectorAll('.ap_blog_wc.custom.columns1'); 2035 var apelemiml = apelemim.length 2036 //console.log('apelemiml:' + apelemiml) 2037 2038 if(apelemiml > 0){ 2039 for (y = 0; y < apelemiml; y++) { 2040 2041 2042 var apelemimlimg = apelemim[y].querySelectorAll('.asset-small-image.img-thumbnail'); 2043 var apelemimlimgl = apelemimlimg.length 2044 console.log('apelemimlimgl:' + apelemimlimgl) 2045 var apelemimltit = apelemim[y].querySelectorAll('.asset-title.bg2.coinv.fs90.fw600.test'); 2046 var apelemimltitl = apelemimltit.length 2047 console.log('apelemimltitl:' + apelemimltitl) 2048 2049 for (i = 0; i < apelemimlimgl; i++) { 2050 var apelemimlimgh = apelemimlimg[i].offsetHeight 2051 console.log('classList:' + apelemimltit[i].classList) 2052 apelemimltit[i].style.color = "red" 2053 apelemimltit[i].style.top = "calc(" + apelemimlimgh + "px - 8vh)"; 2054 } 2055 2056 2057 } 2058 } 2059 2060} 2061 2062window.addEventListener('load', function() { 2063 ap_fixheightimg(); 2064}); 2065 2066 2067 2068 2069 2070// Selecciona todos los elementos con la clase 'bloqueador' 2071const elementosBloqueadores = document.querySelectorAll('.ui-selectbooleanbutton'); 2072 2073// Agrega un manejador de eventos para cada elemento bloqueador
2074elementosBloqueadores.forEach(function(elemento) { 2075 // Bloquea el inicio del arrastre 2076 elemento.addEventListener('dragstart', function(event) { 2077 event.preventDefault(); // Cancela el inicio del arrastre 2078 console.log('Arrastre bloqueado en:', elemento.textContent); 2079 }); 2080 2081 // Bloquea el evento drop 2082 elemento.addEventListener('drop', function(event) { 2083 event.preventDefault(); // Cancela la acción de soltar 2084 console.log('Suelta bloqueada en:', elemento.textContent); 2085 }); 2086}); 2087 2088 2089// SIMPLE SELECT 2090 2091function simpleselect(){ 2092 var simpleselectid = document.querySelectorAll('.recognitiont_info_preference'); 2093 var simpleselectidl = simpleselectid.length 2094 //console.log('simpleselectidl:' + simpleselectidl) 2095 2096 if(simpleselectidl > 0){ 2097 2098 var simpleselectilab = simpleselectid[0].querySelectorAll('.ui-selectonemenu-label'); 2099 var simpleselectilabl = simpleselectilab.length 2100 //console.log('simpleselectilabl:' + simpleselectilabl) 2101 2102 var simselph = simpleselectilab[0].getAttribute('data-placeholder') 2103 var simselit = simpleselectilab[0].innerText 2104 2105 if (simselph != simselit){ 2106 //console.log('igual') 2107 //simpleselectilab[0].style = "background-color:green!important;" 2108 2109 try { 2110 simpleselectid[0].classList.add('bgactive') 2111 simpleselectid[0].classList.add('bg2') 2112 simpleselectid[0].classList.add('coinv') 2113 simpleselectid[0].classList.remove('bgnoactive') 2114 simpleselectid[0].classList.remove('bggen') 2115 }catch(err){ 2116 } 2117 2118 }else{ 2119 2120 try { 2121 simpleselectid[0].classList.remove('bgactive') 2122 simpleselectid[0].classList.remove('bg2') 2123 simpleselectid[0].classList.remove('coinv') 2124 simpleselectid[0].classList.add('bgnoactive') 2125 simpleselectid[0].classList.add('bggen') 2126 2127 }catch(err){ 2128 } 2129 } 2130 } 2131} 2132 2133 2134window.onload = function() { 2135 setInterval(function() { 2136 simpleselect(); 2137 }, 1000); 2138}; 2139 2140 2141// INKIND CLEAR FILES 2142 2143function inkindcf(){ 2144 var inkindcftable = document.querySelectorAll('.in_kind_fund_table'); 2145 var inkindcftablel = inkindcftable.length 2146 //console.log('inkindcftablel:' + inkindcftablel) 2147 if(inkindcftablel > 0){ 2148 var inkindcftabletr = inkindcftable[0].querySelectorAll("tr") 2149 var inkindcftabletrl = inkindcftabletr.length 2150 //console.log('inkindcftabletrl:' + inkindcftabletrl) 2151 for (y = 0; y < inkindcftabletrl; y++) { 2152 var inkindcftabletd = inkindcftabletr[y].querySelectorAll("td") 2153 var inkindcftabletdl = inkindcftabletd.length 2154 //console.log('inkindcftabletdl:' + inkindcftabletdl) 2155 if(inkindcftabletdl > 0){ 2156 var inkindcftabletdcont = inkindcftabletd[0].innerHTML.length 2157 //console.log('pasa:' + inkindcftabletdcont) 2158 if(inkindcftabletdcont == 0){ 2159 inkindcftabletr[y].remove() 2160 } 2161 } 2162 } 2163 } 2164} 2165 2166 2167 2168window.addEventListener('load', function() { 2169 setInterval(function() { 2170 inkindcf(); 2171 }, 100); 2172}); 2173 2174 2175 2176// UDF 2177 2178 2179$(document).ready(function() { 2180 2181 $(document).on('click', '.udfcollapse', function() { 2182 console.log('pasa udfcollapse'); 2183 2184 const parentLabel = $(this).closest('.udfcollapselabel'); 2185 2186 const udfNext = parentLabel.find('.udfnext'); 2187 2188 if (udfNext.length > 0) { 2189 if (udfNext.css('display') === 'none') { 2190 udfNext.css('display', 'block'); 2191 } else { 2192 udfNext.css('display', 'none'); 2193 } 2194 } else { 2195 console.warn('No se encontró el elemento .udfnext'); 2196 } 2197 }); 2198}); 2199 2200 2201// fix table_hscroll 2202 2203 2204$(document).ready(function() { 2205 if ($('.table_hscroll_ext').length > 0 && $('a[title="Add new row"]').length > 0) { 2206 setInterval(function() { 2207 //console.log("table_hscroll") 2208 table_hscroll(); 2209 }, 1000); 2210 } 2211}); 2212 2213 2214// fix personal_fundraiser_ticket_table 2215 2216function pftt(){ 2217 2218 let table = document.querySelector('.personal_fundraiser_ticket_table.commit'); 2219 if (table) { 2220 let cells = table.getElementsByTagName('td'); 2221 for (let i = 0; i < cells.length; i++) { 2222 if (cells[i].innerHTML.trim() === '') { 2223 cells[i].classList.add('td_empty'); 2224 } 2225 if (cells[i].innerHTML.includes('inputPromoCode')) { 2226 cells[i].classList.add('td_in_pcode'); 2227 } 2228 } 2229 } 2230} 2231 2232window.addEventListener('load', function() { 2233 pftt(); 2234}); 2235 2236$(document).ready(function() { 2237 setInterval(function() { 2238 pftt(); 2239 }, 1000); 2240}); 2241 2242// APP FIX 050325 2243 2244function clearasset() { 2245 2246 let valclearasset = 0; 2247 2248 document.querySelectorAll('.asset-summary.fs80.coinv.fw400').forEach(container => { 2249
2250 [...container.childNodes].forEach(node => { 2251 if (node.nodeType === Node.TEXT_NODE && node.nodeValue.trim() !== '') { 2252 node.remove(); 2253 valclearasset = 1 2254 } 2255 }); 2256 2257 }); 2258 2259 let maxHeight = 0; 2260 2261 if(valclearasset == 1){ 2262 document.querySelectorAll('.asset-content').forEach(containeras => { 2263 let height = containeras.offsetHeight; 2264 console.log('Antes de limpiar:', height); 2265 if (height > maxHeight) { 2266 maxHeight = height + 50; 2267 } 2268 }); 2269 2270 document.querySelectorAll('.asset-abstract.default-asset-publisher').forEach(containe => { 2271 containe.style.height = `${maxHeight}px`; 2272 containe.style.minHeight = `${maxHeight}px`; 2273 }); 2274 } 2275} 2276 2277 2278window.addEventListener('load', function() { 2279 //clearasset() 2280 setTimeout(clearasset, 100); 2281}); 2282 2283 2284 2285// FIX fundraiser_detail_image_desc 2286 2287function fundtitlefix() { 2288 2289 const divFundraiser = document.querySelector('.fundraiser_detail_image_desc'); 2290 if (divFundraiser) { 2291 const divUiPanelgrid = divFundraiser.querySelector('.ui-panelgrid-content'); 2292 if (divUiPanelgrid) { 2293 if(divUiPanelgrid.innerHTML.length == 0){ 2294 divFundraiser.style.display = "none"; 2295 } 2296 //console.log("html:" + divUiPanelgrid.innerHTML); 2297 //console.log("length" + divUiPanelgrid.innerHTML.length); 2298 } 2299 } 2300} 2301 2302window.addEventListener('load', function() { 2303 fundtitlefix() 2304}); 2305 2306 2307// FIX blank ul list select firts item 2308 2309function uiselectonemenulistitem() { 2310 const usmlisti = document.querySelectorAll("li.ui-selectonemenu-item.ui-selectonemenu-list-item"); 2311 2312 usmlisti.forEach((usmlistio) => { 2313 const usmlistic = usmlistio.textContent.trim(); 2314 2315 if (usmlistic === "" || usmlistic === "\u00A0") { 2316 usmlistio.style.display = "none"; 2317 } 2318 }); 2319} 2320 2321window.addEventListener('load', function() { 2322 uiselectonemenulistitem(); 2323}); 2324 2325$(document).on('click', '.ui-selectonemenu', function () { 2326 uiselectonemenulistitem(); 2327}); 2328 2329 2330 2331 2332 2333// WEBPORTAL HEIGHT 2334 2335var webportalrech = 200 2336 2337function receivetochild(event) { 2338 const receivedValue = event.data; 2339 //console.log('>>> VALOR RECIBIDO DEL IFRAME:', receivedValue); 2340 webportalrech = receivedValue 2341 2342 const spanElement = document.getElementById('_ArrevawebPortalPortlet_WAR_ArrevaParameterPortlet_:form1:total_area'); 2343 2344 if (spanElement) { 2345 const objectElement = spanElement.querySelector('#objectForm'); 2346 2347 if (objectElement) { 2348 objectElement.style.height = '' + webportalrech + 'px'; 2349 //console.log('ALTURA DEL OBJECTFORM DENTRO DEL SPAN ESTABLECIDA:' + webportalrech + ''); 2350 } else { 2351 //console.log('El elemento objectForm no está dentro del span especificado.'); 2352 } 2353 } else { 2354 //console.log('No se encontró el elemento <span> con el ID especificado.'); 2355 } 2356 2357} 2358 2359 2360// Parent Script 2 2361 2362var valmovepopdialog = 0 2363 2364function movepopdialog(popval) { 2365 const targetElement = document.querySelector('.arreva_embed'); 2366 if (targetElement) { 2367 if (popval == "pop" && valmovepopdialog < 2) { 2368 targetElement.scrollIntoView({ behavior: 'smooth' }); 2369 valmovepopdialog = valmovepopdialog + 1 2370 console.log('movepopdialog') 2371 } 2372 if (popval == "nopop") { 2373 valmovepopdialog = 0 2374 } 2375 2376 } else { 2377 //console.warn('Elemento con la clase "arreva_embed" no encontrado.'); 2378 } 2379} 2380 2381function receivetochild2(event) { 2382 const anotherReceivedValue = event.data.data; 2383 //console.log('Nuevo valor 2 recibido del iframe:', anotherReceivedValue); 2384 movepopdialog(anotherReceivedValue); 2385} 2386 2387window.addEventListener('message', function(event) { 2388 2389 receivetochild(event); 2390 2391 if (event.data.type === 'varsendfromchild2') { 2392 receivetochild2(event); 2393 } 2394 2395}); 2396 2397 2398 2399// Events Ticketing Options Groups 2400 2401function tgteconload() { 2402 const table = document.querySelector('table.ticket_groups_table'); 2403 if (table) { 2404 const rows = table.querySelectorAll('tr'); 2405 rows.forEach(row => { 2406 row.classList.add('fbh_col'); 2407 }); 2408 } 2409} 2410 2411window.addEventListener('load', function() { 2412 tgteconload() 2413}); 2414 2415 2416function tgtec(but){ 2417 var butfsparent = but.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList 2418 2419 if( butfsparent.contains('fbh_exp') || butfsparent == '' ){ 2420 butfsparent.add("fbh_col") 2421 butfsparent.remove("fbh_exp") 2422 but.classList.add("arrow_up") 2423 but.classList.remove("arrow_down") 2424 }else{ 2425 butfsparent.remove("fbh_col") 2426 butfsparent.add("fbh_exp") 2427 but.classList.remove("arrow_up") 2428 but.classList.add("arrow_down") 2429 } 2430 2431} 2432 2433 2434// FIX BACKGROUND IMAGE TEMPLATE 2435 2436function fix_bgtmp() { 2437 const boldElements = document.querySelectorAll('b');
2438 boldElements.forEach(bElement => { 2439 if (bElement.textContent === 'BACKGROUND IMAGE ADMIN VIEW') { 2440 const newDiv = document.createElement('div'); 2441 newDiv.innerHTML = '<style>@media(max-width: 1080px){#column-1.portlet-column{position: inherit!important;}}@media (min-width: 780px){body.aa01 .arreva_grid .grid_int{display: table!important;}}@media (max-width: 780px){ body.aa01 .arreva_grid .portlet-column.portlet-column-last{display: table!important;} }</style>'; 2442 bElement.parentNode.insertBefore(newDiv, bElement.nextSibling); 2443 } 2444 }); 2445} 2446 2447window.addEventListener('load', function() { 2448 fix_bgtmp(); 2449}); 2450 2451 2452// CUSTOM MENU 2453 2454function cnmtype() { 2455 const menu = document.querySelector('ul.cnm_menu_ul'); 2456 if (!menu) return; 2457 2458 const items = Array.from(menu.querySelectorAll('li.cnm_menu_ul_li')); 2459 if (items.length === 0) return; 2460 2461 let currentRowTop = items[0].offsetTop; 2462 let currentRow = 1; 2463 let totalRows = 1; 2464 2465 items.forEach(item => { 2466 if (item.offsetTop !== currentRowTop) { 2467 totalRows++; 2468 currentRowTop = item.offsetTop; 2469 } 2470 }); 2471 2472 currentRowTop = items[0].offsetTop; 2473 items.forEach(item => { 2474 if (item.offsetTop !== currentRowTop) { 2475 currentRow++; 2476 currentRowTop = item.offsetTop; 2477 } 2478 item.className = item.className.replace(/row\d+|totalrows\d+/g, '').trim(); 2479 item.classList.add(`row${currentRow}`, `totalrows${totalRows}`); 2480 }); 2481} 2482 2483document.addEventListener('DOMContentLoaded', () => { 2484 cnmtype(); 2485 setInterval(cnmtype, 2000); 2486}); 2487 2488 2489 2490// g-recaptcha click hidden error 2491 2492 2493 2494$(document).on('mouseover', 'iframe[title="reCAPTCHA"]', function() { 2495 //console.log('test ok ok'); 2496 const scm = document.querySelector('.simpleCaptchaMsg'); 2497 if (scm) { 2498 scm.style.cssText = 'display: none !important'; 2499 } 2500}); 2501 2502 2503// BG TEMPLATE R FIX 2504 2505function bgfix() { 2506 // Verificar si el BODY tiene la clase "signed-out" 2507 if (document.body.classList.contains('signed-out')) { 2508 // Buscar si existe un elemento con el contenido "BACKGROUND IMAGE ADMIN VIEW" 2509 const elements = document.body.getElementsByTagName('*'); 2510 for (let i = 0; i < elements.length; i++) { 2511 if (elements[i].textContent.includes("BACKGROUND IMAGE ADMIN VIEW")) { 2512 // Extraer el fondo del BODY 2513 const computedStyle = window.getComputedStyle(document.body); 2514 const backgroundImage = computedStyle.backgroundImage; 2515 // Imprimir el background-image en la consola 2516 console.log('Background image:', backgroundImage); 2517 break; // Detener el bucle después de encontrar el elemento 2518 } 2519 } 2520 } 2521} 2522 2523window.addEventListener('load', function() { 2524 bgfix(); 2525}); 2526 2527// OD FORM DISPLAY OPTION GUEST 2528 2529function od_fdo_ordfer(od_fdo_ordfer_value){ 2530 2531 2532 var od_fdo_ordfer_val = od_fdo_ordfer_value 2533 2534 if(od_fdo_ordfer_val == "1"){ 2535 od_fdo_ordfer_val = "abcdefghij" 2536 } 2537 2538 if(od_fdo_ordfer_val == "2"){ 2539 od_fdo_ordfer_val = "abghcdefij" 2540 } 2541 2542 if(od_fdo_ordfer_val == "3"){ 2543 od_fdo_ordfer_val = "abghcdeifj" 2544 } 2545 2546 console.log ("od_fdo_ordfer_val: " + od_fdo_ordfer_val) 2547 2548 const pos1 = od_fdo_ordfer_val.slice(0, 1); 2549 const pos2 = od_fdo_ordfer_val.slice(1, 2); 2550 const pos3 = od_fdo_ordfer_val.slice(2, 3); 2551 const pos4 = od_fdo_ordfer_val.slice(3, 4); 2552 const pos5 = od_fdo_ordfer_val.slice(4, 5); 2553 const pos6 = od_fdo_ordfer_val.slice(5, 6); 2554 const pos7 = od_fdo_ordfer_val.slice(6, 7); 2555 const pos8 = od_fdo_ordfer_val.slice(7, 8); 2556 const pos9 = od_fdo_ordfer_val.slice(8, 9); 2557 const pos10 = od_fdo_ordfer_val.slice(9, 10); 2558 2559 console.log ("pos10: " + pos10) 2560 2561 var od_fdo_ordfer_html = "<style>.newodfdo.ob_blockor_"+ pos1 +"{order:1!important;}.newodfdo.ob_blockor_"+ pos2 +"{order:2!important;}.newodfdo.ob_blockor_"+ pos3 +"{order:3!important;}.newodfdo.ob_blockor_"+ pos4 +"{order:4!important;}.newodfdo.ob_blockor_"+ pos5 +"{order:5!important;}.newodfdo.ob_blockor_"+ pos6 +"{order:6!important;}.newodfdo.ob_blockor_"+ pos7 +"{order:7!important;}.newodfdo.ob_blockor_"+ pos8 +"{order:8!important;}.newodfdo.ob_blockor_"+ pos9 +"{order:9!important;}.newodfdo.ob_blockor_"+ pos10 +"{order:10!important;}</style>" 2562 2563 document.getElementById('od_fdo_ordfer').innerHTML = od_fdo_ordfer_html 2564} 2565 2566// OD FORM DISPLAY OPTION ADMIN BUTTONS 2567 2568$(document).on('click', '.odfdo_link', function (event) { 2569 event.preventDefault(); 2570 $('.odfdo_link').removeClass('selected'); 2571 $(this).addClass('selected'); 2572}); 2573 2574 2575function odfdo_link_select(){ 2576 var odfdo_link_value = document.getElementsByClassName('oddragval')[0] 2577 if(odfdo_link_value){ 2578 if(odfdo_link_value.value == "1"){ 2579 document.getElementsByClassName('odfdo_def')[0].classList.add('selected') 2580 } 2581 if(odfdo_link_value.value == "2"){ 2582 document.getElementsByClassName('odfdo_pos2')[0].classList.add('selected') 2583 } 2584 if(odfdo_link_value.value == "3"){ 2585 document.getElementsByClassName('odfdo_pos3')[0].classList.add('selected') 2586 }
2587 if((odfdo_link_value.value != "1") && (odfdo_link_value.value != "2") && (odfdo_link_value.value != "3")){ 2588 document.getElementsByClassName('odfdo_flex')[0].classList.add('selected') 2589 } 2590 } 2591} 2592 2593window.addEventListener('load', function() { 2594 odfdo_link_select(); 2595}); 2596 2597 2598function odfdo_link_flexselect() { 2599 2600 const flexElement = document.querySelector('.odfdo_flex'); 2601 if (flexElement && flexElement.classList.contains('selected')) { 2602 const dragContainer = document.querySelector('.oddragcontainer'); 2603 if (dragContainer) { 2604 dragContainer.classList.remove('pointer_events_none'); 2605 2606 } 2607 } 2608} 2609 2610 2611window.addEventListener('load', function() { 2612 setTimeout(odfdo_link_flexselect, 500); 2613}); 2614 2615function odfdo_link_flexyesselect(){ 2616 console.log('odfdo_link_flexyesselect') 2617} 2618 2619$(document).on('click', '.odfdo_flex', function (event) { 2620 console.log('odfdo_flex click') 2621 document.getElementsByClassName('oddragcontainer')[0].classList.remove('pointer_events_none') 2622}); 2623 2624 2625function odfdo_link_flexnoselect(){ 2626 console.log('odfdo_link_flexnoselect') 2627 document.getElementsByClassName('oddragcontainer')[0].classList.add('pointer_events_none') 2628} 2629 2630 2631 2632 2633// BIO FORM DISPLAY OPTION GUEST 2634 2635function bio_fdo_ordfer(od_fdo_ordfer_value){ 2636 2637 2638 var od_fdo_ordfer_val = od_fdo_ordfer_value 2639 2640 if(od_fdo_ordfer_val == "1"){ 2641 od_fdo_ordfer_val = "abcdefg" 2642 } 2643 2644 2645 console.log ("od_fdo_ordfer_val: " + od_fdo_ordfer_val) 2646 2647 const pos1 = od_fdo_ordfer_val.slice(0, 1); 2648 const pos2 = od_fdo_ordfer_val.slice(1, 2); 2649 const pos3 = od_fdo_ordfer_val.slice(2, 3); 2650 const pos4 = od_fdo_ordfer_val.slice(3, 4); 2651 const pos5 = od_fdo_ordfer_val.slice(4, 5); 2652 const pos6 = od_fdo_ordfer_val.slice(5, 6); 2653 const pos7 = od_fdo_ordfer_val.slice(6, 7); 2654 2655 var od_fdo_ordfer_html = "<style>.newodfdo.ob_blockor_"+ pos1 +"{order:1!important;}.newodfdo.ob_blockor_"+ pos2 +"{order:2!important;}.newodfdo.ob_blockor_"+ pos3 +"{order:3!important;}.newodfdo.ob_blockor_"+ pos4 +"{order:4!important;}.newodfdo.ob_blockor_"+ pos5 +"{order:5!important;}.newodfdo.ob_blockor_"+ pos6 +"{order:6!important;}.newodfdo.ob_blockor_"+ pos7 +"{order:7!important;}</style>" 2656 2657 document.getElementById('bio_fdo_ordfer').innerHTML = od_fdo_ordfer_html 2658} 2659 2660 2661 2662// SIMPLE WALLET 2663 2664 2665function craeadiv() { 2666 const divider = document.getElementById('divider'); 2667 if (!divider) return; 2668 2669 // Evitar duplicados 2670 if (document.getElementById('nuevosbotones')) return; 2671 2672 // Insertar inmediatamente después de #divider 2673 divider.insertAdjacentHTML('afterend', '<div id="nuevosbotones"><b>JS insert Pay Buttons CARD / BANK here</b></div>'); 2674 2675} 2676 2677 2678window.onload = function() { 2679 setInterval(function() { 2680 craeadiv(); 2681 }, 1000); 2682}; 2683 2684 2685// OD FORM DISPLAY OPTION GUEST V2 2686 2687function od_fdo_ordferv2(od_fdo_ordfer_value){ 2688 2689 2690 var od_fdo_ordfer_val = od_fdo_ordfer_value 2691 2692 if(od_fdo_ordfer_val == "1"){ 2693 od_fdo_ordfer_val = "abcdefghijklm" 2694 } 2695 2696 if(od_fdo_ordfer_val == "2"){ 2697 od_fdo_ordfer_val = "afghijbcdeklm" 2698 } 2699 2700 if(od_fdo_ordfer_val == "3"){ 2701 od_fdo_ordfer_val = "afghijbcdkelm" 2702 } 2703 2704 console.log ("od_fdo_ordfer_val: " + od_fdo_ordfer_val) 2705 2706 const pos1 = od_fdo_ordfer_val.slice(0, 1); 2707 const pos2 = od_fdo_ordfer_val.slice(1, 2); 2708 const pos3 = od_fdo_ordfer_val.slice(2, 3); 2709 const pos4 = od_fdo_ordfer_val.slice(3, 4); 2710 const pos5 = od_fdo_ordfer_val.slice(4, 5); 2711 const pos6 = od_fdo_ordfer_val.slice(5, 6); 2712 const pos7 = od_fdo_ordfer_val.slice(6, 7); 2713 const pos8 = od_fdo_ordfer_val.slice(7, 8); 2714 const pos9 = od_fdo_ordfer_val.slice(8, 9); 2715 const pos10 = od_fdo_ordfer_val.slice(9, 10); 2716 const pos11 = od_fdo_ordfer_val.slice(10, 11); 2717 const pos12 = od_fdo_ordfer_val.slice(11, 12); 2718 const pos13 = od_fdo_ordfer_val.slice(12, 13); 2719 2720 //console.log ("pos10: " + pos10) 2721 2722 var od_fdo_ordfer_html = "<style>.newodfdo.ob_blockor_"+ pos1 +"{order:1!important;}.newodfdo.ob_blockor_"+ pos2 +"{order:2!important;}.newodfdo.ob_blockor_"+ pos3 +"{order:3!important;}.newodfdo.ob_blockor_"+ pos4 +"{order:4!important;}.newodfdo.ob_blockor_"+ pos5 +"{order:5!important;}.newodfdo.ob_blockor_"+ pos6 +"{order:6!important;}.newodfdo.ob_blockor_"+ pos7 +"{order:7!important;}.newodfdo.ob_blockor_"+ pos8 +"{order:8!important;}.newodfdo.ob_blockor_"+ pos9 +"{order:9!important;}.newodfdo.ob_blockor_"+ pos10 +"{order:10!important;}.newodfdo.ob_blockor_"+ pos11 +"{order:11!important;}.newodfdo.ob_blockor_"+ pos12 +"{order:12!important;}.newodfdo.ob_blockor_"+ pos13 +"{order:13!important;}</style>" 2723 2724 document.getElementById('od_fdo_ordferv2').innerHTML = od_fdo_ordfer_html 2725} 2726 2727 2728// GSR FORM DISPLAY OPTION GUEST V2 2729 2730function gsr_fdo_ordferv2(gsr_fdo_ordfer_value){ 2731 2732 2733 var gsr_fdo_ordfer_val = gsr_fdo_ordfer_value 2734 2735 if(gsr_fdo_ordfer_val == "1"){ 2736 gsr_fdo_ordfer_val = "abcde" 2737 } 2738 2739 if(gsr_fdo_ordfer_val == "2"){ 2740 gsr_fdo_ordfer_val = "abcde" 2741 } 2742 2743 if(gsr_fdo_ordfer_val == "3"){ 2744 gsr_fdo_ordfer_val = "abcde" 2745 } 2746 2747 console.log ("gsr_fdo_ordfer_val: " + gsr_fdo_ordfer_val) 2748 2749 const pos1 = gsr_fdo_ordfer_val.slice(0, 1); 2750 const pos2 = gsr_fdo_ordfer_val.slice(1, 2); 2751 const pos3 = gsr_fdo_ordfer_val.slice(2, 3); 2752 const pos4 = gsr_fdo_ordfer_val.slice(3, 4); 2753 const pos5 = gsr_fdo_ordfer_val.slice(4, 5); 2754 2755 //console.log ("pos10: " + pos10) 2756 2757 var gsr_fdo_ordfer_html = "<style>.newgsrfdo.ob_blockor_"+ pos1 +"{order:1!important;}.newgsrfdo.ob_blockor_"+ pos2 +"{order:2!important;}.newgsrfdo.ob_blockor_"+ pos3 +"{order:3!important;}.newgsrfdo.ob_blockor_"+ pos4 +"{order:4!important;}.newgsrfdo.ob_blockor_"+ pos5 +"{order:5!important;}</style>" 2758 2759 document.getElementById('gsr_fdo_ordferv2').innerHTML = gsr_fdo_ordfer_html 2760} 2761 2762 2763// CSS LOCAL AND EMBED CSS FONT 2764 2765function newcssimport(){ 2766const el = document.getElementById('newcssimport'); 2767if (!el) return; 2768const originalvalue = el.value || ''; 2769const match = originalvalue.match(/(['"])(.*?)\1/); 2770const newvalue = match ? match[2] : ''; 2771document.getElementById('newcssimportdiv').innerHTML = 2772'<link href="' + newvalue + '" rel="stylesheet">'; 2773} 2774 2775 2776window.addEventListener('load', function() { 2777 setTimeout(newcssimport, 200);
2778}); 2779 2780function newcssimporth(){ 2781const elh = document.getElementById('newcssimporth'); 2782if (!elh) return; 2783const originalvalueh = elh.value || ''; 2784const matchh = originalvalueh.match(/(['"])(.*?)\1/); 2785const newvalueh = matchh ? matchh[2] : ''; 2786document.getElementById('newcssimportdivh').innerHTML = 2787'<link href="' + newvalueh + '" rel="stylesheet">'; 2788} 2789 2790 2791window.addEventListener('load', function() { 2792 setTimeout(newcssimporth, 200); 2793}); 2794 2795 2796 2797// DELUXE_DIALOG_BOX 2798 2799function dluxedb(){ 2800 const dluxedb = document.getElementsByClassName('deluxe_dialog_box')[0] 2801 if (!dluxedb) return; 2802 const dluxedbw = dluxedb.offsetWidth 2803 const dluxedbh = dluxedb.offsetHeight 2804 console.log('deluxe ' + dluxedb.offsetWidth + ' - - ' + dluxedb.offsetHeight ); 2805 const cwidth = document.documentElement.clientWidth 2806 const cheight = document.documentElement.clientHeight 2807 dluxedb.style.top = "" + (cheight - dluxedbh)/2 + "px" 2808 dluxedb.style.left = "" + (cwidth - dluxedbw)/2 + "px" 2809} 2810 2811 2812window.addEventListener('load', function() { 2813 setInterval(function() { 2814 dluxedb() 2815 }, 100); 2816}); 2817 2818 2819 2820// FIX BG IMAGE TEMPLATE 2821 2822function fixbgtemp() { 2823 if (document.body.innerHTML.includes("BACKGROUND IMAGE ADMIN VIEW")) { 2824 const div = document.createElement("div"); 2825 div.innerHTML = "<style>body.signed-out #wrapper{background-color:transparent!important;}</style>"; 2826 document.body.appendChild(div); 2827 } 2828} 2829 2830window.addEventListener("DOMContentLoaded", fixbgtemp); 2831 2832 2833 2834// WEBPORTAL DIRECT RELOAD NOT AVAILABLE 2835 2836 2837window.addEventListener('message', function(e) { 2838 if (e.data && e.data.type === 'topredir') { 2839 console.log('data:::', e.data.data); 2840 window.top.location.href = window.top.location.href 2841 } 2842}); 2843 2844 2845// GATEWAY MAGIC BUTTOM 2846 2847function gateway_mb(){ 2848 const gateway_mb_div = document.getElementsByClassName('gateway_mb_div')[0] 2849 if(gateway_mb_div.style.display == "none"){ 2850 gateway_mb_div.style.display = "block" 2851 }else{ 2852 gateway_mb_div.style.display = "none" 2853 } 2854} 2855 2856 2857$(document).on('click', '.gateway_mb_but', function () { 2858 //console.log('pasa gateway_mb_but') 2859 gateway_mb(); 2860}); 2861 2862 2863 2864// OD WALLET 2865 2866function wallet_buttons_width() { 2867 const ul = document.querySelector('ul.wallet_buttons'); 2868 if (!ul) { 2869 return; 2870 } 2871 const liCount = ul.querySelectorAll(':scope > li').length; 2872 var licountt = "li_" + liCount 2873 document.getElementsByClassName('wallet_buttons')[0].classList.add(licountt) 2874} 2875 2876 2877window.addEventListener('load', function() { 2878 wallet_buttons_width(); 2879 setTimeout(wallet_buttons_width, 200); 2880 setInterval(function() { 2881 wallet_buttons_width(); 2882 }, 100); 2883}); 2884 2885 2886function wall_vid_load(){ 2887 const ulwb = document.querySelector('ul.wallet_buttons'); 2888 if (ulwb) { 2889 wall_vid(wallet_jsvar) 2890 } 2891} 2892 2893window.onload = function() { 2894 wall_vid_load(); 2895}; 2896 2897 2898function checkammdom(){ 2899 console.log('checkammdom') 2900 const ammelements = document.getElementsByName("_ArrevaOnlineDonationsPortlet_WAR_ArrevaOnlineDonationsPortlet_:form1:rb_amount"); 2901 console.log('ammelements.length: ' + ammelements.length) 2902 2903 const sammelements = document.getElementsByName("_ArrevaSimpleDonationsPortlet_WAR_ArrevaDonationFormsPortlet_:form1:rb_amount"); 2904 console.log('sammelements.length: ' + sammelements.length) 2905 2906 for (let i = 0; i < ammelements.length; i++) { 2907 if (ammelements[i].checked) { 2908 ammelements[i].parentElement.classList.add('bg2') 2909 ammelements[i].parentElement.classList.add('coinv') 2910 console.log('check: ' + i) 2911 } 2912 } 2913 2914 for (let i = 0; i < sammelements.length; i++) { 2915 if (sammelements[i].checked) { 2916 sammelements[i].parentElement.classList.add('bg2') 2917 sammelements[i].parentElement.classList.add('coinv') 2918 console.log('scheck: ' + i) 2919 } 2920 } 2921 2922} 2923 2924function wall_vid(elwid){ 2925 console.log('elwid:' + elwid) 2926 document.getElementsByClassName(elwid)[0].classList.add('bg2') 2927 document.getElementsByClassName(elwid)[0].classList.add('coinv') 2928 console.log('pasa func selecvt amount:' + elwid) 2929 checkammdom() 2930} 2931 2932 2933$(document).on('click', '.wallet_pop_buttons', function (event) { 2934 console.log('wallet_pop_buttons click') 2935}); 2936 2937function wall_vids(){ 2938 2939 try { 2940 wall_vid(wallet_jsvar); 2941 } catch (error) {} 2942 2943 checkammdom() 2944} 2945 2946$(document).on('click', '.simod_submit_button', function (event) { 2947 setTimeout(wall_vids, 400); 2948}); 2949 2950$(document).on('click', '.ui-button-text.ui-c', function (event) { 2951 setTimeout(wall_vids, 400); 2952}); 2953 2954 2955 2956 2957 2958// COPY INPUT TEXT 2959 2960function inputtextcopyfun(){ 2961 const itc = document.querySelector('.inputtextcopy'); 2962 const itcvla = itc.value; 2963 navigator.clipboard.writeText(itcvla) 2964 alert('Value Copied'); 2965} 2966 2967$(document).on('click', '.inputtextcopy', function () { 2968 inputtextcopyfun();
2969}); 2970 2971 2972// GSR ONLOAD 2973 2974function gsronload(){ 2975 const gsronloadid = document.getElementById('_ArrevaGuestStayRequestPortlet_WAR_ArrevaGuestStayRequestPortlet_:form1') 2976 if(gsronloadid){ 2977 console.log('---> gsronload ') 2978 } 2979} 2980 2981window.addEventListener('load', function() { 2982 //gsronload(); 2983}); 2984 2985 2986// FIX CLOSE TIME PICKER 2987 2988function closetimepicker() { 2989 console.log('closetimepicker') 2990 const timepickerDiv = document.querySelector('.ui-timepicker-div'); 2991 2992 if (timepickerDiv) { 2993 const titleDiv = timepickerDiv.querySelector('.ui-datepicker-title'); 2994 2995 if (titleDiv) { 2996 const closeLink = document.createElement('a'); 2997 closeLink.textContent = 'x'; 2998 closeLink.href = '#'; 2999 closeLink.className = 'datepicker_close_link'; 3000 3001 closeLink.onclick = function(e) { 3002 e.preventDefault(); 3003 timepickerDiv.style.display = 'none'; 3004 }; 3005 3006 titleDiv.appendChild(closeLink); 3007 } 3008 } 3009} 3010 3011 3012$(document).on('focus', '.hasDatepicker', function (event) { 3013 setTimeout(closetimepicker, 100); 3014}); 3015 3016 3017 3018// GSR PDF 3019 3020function validatepdfgsrbut() { 3021 const container = document.getElementById('uploadtemplate-file'); 3022 if (container) { 3023 const button = container.querySelector('.qq-upload-button'); 3024 if (button) { 3025 button.classList.add('coinv', 'bg2', 'cursor_pointer'); 3026 //console.log("validatepdfgsrbut"); 3027 } 3028 } 3029} 3030 3031window.addEventListener('load', function() { 3032 setInterval(function() { 3033 validatepdfgsrbut(); 3034 }, 200); 3035}); 3036 3037 3038 3039// BG TEMPLATE ID 3040 3041function validabgtemplate() { 3042 const elements = document.querySelectorAll('b'); 3043 for (const el of elements) { 3044 if (el.textContent.trim() === 'BACKGROUND IMAGE ADMIN VIEW') { 3045 document.body.classList.add('bg_template'); 3046 break; 3047 } 3048 } 3049} 3050 3051window.addEventListener('load', function() { 3052 validabgtemplate(); 3053}); 3054 3055 3056 3057// VIDEO GALLERY 3058 3059function ytiframe(idtemp, ytnum, url) { 3060 3061 //console.log("yt ytiframe"); 3062 3063 const patron = /(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]{11})/i; 3064 const coincidencia = url.match(patron); 3065 3066 if (coincidencia && coincidencia[1]) { 3067 const videoId = coincidencia[1]; 3068 3069 //console.log("yt videoId: " + videoId) 3070 3071 // Usamos concatenación clásica con el operador '+' en lugar de '${}' 3072 3073 3074 const ytifra = '<iframe ' + 3075 'width="100%" ' + 3076 'height="auto" ' + 3077 'src="https://www.youtube-nocookie.com/embed/' + videoId + '" ' + 3078 'title="YouTube Video" ' + 3079 'frameborder="0" ' + 3080 'referrerpolicy="strict-origin-when-cross-origin" ' + 3081 'allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" ' + 3082 'allowfullscreen>' + 3083 '</iframe>'; 3084 3085 const elidyt = "yt_viewer_idart"+ idtemp +"_"+ ytnum +""; 3086 //console.log("yt elidyt 2: " + elidyt); 3087 document.getElementById(elidyt).innerHTML = ytifra; 3088 3089 3090 } else { 3091 return '<p class="error">URL YouTube Invalid.</p>'; 3092 } 3093} 3094 3095 3096// MARQUEE TF 3097 3098(function() { 3099 3100 let styleTag = document.getElementById('cssmarqueedin'); 3101 if (!styleTag) { 3102 styleTag = document.createElement('style'); 3103 styleTag.id = 'cssmarqueedin'; 3104 document.head.appendChild(styleTag); 3105 } 3106 3107 const velocidad = 60; 3108 let alturaRegistrada = 0; 3109 3110 setInterval(() => { 3111 const tabla = document.querySelector('.marqueetf-block table'); 3112 3113 if (tabla) { 3114 const alturaActual = tabla.getBoundingClientRect().height; 3115 3116 if (alturaActual > 100 && alturaActual !== alturaRegistrada) { 3117 alturaRegistrada = alturaActual; 3118 const duracion = (alturaActual / velocidad).toFixed(2); 3119 3120 styleTag.innerHTML = ` 3121 .marqueetf-content { 3122 animation: scrollDown ${duracion}s linear infinite reverse!important; 3123 } 3124 .marqueetf-content:hover { 3125 animation-play-state: paused !important; 3126 } 3127 `; 3128 } 3129 } 3130 }, 500); 3131})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.