1/*1789200780000*/ 2/** 3 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 4 * 5 * This library is free software; you can redistribute it and/or modify it under 6 * the terms of the GNU Lesser General Public License as published by the Free 7 * Software Foundation; either version 2.1 of the License, or (at your option) 8 * any later version. 9 * 10 * This library is distributed in the hope that it will be useful, but WITHOUT 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 12 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 13 * details. 14 */ 15 16/* eslint-disable prefer-arrow-callback */ 17AUI().ready( 18 /* 19 This function gets loaded when all the HTML, not including the portlets, is 20 loaded. 21 */ 22 23 function() {} 24); 25 26Liferay.Portlet.ready( 27 /* 28 This function gets loaded after each and every portlet on the page. 29 30 portletId: the current portlet's id 31 node: the Alloy Node object of the current portlet 32 */ 33 34 function(_portletId, _node) {} 35); 36 37Liferay.on( 38 'allPortletsReady', 39 40 /* 41 This function gets loaded when everything, including the portlets, is on 42 the page. 43 */ 44 45 function() { 46 47 if ( !window.timerFlag) { 48 49 //var func=getTime(); 50 } 51 52 $(".enlace-ancla").on("click",function(){ 53 54 setTimeout(function() { 55 var scrollTop = $(window).scrollTop(); 56 var finalScroll = scrollTop - 80; 57 $(window).scrollTop(finalScroll); 58 } 59 ,100) 60 }); 61 62 63 scrollTop(); 64 lateralMenu(); 65 language(); 66 search(); 67 goTop(); 68 mobileSites(); 69 desplegableFooter(); 70 columnMobile(); 71 contentTableFix(); 72 } 73); 74 75function contentTableFix(){ 76 77 if ($("#main-content table.TabDatosMonedas").length > 0 ){ 78 79 $("#main-content table.TabDatosMonedas").each(function(){ 80 var classTable=$(this).attr("class"); 81 var summaryTable=$(this).attr("summary"); 82 83 var tableHtml = $(this).html(); 84 $(this).parent().append("<div class='table-container'><table class='"+classTable+"' summary='"+summaryTable+"'>"+tableHtml+"</table></div>"); 85 $(this).html('<div class="table-container"></div>'); 86 $(this).remove(); 87 }); 88 } 89} 90 91function columnMobile(){ 92 93 $(".mobile-navigator").click(function(){ 94 95 $("body").toggleClass("show-second-column"); 96 }); 97} 98 99function goTop(){ 100 101 $(".scrollTop").click(function(){ 102 103 $('html, body').animate({ scrollTop: 0 }, 'slow', function () { 104 105 }); 106 }) 107} 108 109function getTime(){ 110 111 112 function getTimer(){ 113 var seg = $("#date-segundos").val(); 114 var min = $("#date-minutos").val(); 115 var hora = $("#date-hora").val(); 116 117 seg = parseFloat(seg);min = parseFloat(min);hora = parseFloat(hora); 118 119 if(seg==59){ 120 seg=0; 121 122 if(min==59){ 123 min=0; 124 if(hora=23){ 125 hora=1; 126 }else{ 127 hora=hora+1; 128 } 129 }else{ 130 min=min+1; 131 } 132 133 134 }else { 135 seg=seg+1; 136 137 } 138 seg = String(seg);min = String(min);hora = String(hora); 139 if(hora.length==1){ hora="0"+hora; }if(min.length==1){ min="0"+min; }if(seg.length==1){ seg="0"+seg; } 140 141 $("span#hora").html(hora+"h : "+min+"m : "+seg+"s"); 142 $("#date-segundos").val(seg); $("#date-minutos").val(min); $("#date-hora").val(hora); 143 } 144 145 window.timerFlag=window.setInterval(function(){ getTimer(); }, 1000); 146 147} 148 149 150function scrollTop(){ 151 var debounce_timer; 152 window.onscroll = function(){ 153 if(debounce_timer) { 154 window.clearTimeout(debounce_timer); 155 } 156 debounce_timer = window.setTimeout(function() { 157 // run your actual function here<br> 158 if($(window).scrollTop()>200){ 159 $("body").addClass("scrolled"); 160 }else { 161 $("body").removeClass("scrolled"); 162 } 163 }, 100); 164 }; 165} 166 167 168function flagTimer(element){ 169 170 $(element).removeClass("timer"); 171} 172 173function lateralMenu(){ 174 175 $("#menu-hamburguer").click(function(){ 176 177 var element=$(this); 178 if(!element.hasClass("timer")){ 179 180 if(window.innerWidth<=1149){ 181 $("body").toggleClass("show-mobile-menu"); 182 }else { 183 184 if( $("body").hasClass("hideMenu")){ 185 localStorage.setItem("menuStatus", "show"); 186 }else { 187 localStorage.setItem("menuStatus", "hide"); 188 } 189 $("body").toggleClass("hideMenu"); 190 } 191 element.addClass("timer"); 192 193 setTimeout(function () { 194 flagTimer("#menu-hamburguer"); 195 }, 1000) 196 } 197 }); 198 199 $(".navigation-overlay").click(function(){ 200 201 $("body").removeClass("show-mobile-menu"); 202 }); 203} 204 205function language(){ 206 207 $(".idioma > div > button").click(function(){ 208 209 $("body").toggleClass("show-language"); 210 $("body").removeClass("show-mobile-menu"); 211 212 }); 213 214 $("button.lang-2").focus(function(){ 215 $("#idioma .desplegable-language").find("a").eq(0).focus(); 216 }); 217 218 $("button.lang-1").focus(function(){ 219 $("#idioma .language-selection .close-popup button").focus(); 220 }); 221 222 $(".idioma .close-popup").click(function(){ 223 $("body").removeClass("show-language"); 224 $("#idioma > div > button").focus(); 225 }); 226} 227 228function search () { 229 230 $(".search-button button").click(function(){ 231 232 $("body").removeClass("show-mobile-menu"); 233 var element=$("body") 234 235 if(element.hasClass("show-search")){ 236 element.removeClass("show-search"); 237 }else { 238 element.addClass("show-search"); 239 $(".search-panel-popup .search-bar-simple .form-control.input-group-inset").focus(); 240 setTimeout(function () { 241 $(".search-panel-popup .search-bar-simple .form-control.input-group-inset").focus(); 242 }, 100) 243 } 244 }); 245 246 $("button.search-2").focus(function(){ 247 $(".search-panel-popup .search-bar-simple .form-control.input-group-inset").focus(); 248 }); 249 250 $("button.search-1").focus(function(){ 251 $(".search-panel-popup .close-popup button").focus(); 252 }); 253 254 $(".search-panel-popup .close-popup button").click(function(){ 255 $("body").removeClass("show-search"); 256 $(".recursivas .search-button > button").focus(); 257 }); 258} 259 260 261function mobileSites(){ 262 263 $(".mobile-show-sites").click(function(){ 264 265 $("body").toggleClass("show-sites-mobile-active"); 266 267 }); 268 269 270} 271 272function desplegableFooter(){ 273
274 $(".desplegable-footer-mobile").click(function(){ 275 276 if($(this).hasClass("open")){ 277 $(this).removeClass("open"); 278 $(this).next().slideUp( "slow", function() { 279 // Animation complete. 280 }); 281 }else { 282 $(this).addClass("open"); 283 $(this).next().slideDown( "slow", function() { 284 // Animation complete. 285 }); 286 } 287 288 }); 289}
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.