PageSourceSearch

https://www.experienciascv.es/combo?browserId=other&minifierType=&…5ufmo6qpW2:%2Fjs%2Findex.js&t=1788540610000

js experienciascv.es collected 2026-09-28 23:44:22 UTC 9,626 bytes, 23 lines download raw bytes

1this.firstCall=true;
2function createFilters(language){var filters={};if($("#exp-name")&&$("#exp-name").val()!="")if(language=="ca"||language=="va")filters["name_va.va"]=[$("#exp-name").val()];else filters["name_"+language]=[$("#exp-name").val()];if($("#exp-segments")&&$("#exp-segments").val()&&$("#exp-segments").val()!=-1)if($("#exp-segments option:selected").attr("data-parentSegment-code")!=-1)filters["subsegments_code"]=[$("#exp-segments").val()];else filters["segments_code"]=[$("#exp-segments").val()];if($("#exp-subsegments")&&
3$("#exp-subsegments").val()&&$("#exp-subsegments").val()!=-1)filters["subsegments_code"]=[$("#exp-subsegments").val()];if($("#exp-provinces")&&$("#exp-provinces").val()&&$("#exp-provinces").val()!=-1)filters["province_id"]=[$("#exp-provinces").val()];if($("#exp-townships")&&$("#exp-townships").val()&&$("#exp-townships").val()!=-1)filters["city_id"]=[$("#exp-townships").val()];if($("#exp-start-date")&&$("#exp-start-date").val()!="")filters["experience_start_date"]=[$("#exp-start-date").val()];if($("#exp-end-date")&&
4$("#exp-end-date").val()!="")filters["experience_end_date"]=[$("#exp-end-date").val()];if($("#exp-price")&&($("#exp-price").attr("data-value-min")!=-1||$("#exp-price").attr("data-value-max")!=-1)){filters["experience_price"]=[{}];if($("#exp-price").attr("data-value-min")!=-1&&$("#exp-price").attr("data-value-max")!=-1)filters["experience_price"]=[{gte:$("#exp-price").attr("data-value-min"),lte:$("#exp-price").attr("data-value-max")}];else if($("#exp-price").attr("data-value-max")!=-1)filters["experience_price"]=
5[{lte:$("#exp-price").attr("data-value-max")}];else if($("#exp-price").attr("data-value-min")!=-1)filters["experience_price"]=[{gte:$("#exp-price").attr("data-value-min")}]}if($("#exp-infrastructures")&&$("#exp-infrastructures").val()&&$("#exp-infrastructures").val()!=-1){var infrastru
5cturesAux=$("#exp-infrastructures").val();if(infrastructuresAux.length>0)for(var ih=0;ih<infrastructuresAux.length;ih++){var infrastructure=infrastructuresAux[ih];if(filters["infrastructure_code"]&&filters["infrastructure_code"].length)filters["infrastructure_code"].push(infrastructure);
6else filters["infrastructure_code"]=[infrastructure]}}if($("#exp-duration")&&$("#exp-duration").val()&&$("#exp-duration").val()!=-1);if($("#exp-public-type")&&$("#exp-public-type").val()&&$("#exp-public-type").val()!=-1);var publicTypes=document.querySelectorAll('button[data-type\x3d"publicType"]');for(var pt=0;pt<publicTypes.length;pt++){var publicTypeAux=publicTypes[pt];if(publicTypeAux.classList.contains("active"))if(filters["public_type_code"]&&filters["public_type_code"].length)filters["public_type_code"].push(publicTypeAux.getAttribute("data-code"));
7else filters["public_type_code"]=[publicTypeAux.getAttribute("data-code")]}if($("#exp-best-rated").is(":checked"))filters["experience_average_rating"]=[{gt:"4"}];if($("#exp-is-accommodation").is(":checked"))filters["experience_is_accommodation"]=[true];if($("#exp-is-sustainable").is(":checked"))filters["sustainable_experience"]=[true];console.log(filters);return filters}
8function selectFilters(id){var element=document.querySelector("#"+id);if(element.classList.contains("active"))element.classList.remove("active");else element.classList.add("active")}
9function resetFilters(){$(".filters .tags").children(".active").removeClass("active");$("#exp-townships").children().remove();$("#exp-townships").append($("#exp-townships-save").children().clone(true,true));$("#exp-subsegments").children().remove();$("#exp-subsegments").append($("#exp-subsegments-save").children().clone(true,true));$("select").val("-1");$("input[type\x3d'checkbox']").prop("checked",false);$("input[type\x3d'date']").val("");$("#exp-price").attr("data-value-min",-1);$("#exp-price").attr("data-value-max",
10-1)}
11function createMap(){$("#experiencias-search-portlet #map").empty();Liferay.Loader.require("[email protected]",function(M){this.htmlToStringFn=M.utils.htmlToString;$("#experiencias-search-portlet #map").css("display","inline-flex");this.mapLanding=M.map({"container":"map","projection":"EPSG:3857*m","controls":["panzoombar"],"layers":["OSM"],"resolutions":[51444.18059766173,25722.090298830866,12861.045149415433,6430.522574707717,3215.2612873538583,1607.6306436769291,803.8153218384646,401.9076609192323,200.95383045961614,
12100.47691522980807,50.238457614904036,25.119228807452018,12.559614403726009,6.2798072018630045,3.1399036009315022,.3699518004657511],"center":"-42645.6202,4787322.8692","zoom":6});this.paginatedLayer=new M.layer.GeoJSON({name:"paginated-layer",source:{}},{"extract":false});var stylePoint=new M.style.Point({radius:5,icon:{src:"/o/experiencias-theme/images/mark-map.svg",scale:.05,crossorigin:null,offsetorigin:"top-left",size:[512,512]}});var styleSelectedPoint=new M.style.Point({radius:5,icon:{src:"/o/experiencias-theme/images/mark-map2.svg",
13scale:.05,crossorigin:null,offsetorigin:"top-left",size:[512,512]},label:{text:"{{nombre}}",font:"bold 14px Source Sans Pro",color:"#000",rotate:false,scale:1,offset:[0,20],stroke:{color:"#FFF",width:2},rotation:0,align:M.style.align.CENTER,baseline:M.style.baseline.TOP}});var hover_evt=M.evt.HOVER_FEATURES;var leave_evt=M.evt.LEAVE_FEATURES;paginatedLayer.setStyle(stylePoint);paginatedLayer.on(hover_evt,function(features){features.forEach(function(feature){feature.setStyle(styleSelectedPoint)})});
14paginatedLayer.on(leave_evt,function(features){features.forEach(function(feature){feature.setStyle(stylePoint)})});this.paginatedLayer.setStyle(stylePoint);this.paginatedLayer.getImpl().selectFeatures=function(){};this.mapLanding.addLayers([paginatedLayer]);setTimeout(function(){updateMap(stylePoint,styleSelectedPoint)},1E3)}.bind(this))}
15function updateMap(stylePoint,styleSelectedPoint){Liferay.Loader.require("[email protected]",function(M){Liferay.Loader.require("proj4",function(proj4){if(this.mapLanding==null)return;var elements=document.querySelectorAll(".result-item");var listResources=[];var features=[];for(var i=0;i<elements.length;i++)listResources.push({x_coord:elements[i].getAttribute("data-id-x_coord"),y_coord:elements[i].getAttribute("data-id-y_coord"),name:elements[i].getAttribute("data-id-name"),id:elements[i].getAttribute("data-id-element"),
16image:elements[i].getAttribute("data-image"),url:elements[i].getAttribute("data-url")});for(var i=0;i<listResources.length;i++){var p=listResources[i];var point=null;if(p.x_coord!=""&&p.y_coord!=""){var singlePoint=proj4("EPSG:3857",[parseFloat(p.x_coord),parseFloat(p.y_coord)]);
16features.push(new M.Feature(p.id,{"type":"Feature","geometry":{"type":"Point","coordinates":[singlePoint[0],singlePoint[1]]},"properties":{"nombre":p.name,"id":p.id,"img":p.image,"url":p.url}}))}}var capa=getLayerByName("paginated-layer");
17capa.clear();if(listResources.length>0&&features.length>0){capa.addFeatures(features);var hover_evt=M.evt.HOVER_FEATURES;var leave_evt=M.evt.LEAVE_FEATURES;var select_evt=M.evt.SELECT_FEATURES;capa.on(hover_evt,function(features){features.forEach(function(feature){var id=feature.getAttributes()["id"];var selector="#experiencias-search-portlet .result-item[data-id-element\x3d'"+id+"'] .content";var element=document.querySelector(selector);element.classList.add("hover")})});capa.on(leave_evt,function(features){features.forEach(function(feature){var id=
18feature.getAttributes()["id"];var selector="#experiencias-search-portlet .result-item[data-id-element\x3d'"+id+"'] .content";var element=document.querySelector(selector);element.classList.remove("hover")})});capa.on(select_evt,function(features){features.forEach(function(feature){var url=feature.getAttributes()["url"];window.location=url})});elements.forEach(function(item){item.addEventListener("mouseover",function(e){e.stopPropagation;selectPoint(true,capa,item,stylePoint,styleSelectedPoint)});item.addEventListener("mouseout",
19function(e){e.stopPropagation;selectPoint(false,capa,item,stylePoint,styleSelectedPoint)})});var extent=capa.getImpl().getOL3Layer().getSource().getExtent();this.mapLanding.setBbox(extent)}}.bind(this))}.bind(this))}
20function selectPoint(select,capa,item,stylePoint,styleSelectedPoint){var id=item.getAttribute("data-id-element");if(id==null){var parentAux=$(item).closest(".grid-item");id=parentAux[0].getAttribute("data-id-element")}var feature=capa.getFeatureById(id);if(feature&&feature.getAttributes())if(select)feature.setStyle(styleSelectedPoint);else feature.setStyle(stylePoint)}function getLayerByName(layer){return this.mapLanding.getLayers().find(function(l){return l.name===layer})}
21function createPagination(total,currentPage,pageSize,lang){console.log(currentPage);if(total>6){var pages=Math.ceil(total/pageSize);var ele=document.querySelector("#experiencias-search-portlet #pagination-experiencias-search");$("#experiencias-search-portlet #pagination-experiencias-search").twbsPagination("destroy");$("#experiencias-search-portlet #pagination-experiencias-search").twbsPagination({lang:lang,totalPages:pages,visiblePages:1,first:'\x3ci class\x3d"fas fa-angle-double-left"\x3e\x3c/i\x3e',
22prev:'\x3ci class\x3d"fas fa-chevron-left"\x3e\x3c/i\x3e',next:'\x3ci class\x3d"fas fa-chevron-right"\x3e\x3c/i\x3e',last:'\x3ci class\x3d"fas fa-angle-double-right"\x3e\x3c/i\x3e',prevClass:"prev",nextClass:"next",lastClass:"last",firstClass:"first",startPage:currentPage+1,onPageClick:function(event,page){if(this.firstCall==false)sendForm(page-1,false);this.firstCall=false}})}else{var ele=document.querySelector("#experiencias-search-portlet #pagination-experiencias-search");$("#experiencias-search-portlet #pagination-experiencias-search").twbsPagination("destroy")}}
23;

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.