favorite comment 0
thumb_up0thumb_down

directions_runBeh - ČSOB (Week 2/7) D6

Daystreak #91
25km Race Practice Long Run with Runna ✅
4km at a conversational pace
7km at 4:45/km (your target Marathon pace)
4km at a conversational pace
6km at 4:45/km (your target Marathon pace)
4km at a conversational pace
ČSOB Bratislava Marathon Plan (Week 2/7)

Beh lock_open

place Graf prevýšenia

comment Komentáre ku aktivite

Momentálne sa tu nenachádzajú žiadne komentáre

Formulár sa odosiela
Pridaj komentár
Formulár sa odosiela
trending_up Vzdialenosť
25,0 km
schedule Čas
02:00:08
landscape Nastúpané
89,0 m

bar_chartŠtatistiky

Priemer Max
Rýchlosť 12,5 km/h 18,1 km/h
Výkon 442 W 648 W
Kadencia 85 rpm -
Tepová frekvencia 143 bpm 168 bpm
Energetický výdaj 2 090 kcal

cloudPodmienky

Priemerná teplota 15 °C

directions_bike Posledné aktivity bikera

thumb_up0thumb_down

directions_run Morning Run

trending_up 12,0 km
schedule 01:15:51
landscape 56 m
thumb_up0thumb_down

directions_run Afternoon Run

trending_up 12,3 km
schedule 01:15:47
landscape 314 m
thumb_up0thumb_down

directions_run Afternoon Run

trending_up 12,0 km
schedule 01:08:31
landscape 62 m

place Segmenty

Názov segmentuSegment ČasMôj čas Priemerná rýchlosť Priemerný výkon Priemerný tep Najlepší čas na segmenteNajlepší čas
12 segmentov
Formulár sa odosiela
keyboard_arrow_up UFO","segmentDistance":"D\u013a\u017eka: 4.97 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.1 %<\/b>","segmentNameHref":"austria-%3E-ufo"},"geometry":{"type":"LineString","coordinates":[["17.045503","48.122042",141.4],["17.045503","48.122042",141.4],["17.043899","48.122583",141.2],["17.042133","48.123138",140.8],["17.041162","48.12345",141.2],["17.039991","48.123821",140.6],["17.039067","48.124142",141],["17.037675","48.124582",141],["17.035252","48.125372",141],["17.034071","48.125767",140.6],["17.032477","48.126265",140.4],["17.031347","48.126637",139.6],["17.030079","48.127076",140],["17.027917","48.12777",140.4],["17.026472","48.128232",140.6],["17.024514","48.128836",140],["17.023365","48.129265",140.2],["17.022401","48.12974",140.6],["17.021692","48.13018",140.6],["17.021449","48.130324",140.6],["17.021345","48.130501",140.6],["17.021406","48.130728",140.4],["17.020365","48.131382",140.8],["17.019186","48.131926",140.2],["17.018356","48.132299",140.6],["17.01742","48.132688",140.6],["17.016593","48.133222",140.6],["17.016031","48.133429",141],["17.01515","48.133773",140.8],["17.014295","48.134027",141.6],["17.012613","48.134418",143.8],["17.012073","48.13456",144],["17.011816","48.134691",144.4],["17.010708","48.135315",144.8],["17.009739","48.135763",144.2],["17.008549","48.136306",144],["17.007524","48.13674",145.4],["17.005932","48.137117",145.4],["17.004841","48.13737",144.4],["17.004021","48.137709",143.4],["17.003745","48.138053",142.2],["17.003679","48.13829",142.8],["17.003918","48.13852",142.4],["17.004428","48.138923",142],["17.004992","48.139035",141.2],["17.005501","48.139298",139],["17.005783","48.139904",137],["17.00516","48.140526",137.4],["17.004798","48.140839",137.4],["17.003958","48.141401",137.8],["17.003317","48.142154",137],["17.002673","48.142837",136],["17.002098","48.143458",136.6],["17.0018","48.143818",137.2],["17.001609","48.144124",137],["17.001378","48.144683",136.6],["17.001183","48.144929",137.4],["17.000979","48.145237",138],["17.000342","48.145604",138.4],["16.99948","48.145759",139],["16.998416","48.146004",138.4],["16.997643","48.146154",138],["16.996235","48.146441",138],["16.99598","48.146235",138.8],["16.995633","48.145905",138.6],["16.995305","48.145603",138.4],["16.994916","48.145227",137.8],["16.994535","48.144847",137.4],["16.99399","48.144323",137],["16.99383","48.144173",136.6],["16.993334","48.143693",136.8],["16.993176","48.143546",137],["16.992744","48.143149",137],["16.992513","48.142886",137.4],["16.992438","48.142726",137.8],["16.992242","48.142338",140.2],["16.992019","48.141923",141.8],["16.991769","48.141515",143],["16.991354","48.140791",144.8],["16.9911","48.140787",145],["16.990086","48.141157",147],["16.988877","48.141568",148.8],["16.988022","48.141826",147.2],["16.987892","48.141851",145.8],["16.988515","48.141694",146.2],["16.989142","48.141485",147],["16.989379","48.141388",146.6],["16.99011","48.141125",146],["16.990545","48.14096",145.4],["16.991318","48.140764",143.8],["16.991446","48.140901",142.6],["16.991506","48.141028",142.6],["16.991604","48.141199",142.8],["16.991835","48.141657",142],["16.991964","48.141886",142],["16.992269","48.142409",142],["16.992396","48.142713",140],["16.992724","48.143086",137.2],["16.993073","48.143401",136.4],["16.993477","48.14378",135.8],["16.993826","48.14412",135.6],["16.994055","48.14435",135.6],["16.994542","48.144809",136],["16.99489","48.145136",135.6],["16.995076","48.145323",136],["16.995521","48.145764",136.2],["16.996211","48.1464",136.4],["16.996713","48.14631",136.2],["16.997481","48.146164",137],["16.998311","48.146",137.6],["16.99914","48.145811",137.4],["16.999723","48.145703",137.6],["17.000586","48.145524",138],["17.001048","48.145074",138.6],["17.001388","48.144631",138.4],["17.001585","48.144196",137.8],["17.001792","48.143838",137.6],["17.001942","48.143627",137.4],["17.002028","48.143515",137.6],["17.00225","48.143268",137.4],["17.002551","48.142929",137.6],["17.00303","48.142439",137.4],["17.003257","48.142206",137.4],["17.003862","48.141582",136.2],["17.004008","48.141423",135.8],["17.004498","48.141026",136.2],["17.004793","48.140835",136],["17.005293","48.140352",136.2],["17.005729","48.140029",136.6],["17.005779","48.139752",137],["17.005639","48.139458",138],["17.005183","48.13905",139.4],["17.004313","48.138827",141.4],["17.003897","48.138441",141.8],["17.003702","48.138168",142.2],["17.004085","48.137727",142.4],["17.004625","48.137494",143.2],["17.005357","48.137273",143.8],["17.006684","48.136978",145.4],["17.007481","48.13678",145.4],["17.007967","48.136565",145.2],["17.008695","48.136302",144.4],["17.009539","48.135865",143],["17.010127","48.135634",143],["17.010779","48.135309",144.4],["17.011479","48.134912",144.2],["17.011993","48.134621",144.2],["17.012769","48.13437",143.4],["17.013925","48.134151",143],["17.014733","48.133932",142],["17.015164","48.13378",141],["17.015679","48.13353",140],["17.016141","48.1334",140],["17.016783","48.133089",140.8],["17.0171","48.132903",141],["17.017773","48.132519",141],["17.018554","48.132206",140.6],["17.019763","48.13169",142.4],["17.020332","48.131405",142],["17.02111","48.130897",141.2],["17.021464","48.130682",140.6],["17.021403","48.130403",141.2],["17.021588","48.130277",140.4],["17.021865","48.130067",140.4],["17.022381","48.129733",140.2],["17.022751","48.129539",139.8],["17.023258","48.129319",140.2],["17.024467","48.128869",139.8],["17.02516","48.128633",139.8],["17.026189","48.128295",139.8],["17.027152","48.127978",140.4],["17.028","48.127692",138.8],["17.028326","48.127586",139.2],["17.028788","48.127442",140],["17.029611","48.127184",140.4],["17.030353","48.126946",140],["17.031052","48.126713",139.2],["17.031825","48.126457",138.6],["17.032389","48.126273",138.4],["17.033147","48.126017",138.2],["17.033886","48.125787",139.6],["17.034465","48.125588",139.4],["17.035073","48.125405",139.4],["17.035886","48.125151",139],["17.036053","48.125083",139],["17.036568","48.124904",138.8],["17.037081","48.124753",138.2],["17.037951","48.124467",138.6],["17.038618","48.124233",137.8],["17.039083","48.124075",137.8],["17.03961","48.12393",138.8],["17.04048","48.123659",139.6],["17.041274","48.12337",138.8],["17.041946","48.123156",137.8],["17.042498","48.122994",138],["17.043394","48.122684",139],["17.043394","48.122684",139],["17.043987","48.122527",138.2],["17.043987","48.122527",138.2],["17.044522","48.122327",138.6],["17.044522","48.122327",138.6],["17.044984","48.122179",138.2],["17.044984","48.122179",138.2],["17.046009","48.121884",139.2],["17.046009","48.121884",139.2],["17.04651","48.121783",138.8],["17.04651","48.121783",138.8],["17.048164","48.121598",138.6],["17.049576","48.121633",138.2],["17.050992","48.121701",137.6],["17.052081","48.121722",138.4],["17.05316","48.121781",140.4],["17.053624","48.121804",140.6],["17.054815","48.121833",140.8],["17.055808","48.121893",138.4],["17.056408","48.121962",136.4],["17.056999","48.122244",136.6],["17.05802","48.122271",137.2],["17.059032","48.122301",136.8],["17.059678","48.122324",137.8],["17.060789","48.12235",136.4],["17.061923","48.122394",134.4],["17.062876","48.122456",137.8],["17.063731","48.122519",139.2],["17.063903","48.122543",138.8],["17.064949","48.122678",138.2],["17.065852","48.122802",138],["17.066677","48.122908",138.2],["17.068237","48.123123",137.2],["17.069096","48.123274",137],["17.069831","48.123525",137],["17.070433","48.123761",136.4],["17.071186","48.124141",137],["17.072201","48.124862",137.6],["17.072494","48.125117",137.6],["17.072792","48.125423",136.6],["17.072923","48.125576",136.4],["17.073175","48.125958",136.6],["17.073455","48.126458",138],["17.0736","48.126856",140],["17.073708","48.127488",142.8],["17.07374","48.127797",142.6],["17.073732","48.12798",142.8],["17.073719","48.128098",142.6],["17.07373","48.128391",143],["17.07375","48.128677",143.6],["17.073815","48.130227",141.6],["17.073813","48.130333",141.2],["17.073808","48.130605",140.6],["17.073811","48.130781",140.2],["17.073797","48.131057",140.4],["17.073826","48.131375",141.4],["17.073838","48.131556",141.2],["17.073841","48.13167",142.2],["17.073846","48.131929",142],["17.073842","48.132229",141.8],["17.073841","48.132371",142.8],["17.073846","48.132667",141.6],["17.073855","48.132907",140.6],["17.073829","48.13309",140.8],["17.073885","48.133656",140.2],["17.073883","48.133885",140.8],["17.073895","48.134033",140.2],["17.073908","48.134429",140],["17.073902","48.134685",140.4],["17.073911","48.13496",142.6],["17.073906","48.135136",142.8],["17.073909","48.135398",143.2],["17.073922","48.135776",142.4],["17.073933","48.136168",142.2],["17.07395","48.136462",142.8],["17.073971","48.136797",143],["17.07396","48.137003",143.2],["17.073954","48.13723",143.4],["17.073958","48.137448",143.6],["17.074109","48.137776",144],["17.074434","48.13802",144.4],["17.074631","48.138165",144.6],["17.075385","48.138287",143.6],["17.075783","48.138362",142.8],["17.077223","48.138595",142.6],["17.077669","48.138636",142.6],["17.079082","48.138625",142.2],["17.079774","48.138498",142],["17.080246","48.138385",142.2],["17.081684","48.138065",140.8],["17.082607","48.137875",139.2],["17.08358","48.137663",139.4],["17.084879","48.137391",139],["17.085751","48.137237",139],["17.086502","48.137099",138],["17.086681","48.137068",138.2],["17.087326","48.136958",138.4],["17.087727","48.136883",138],["17.088261","48.13678",137.8],["17.089076","48.136667",137.8],["17.089556","48.136582",138.6],["17.090853","48.136351",139],["17.091628","48.136221",137.2],["17.092281","48.136114",137.6],["17.093271","48.135957",139.2],["17.094254","48.135761",139.6],["17.094955","48.1357",140],["17.096172","48.13577",137.8],["17.096803","48.135888",138.6],["17.097526","48.13608",138.8],["17.098182","48.136151",138.4],["17.098762","48.136147",138.6],["17.10001","48.136084",137.2],["17.10058","48.136074",137.4],["17.101281","48.136054",138.4],["17.10179","48.136162",139.2],["17.102813","48.136416",138.6],["17.1034","48.136484",139],["17.104233","48.136563",140],["17.104812","48.136619",138.4],["17.104861","48.136363",139.2],["17.105168","48.136235",136],["17.105296","48.135976",135.2],["17.105562","48.135666",135],["17.106457","48.135471",134.6],["17.107088","48.135181",134.6],["17.107204","48.134917",135.6],["17.107394","48.134565",136.6],["17.107482","48.134261",136.8],["17.107249","48.134034",137.2],["17.107524","48.134009",137.2]]}},{"type":"Feature","properties":{"type":99,"segment":"51072","segmentName":"Roundabout B9 x B50a-State border","segmentDistance":"D\u013a\u017eka: 2.53 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: 0 %<\/b>","segmentNameHref":"roundabout-b9-x-b50a-state-border"},"geometry":{"type":"LineString","coordinates":[["17.030353","48.126946",140],["17.030353","48.126946",140],["17.031052","48.126713",139.2],["17.031825","48.126457",138.6],["17.032389","48.126273",138.4],["17.033147","48.126017",138.2],["17.033886","48.125787",139.6],["17.034465","48.125588",139.4],["17.035073","48.125405",139.4],["17.035886","48.125151",139],["17.036053","48.125083",139],["17.036568","48.124904",138.8],["17.037081","48.124753",138.2],["17.037951","48.124467",138.6],["17.038618","48.124233",137.8],["17.039083","48.124075",137.8],["17.03961","48.12393",138.8],["17.04048","48.123659",139.6],["17.041274","48.12337",138.8],["17.041946","48.123156",137.8],["17.042498","48.122994",138],["17.043394","48.122684",139],["17.043987","48.122527",138.2],["17.044522","48.122327",138.6],["17.044984","48.122179",138.2],["17.046009","48.121884",139.2],["17.04651","48.121783",138.8],["17.048164","48.121598",138.6],["17.049576","48.121633",138.2],["17.050992","48.121701",137.6],["17.052081","48.121722",138.4],["17.05316","48.121781",140.4],["17.053624","48.121804",140.6],["17.054815","48.121833",140.8],["17.055808","48.121893",138.4],["17.056408","48.121962",136.4],["17.056999","48.122244",136.6],["17.05802","48.122271",137.2],["17.059032","48.122301",136.8],["17.059678","48.122324",137.8],["17.060789","48.12235",136.4]]}},{"type":"Feature","properties":{"type":99,"segment":"51451","segmentName":"smer Lafranconi","segmentDistance":"D\u013a\u017eka: 1.00 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.1 %<\/b>","segmentNameHref":"smer-lafranconi"},"geometry":{"type":"LineString","coordinates":[["17.10179","48.136162",139.2],["17.10179","48.136162",139.2],["17.102813","48.136416",138.6],["17.1034","48.136484",139],["17.104233","48.136563",140],["17.104812","48.136619",138.4],["17.104861","48.136363",139.2],["17.105168","48.136235",136],["17.105296","48.135976",135.2],["17.105562","48.135666",135],["17.106457","48.135471",134.6],["17.107088","48.135181",134.6],["17.107204","48.134917",135.6],["17.107394","48.134565",136.6],["17.107482","48.134261",136.8],["17.107249","48.134034",137.2],["17.107524","48.134009",137.2]]}}] var layerGroup = L.layerGroup().addTo(map_leaflet); var layerGroupAllSegments = L.layerGroup(); if (gpx_segments != undefined) { gpx_segments_layer = L.geoJson(gpx_segments, { style: function(feature, layer) { return { 'weight': 10, 'color': '#bb6300', 'opacity': 1, }; }, onEachFeature:onEachFeature, }); function onEachFeature(feature, layer) { sn++; var prop = layer.feature.properties; var desc = getDescription(prop.type, prop.trailName, prop.trailId, prop.trailStatus, prop.segmentName, prop.segment, prop.segmentDistance, prop.segmentGrade, prop.segmentNameHref); var sl = feature.geometry.coordinates[0][1]; var sr = feature.geometry.coordinates[0][0]; var el = feature.geometry.coordinates[feature.geometry.coordinates.length - 1][1]; var er = feature.geometry.coordinates[feature.geometry.coordinates.length - 1][0]; if (sl != '' && sr != '' && el != '' && er != '') { var sm = new L.marker(L.latLng(sl, sr), {icon: startIcon}); var em = new L.marker(L.latLng(el, er), {icon: endIcon}); } var layerGroup = L.featureGroup(); layerGroup.addLayer(sm); layerGroup.addLayer(em); sm.bindPopup(desc); em.bindPopup(desc); var popupLayer = L.popup().setLatLng(L.latLng(sl, sr)).setContent(desc); layerGroup.bindPopup(popupLayer).openPopup(); layerGroup.addLayer(layer); segments.push(layerGroup); layer.on("click", function(e) { var desc = getDescription(prop.type, prop.trailName, prop.trailId, prop.trailStatus, prop.segmentName, prop.segment, prop.segmentDistance, prop.segmentGrade, prop.segmentNameHref); if (desc) { var popup = L.popup() .setLatLng(e.latlng) .setContent(desc) .openOn(map_leaflet); } }); //controlLayers.addOverlay(layerGroup, 'Segmenty na trase - ' + feature.properties.segmentName); } var displaySeg = 0; function showSegment(seg) { segments[displaySeg].remove(map_leaflet); segments[displaySeg]._popup.remove(map_leaflet); segments[seg].addTo(map_leaflet); segments[seg]._popup.addTo(map_leaflet); displaySeg = seg; var bounds = segments[seg].getBounds(); map_leaflet.fitBounds(bounds, {padding: [30, 30]}); $.scrollTo( '#map_leaflet', 800, {offset: -120} ); } } // geo location through leaflet plugin var lc = L.control.locate({ drawCircle: false, follow: true, markerStyle: {color: '#000000',fillColor: '#ee7711',fillOpacity: 0.7,weight: 4,opacity: 0.7,radius: 7}, strings: { title: "Ukáž mi, kde sa nachádzam", // title of the locate control popup: "Si v okolí {distance} {unit} od tohto bodu", // text to appear if user clicks on circle outsideMapBoundsMsg: "Nachádzaš sa mimo oblasti tejto mapy" // default message for onLocationOutsideMapBounds } }).addTo(map_leaflet); map_leaflet.on('startfollowing', function() { map_leaflet.on('dragstart', lc.stopFollowing); }).on('stopfollowing', function() { map_leaflet.off('dragstart', lc.stopFollowing); }); $(document).ready(function() { map_leaflet.on('baselayerchange', function(){ var id = event.currentTarget.layerId; var layer = this._layers[id]; $.ajax({ type: "POST", url: "/ajax.php?u=Cyklotrasy&f=saveDefaultMap&a=" + layer.options.name, }); }) }); $('#elevationDiv').html(''); $('.elevation').appendTo('#elevationDiv'); //gallery carousel multiple items - hack $(function(){ // init arrows $('.gallery-carousel').each(function(){ var itemsPerSlide = 3; if ($(this).data('items-per-slide')) itemsPerSlide = $(this).data('items-per-slide'); if ($('.carousel-item', this).length <= itemsPerSlide){ $('.carousel-control-next', this).addClass('disabled'); } }); $('.gallery-carousel').on('slide.bs.carousel', function (e) { if (!window.matchMedia("(min-width: 768px)").matches) return; // default behaviour on mobile /* CC 2.0 License Iatek LLC 2018 - Attribution required */ var $e = $(e.relatedTarget); var idx = $e.index(); var itemsPerSlide = 3; if ($(this).data('items-per-slide')) itemsPerSlide = $(this).data('items-per-slide'); var totalItems = $('.carousel-item', this).length; if ($(this).data('ended')==true && e.direction=='left'){ return false; } if (e.to===0){ $('.carousel-control-prev', this).addClass('disabled'); }else{ $('.carousel-control-prev', this).removeClass('disabled'); } if (e.to>=totalItems - itemsPerSlide){ $('.carousel-control-next', this).addClass('disabled'); $(this).data('ended', true); }else{ $('.carousel-control-next', this).removeClass('disabled'); $(this).data('ended', false); } }); }); function initEkkoLightbox(){ $('[data-toggle="lightbox"]:not(.lightbox-ready)').on('click', function(event) { event.preventDefault(); event.stopImmediatePropagation(); //$(this).removeAttr('href').attr('role', 'button'); var $this = $(this); $this.ekkoLightbox({ alwaysShowClose: true, wrapping: false, //Whether the gallery should loop or not leftArrow: '', rightArrow: '', onNavigate: function(){ $('.ekko-lightbox').removeClass('zoomed'); }, onShow: function(){ if (!$this.hasClass('no-zoom')) { $('.ekko-lightbox .modal-header').prepend('zoom_inzoom_out'); } $('.ekko-lightbox .ekko-lightbox-item').bind('touchstart touchend touchup swipeLeft swipeRight', function(event) { if ($('.ekko-lightbox').hasClass('zoomed') || (window.visualViewport && window.visualViewport.scale > 1.02)){ event.stopPropagation(); } }); $('.ekko-lightbox .ekko-lightbox-nav-overlay').bind('touchstart touchend touchup swipeLeft swipeRight', function(event) { if ($('.ekko-lightbox').hasClass('pinch-zoomed') || (window.visualViewport && window.visualViewport.scale > 1.02)){ $('.ekko-lightbox').addClass('pinch-zoomed'); event.stopPropagation(); } if (window.visualViewport && window.visualViewport.scale <= 1.02){ setTimeout(function(){ if (window.visualViewport && window.visualViewport.scale <= 1.02){ //check again after timeout $('.ekko-lightbox').removeClass('pinch-zoomed'); } },100); } }); if (window.matchMedia("(min-width: 768px)").matches) { $('body').addClass('ekko-modal-open'); } onPopupOpened('ekko-lightbox'); }, onShown: function(){ }, onHidden: function(){ $('body').removeClass('ekko-modal-open'); onPopupClosed(); } }); return false; }); $('[data-toggle="lightbox"]').addClass('lightbox-ready'); } $(function(){ $('.show-alt-in-lightbox[data-toggle="lightbox"]').each(function(){ $(this).data('footer', $(this).find('img').attr('title')); }); $('body').on('click', '.ekko-lightbox-zoom', function(){ $('.ekko-lightbox').toggleClass('zoomed'); }); $('body').on('click', '.ekko-lightbox.zoomed .ekko-lightbox-item.show ', function(){ $('.ekko-lightbox').removeClass('zoomed'); }) initEkkoLightbox(); $(document).ajaxComplete(function(event, xhr, settings) { //if (xhr.responseText.indexOf('lightbox') >= 0){ initEkkoLightbox(); //} }); }); function favoriteRide(ride) { $.ajax({ type: "POST", data: {id : ride, ride : 1}, dataType: "json", url: "/ajax.php?u=cyklotrasy&f=toggleFavourite", success: function(data) { if (data.added === 1) { $('.btn-wishlist.show-add-to-wishlist').hide(); $('.btn-wishlist.show-remove-from-wishlist').show(); //potrebuje dllllho zobrazit showMessageBar('#favoriteSuccess', 60*1000); } else { $('.btn-wishlist.show-remove-from-wishlist').hide(); $('.btn-wishlist.show-add-to-wishlist').show(); showMessageBar('#favoriteSuccessRemove'); } } }); } $(document).ready(function(){ //mobile map popup $('.close-map-widget').click(function(){ $('#map-widget').removeClass('show'); return false; }); $('.show-map-widget').click(function(){ $('#map-widget').addClass('show'); return false; }); $('a[href="#comments"]').on('click', function(e){ e.preventDefault(); commentsScroll('#comments'); return false; }); if ($('#segmenty').length){ if (location.hash.indexOf('#segmenty')>=0){ if (window.innerWidth>=768){ $.scrollTo( '#segmenty', 800, {offset: -100} ); } $('#segmenty-expander').prop('checked', true); } var $pagination = $('#segmentyList table .pagination-wrap'); $pagination.appendTo('#segmentyList'); $('#segmentyList .row-pagination').remove(); } }); function showPhotoOnMap() { if (typeof L !== "undefined"){ var photos = [{"lat":"48.132502833333","lng":"17.109063833333","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto2251770-0_67c3788a78574.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto2251770-0_67c3788a78574.jpg"},{"lat":"48.152672166667","lng":"17.1278445","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto2251770-1_67c3788b8e88a.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto2251770-1_67c3788b8e88a.jpg"}] var photoLayer = L.photo.cluster().on("click", function(evt) { var photo = evt.layer.photo; var template = ""; evt.layer.bindPopup(L.Util.template(template, photo), { className: "leafletresize", minWidth: 100, }).openPopup(); }); var photoOnMapLayer = photoLayer.add(photos); map_leaflet.addLayer(photoOnMapLayer); controlLayers.addOverlay(photoOnMapLayer, "Fotky na mape") } } $(function() { showPhotoOnMap(); }); var loadedComments_comments = false; function loadComments_comments(){ } // Comments $(function(){ $('.comment-form, .review-form', '#comments').on('submit', function(){ $(this).attr('autocomplete',"off"); // prevent prepopulating fields on backbtn click if (history.state && history.state.popupOpened === 'mobile-expander'){ $('.mobile-expander-content', '#comments').addClass('opened'); history.back(); } }); $('select[name=sort], select[name=filter]', '#comments').on('change', function() { let inputName = $(this).attr('name'); let sort = $('select[name=sort]', '#comments').val(); let filter = $('select[name=filter]', '#comments').length ? $('select[name=filter]', '#comments ').val() : ''; var url = "/ajax.php?m=komentare&f=loadCommentsWidget&a=bW9kdWw9dnlqYXpkeSZleHRlcm5hbElkPTIyNTE3NzAmaXRlbU5hbWU9ViVDMyVCRGphemQrJUM0JThELisyMjUxNzcwJmNvbW1lbnRUeXBlPWNvbW1lbnQmYXV0aG9yVXNlcklkPTg2OTAxOSZ3aWRnZXRJZD1jb21tZW50cyZhbGxvd0luc2VydD0xJmFsbG93UmVwbHk9MSZyZXR1cm5Vcmw9aHR0cHMlM0ElMkYlMkZ3d3cubXRoaWtlci5zayUyRmFrdGl2aXR5JTJGMjI1MTc3MCUyRmJlaC1jc29iLXdlZWstMi03LWQ2Lmh0bWwmcGFyc2VkVXJsJTVCc2NoZW1lJTVEPWh0dHBzJnBhcnNlZFVybCU1Qmhvc3QlNUQ9d3d3Lm10aGlrZXIuc2smcGFyc2VkVXJsJTVCcGF0aCU1RD0lMkZha3Rpdml0eSUyRjIyNTE3NzAlMkZiZWgtY3NvYi13ZWVrLTItNy1kNi5odG1sJmluY2x1ZGVDb21tZW50SWQ9MA|" + sort + "|" + filter; if (inputName === 'filter') { if (parseInt(filter) === 3 && !customScoreDone) { loadScoreSettingsModal(); return false; } } $('#comments .comments-body-content').addClass('show-loading'); $.ajax({ url: url, success: function(data) { $('#comments .comments-body-content').html(data).removeClass('show-loading'); } }); }); }); // Comments function toggleHiddenComment(comment_id) { $("#commentBox" + comment_id + " .comment-hidden").remove(); $("#commentBox" + comment_id + " .comment-content").show(); } function closeScoreFilterBanner() { $('#commentsScoreFilterBanner').fadeOut(150); $.post('/ajax.php?m=komentare&f=closeScoreFilterBanner'); } function commentsScroll(toElement, offset, noAnimation){ // edit/reply from feed link if ((typeof toElement === 'string' || toElement instanceof String) && toElement.indexOf('#commentBox') >= 0) { let commentId = parseInt(toElement.replace('#commentBox', '')); if (!isNaN(commentId) && commentId) { if (parseInt(localStorage.getItem('replyToCommentId')) === commentId) { localStorage.removeItem('replyToCommentId'); if ($('.comment-reply-btn', toElement).length) { history.replaceState(null, null, ' '); setTimeout(function(){ $('.comment-reply-btn', toElement).first().click(); }, 0); return; } } else if(parseInt(localStorage.getItem('editCommentId')) === commentId) { localStorage.removeItem('editCommentId'); if ( $('.comment-edit-btn', toElement).length) { history.replaceState(null, null, ' '); $('.comment-edit-btn', toElement).first().click(); return; } } } } if (!offset) offset = 0; if (!window.matchMedia("(min-width: 768px)").matches && true) { if ($(toElement).length) { $(toElement).closest('.comments-body-content').scrollTo( toElement, 800, {offset: -10 + offset} ); } } else { if ($(toElement).length){ var headerhHeight = 120 + ($('#shop-info-bar').length ? $('#shop-info-bar').outerHeight() : 0); if (!window.matchMedia("(min-width: 768px)").matches){ headerhHeight = $('#header').outerHeight() + $('#shop-detail-nav').outerHeight() + 20; } if (noAnimation){ setTimeout(function(){ $(window).scrollTop($(toElement).offset().top - headerhHeight + offset); }, 100); var dontScrollAgain = false; setTimeout(function(){ dontScrollAgain = true; }, 3000); $(window).on('load', function(){ if (!dontScrollAgain) $(window).scrollTop($(toElement).offset().top - headerhHeight + offset); }); } else { $.scrollTo( toElement, 800, {offset: -headerhHeight + offset} ); } } } } var customScoreDone = false; function loadMoreComments(btn) { let $btn = $(btn); if ($btn.find('.spinner-border:visible').length) { return false; } let nextPage = parseInt($btn.data('page')) + 1; let perPage = parseInt($btn.data('per-page')); $btn.find('.spinner-border').css("display", "inline-block"); $btnWrap = $btn.closest('.comment-load-more-wrap'); $.get("/ajax.php?m=komentare&f=loadMoreComments&a=" + $btn.data('params') + "|" + $btn.data('sort') + '|' + $btn.data('score') + '|' + nextPage, "", function (data) { $data = $('
' + data + '
'); $btnWrap.before($data.html()); $btn.find('.spinner-border').css("display", "none"); $btn.data('page', nextPage); if ($data.find('.comment:not(.comment-reply)').length < perPage) { $btnWrap.hide(); } }); } function scrollAndHighlightComment(commentBoxId, noAnimation){ if ($(commentBoxId).length){ let commentEl = $(commentBoxId); $('.comments .highlighted-animated').removeClass('highlighted-animated'); setTimeout(function(){ commentEl.addClass('highlighted-animated'); commentsScroll( commentBoxId, null, noAnimation); }, 10); } } function resetCommentForm($parent) { $('.comment-form-title-insert', $parent).show(); $('.comment-form-title-reply', $parent).hide(); $("[name=parent]", $parent).val(''); $("textarea", $parent).val(''); let widgetId = $parent.attr('id'); let $legend = $(".comment-form legend", $parent); if ($legend.data('text-original')) { $legend.html($legend.data('text-original')); } let $btn = $(".comment-form button.btn-comment-submit", $parent); if ($btn.data('text-original')) { $btn.html($btn.data('text-original')); } if (typeof window['commentFileUploader' + widgetId] !== 'undefined') { window['commentFileUploader' + widgetId].resetFiles(); } } $(function(){ var scrollToComment = false; function handleCommentBoxHash() { if (location.hash.indexOf('commentBox')>=0 || location.hash.indexOf('#comments-')>=0){ var hash = location.hash; var widgetId = '#comments'; hashParts = hash.split('/'); if (hashParts.length > 1) { widgetId = hashParts[0]; hash = '#' + hashParts[1]; // location.hash = #reviews/commentBox224814 } if (!window.matchMedia("(min-width: 768px)").matches){ var commentId = hash.replace('#commentBox', '').replace('#comments-',''); $('#commentBox' + commentId).parents('.mobile-expander').find('.mobile-expander-check').prop('checked', 'checked').trigger('change'); } if (hash.indexOf('#comments-')>=0 || hash.indexOf('#commentBox')>=0){ // from foreign url - highlight comment hash = hash.replace('#comments-','#commentBox'); scrollAndHighlightComment(hash, true); history.replaceState(null, null, widgetId); scrollToComment = true; } else { commentsScroll( hash, null, true ); //remove hash history.replaceState(null, null, ' '); scrollToComment = false; } } else { scrollToComment = false; } } handleCommentBoxHash(); $(window).on('hashchange', function() { handleCommentBoxHash(); }); if (location.hash.indexOf('#form-')>=0){ var hash = location.hash; commentsScroll( hash, null, true ); //remove hash history.replaceState(null, null, ' '); } if (location.hash == '#questions' || location.hash == '#reviews' || location.hash == '#comments'){ var widgetId = location.hash; if (!$(widgetId).length) widgetId = '#questions'; if ($(widgetId).length && !scrollToComment){ if (!window.matchMedia("(min-width: 768px)").matches){ $(widgetId + '-expander').prop('checked', 'checked').trigger('change'); } if ($('.comment-unread', widgetId).length){ commentsScroll('#'+$('.comment-unread', widgetId).first().attr('id'), null, true); } else { commentsScroll(widgetId, null, true); } } } $('.comments').on('click', '.btn-comment-show-insert-popup', function(){ var $parent = $(this).closest('.comments'); resetCommentForm($parent); }); }); $(function(){ $('textarea', '.comments').on('input', function(){ if ($(this).val().length){ $('.comment-form .btn').addClass('mobile-active'); }else{ $('.comment-form .btn').removeClass('mobile-active'); } $(this).removeClass('is-invalid'); }); function setCommentTextareaPlaceholder(){ if (window.matchMedia("(min-width: 768px)").matches){ $('textarea', '.comments').attr('placeholder', $('textarea', '.comments').data('placeholder-desktop')); }else{ $('textarea', '.comments').attr('placeholder', $('textarea', '.comments').data('placeholder-mobile')); } } setCommentTextareaPlaceholder(); $(window).resize(function(){ setCommentTextareaPlaceholder(); }); }); $(function(){ $('.comment-form button[type=submit]').attr('disabled', 'disabled'); $('.comment-form textarea').click(function(){ $('#loginModal').modal('show'); }); }); // #TODO function hideForumPosts() { $('.forum_post_hidden').each(function(){ target = $(this).data('target'); forum_post = $(this).parent('.post_tools').siblings('.post_message'); $(this).show().insertAfter(forum_post); forum_post.hide(); forum_post.parent('.post_right').parent('.post_container').addClass('hiddenForumPost'); }); } $(function(){ hideForumPosts(); }); // #TODO function hideForumPost(postId) { el = $('#' + postId); message = el.siblings('.post_message'); el.remove(); message.show(); message.parent('.post_right').parent('.post_container').removeClass('hiddenForumPost'); } function close_what_we_can_do(id) { $('#we_can_do_better_' + id).hide(); return false; } function send_what_we_can_do(id, id_user) { var $el = $('#we_can_do_better_' + id); $el.addClass('show-loading'); var selectedOption = $('input:radio[name=input_we_can_do_input_' + id + ']:checked').val() var text = $('#input_we_can_do_textarea_' + id).val(); $.get('/ajax.php?u=misc&f=userVoteDownComment&a=' + selectedOption + '|' + id_user + '|' + text + '|' + id , function(data){ close_what_we_can_do(id); $el.removeClass('show-loading'); showMessage('Tvoja spätná väzba bola úspešne odoslaná.'); } ); } $(function() { $('body').on('click', '.user_votes a.user_votes_link', function(e){ if ($(this).hasClass('inactive')) return false; var fn = $(this).data('rel'); var hash = $(this).attr('hash'); var contentId = $(this).parent().attr('contentid'); var contentType = $(this).parent().attr('contenttype'); var contentUserId = $(this).parent().attr('contentuserid'); var parent = $(this).parent().parent(); var voteTop = 0; if($(this).closest(".metadata-line").length>0) { voteTop = 1; } $(this).tooltip('hide'); $.get('/ajax.php?u=misc&f=userContentVotesAjax&a=' + contentId + '|' + contentType + '|' + contentUserId + '|' + fn + '|' + hash + '|0|1', function(data){ if (data.startsWith('ok')) { data = data.substr(2); } $('.user_votes' + contentType + contentId).replaceWith(data); if (contentType === 'article') { if (fn === 'voteDown') { var position = parent.offset(); var topclick = position.top + 15 - parent.closest('.container.position-relative').offset().top; var leftclick = position.left + 20 - parent.closest('.container.position-relative').offset().left; $('#we_can_do_better_' + contentId).css({top: topclick, left: leftclick}); $('#we_can_do_better_' + contentId).show(); } else { $('#we_can_do_better_' + contentId).hide(); } } } ); return false; }); }); if (!showRideFormModal) { function showRideFormModal(id, asTemplate){ var $rideFormModal = $('#rideFormModal'); if (typeof id === 'undefined') id = ''; asTemplate = asTemplate ? 1 : 0; $.ajax({ url: '/ajax.php?m=Vyjazdy&f=ajaxFormModal&a=' + id + '|0' + '|' + asTemplate, success: function(data){ $rideFormModal.find('.modal-body').html(data); if (asTemplate){ $rideFormModal.find('.ride-form-edit, .ride-form-new').hide(); $rideFormModal.find('.ride-form-duplicate').show(); } else { $rideFormModal.find('.ride-form-duplicate').hide(); $rideFormModal.find('.ride-form-'+(id ? 'new' : 'edit')).hide(); $rideFormModal.find('.ride-form-'+(id ? 'edit' : 'new')).show(); } $rideFormModal.modal({ backdrop: 'static' }); }, error: function(data){ showMessage(data.responseText, 'error', data.responseText.indexOf('= 0 ? 10000 : 3500); } }); return false; } } var emailConsentModalActiveEl; var emailConsentModalActiveSection = false; var emailConsentModalAgreed = false; function emailConsentModal(el, section){ var $el = $(el); if ($el.is(':checked') || !$el.is("input")){ // checked checkbox, or button/link emailConsentModalActiveEl = $(el); var $modal = $('#modalEmailConsent'); emailConsentModalActiveSection = section; if (section){ $('[data-section="general"]', $modal).hide(); $('[data-section="newsletter"]', $modal).hide(); $('[data-section="shop"]', $modal).hide(); $('[data-section="sale"]', $modal).hide(); $('[data-section="' + section + '"]', $modal).show(); } else { $('.mec-title').hide(); $('[data-section="general"]', $modal).show(); } emailConsentModalSubOptions(); emailConsentModalAgreed = false; $('#modalEmailConsent').modal('show'); } } function emailConsentModalSubOptions(){ $('.sub-options-emails').each(function() { var $subOptions = $(this); if ($subOptions.parent().find('.custom-switch input:checked, .custom-checkbox input:checked').length){ $subOptions.show(); if (!$subOptions.find('input:checked').length){ $subOptions.find('input').first().prop('checked', true); } } else { $subOptions.hide(); $subOptions.find('input').prop('checked', false); } }); } function emailConsentModalOnAgreed(){ var $modal = $('#modalEmailConsent'); emailConsentModalAgreed = true; var sectionWrap = emailConsentModalActiveSection ? '[data-section="' + emailConsentModalActiveSection + '"] ' : ''; var inputs = ''; $(sectionWrap + 'input[type=hidden], input:checked', $modal).each(function(){ var $this = $(this); inputs = inputs + ''; }); emailConsentModalActiveEl.prev('.mec-inputs').remove(); $('' + inputs + '').insertBefore(emailConsentModalActiveEl); $('#modalEmailConsent').modal('hide'); } $(function() { $('input[name="agreed_emails"]').on('change', function(){ emailConsentModal(this); }); emailConsentModalSubOptions(); $('#mec_user_newsletter_agreed, #user_newsletter_agreed').on('change', emailConsentModalSubOptions ); $('input:radio, input:checkbox','#modalEmailConsent').on('change', function(){ $modal = $('#modalEmailConsent'); $('.modal-footer .btn', $modal).prop('disabled', !$('input:checked:visible', $modal).length); }); $('#modalEmailConsent').on('hidden.bs.modal', function (e) { $modal = $(this); if (!emailConsentModalAgreed){ if (emailConsentModalActiveEl.val() === 'weekly'){ $('input[value=monthly]', $modal).prop('checked', false); } else if (emailConsentModalActiveEl.val() === 'monthly'){ $('input[value=weekly]', $modal).prop('checked', false); } else { emailConsentModalActiveEl.prop('checked', false); } emailConsentModalActiveEl.prev('.mec-inputs').remove(); } emailConsentModalActiveSection = false; emailConsentModalSubOptions(); }); }); $(function(){ $(".js-reject-cookies").attr("role", "button"); $(".js-reject-cookies").click(function(e){ e.preventDefault(); $.ajax({type: "POST",url: "/account/cookie-consent",data: {functional:0,analytical:0,commercial:0} }); $("#biscuitModal").fadeOut(250); return false; }); $(".biscuit-close").click(function(){ $.ajax({type: "POST",url: "/account/cookie-consent",data: {necessary:1,functional:1,analytical:1,commercial:1} }); $("#biscuitModal").fadeOut(250); $(".biscuit-checkboxes .custom-control-input").attr("checked", true); updateGoogleAnalyticsConsent(); updateBingConsent(); sendGoogleAnalyticsPageview(); return false; }); $(".biscuit-settings").click(function(){ $(this).addClass("loading-simple"); $.ajax({type: "POST",url: "/account/cookie-consent",data: {functional:0,analytical:0,commercial:0} }).always(function(){ window.location = "https://www.mthiker.sk/cookies"; }); }); }); -->