favorite comment 0
thumb_up0thumb_down

directions_bikeTechbikers 2019 | Day 3: Komárno - Budapest

Bicykel 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ť
107 km
schedule Čas
04:24:03
landscape Nastúpané
707 m

bar_chartŠtatistiky

Priemer Max
Rýchlosť 24,3 km/h 60,1 km/h
Výkon 108 W -
Energetický výdaj 3 131 kcal

cloudPodmienky

Priemerná teplota 13 °C

directions_bike Posledné aktivity bikera

thumb_up0thumb_down

directions_bike Málaga: Puerto del Léon - Torre del Mar

trending_up 103,7 km
schedule 04:35:30
landscape 1 435 m
thumb_up0thumb_down

directions_bike Málaga: Puerto del Sol

trending_up 142,2 km
schedule 05:58:28
landscape 2 602 m
thumb_up0thumb_down

directions_bike Málaga: Pizzara - El Chorro - Ardales - El Burgo - Coín

trending_up 159,8 km
schedule 06:09:22
landscape 2 120 m

place Segmenty

Názov segmentuSegment ČasMôj čas Priemerná rýchlosť Priemerný výkon Priemerný tep Najlepší čas na segmenteNajlepší čas
Formulár sa odosiela
keyboard_arrow_up Pom\u00e1z t\u00e1bla","segmentDistance":"D\u013a\u017eka: 4.67 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -1.7 %<\/b>","segmentNameHref":"kecskefarm-%3E-pomaz-tabla"},"geometry":{"type":"LineString","coordinates":[["18.946684","47.674006",243.2],["18.946684","47.674006",243.2],["18.947126","47.672446",240.2],["18.947522","47.670927",235.2],["18.948326","47.669786",234.2],["18.949885","47.669",235.8],["18.951609","47.668773",236.6],["18.954285","47.66888",241],["18.955659","47.66866",245],["18.956527","47.668028",250.8],["18.957419","47.667167",258.4],["18.958298","47.666529",259.8],["18.959381","47.666445",255.6],["18.960331","47.666729",250.6],["18.96153","47.66752",242],["18.962644","47.667743",234.8],["18.963695","47.667604",229.8],["18.964806","47.666929",224.6],["18.965293","47.665706",212.8],["18.965977","47.664608",206.6],["18.967722","47.663832",202.2],["18.971007","47.662859",195.4],["18.974253","47.660734",188.4],["18.974942","47.659897",186],["18.974989","47.658642",182.8],["18.976029","47.657144",181],["18.977763","47.6561",179.2],["18.979824","47.65512",175.8],["18.982436","47.654113",167.8],["18.984881","47.653227",166.6],["18.989312","47.652428",169.2],["18.990836","47.651943",170.4],["18.994272","47.65136",167.2],["18.997626","47.651089",162.4]]}},{"type":"Feature","properties":{"type":99,"segment":"113023","segmentName":"Pankostet\u0151 Sprint","segmentDistance":"D\u013a\u017eka: 699.20 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 3 %<\/b>","segmentNameHref":"pankosteto-sprint"},"geometry":{"type":"LineString","coordinates":[["18.949885","47.669",235.8],["18.949885","47.669",235.8],["18.951609","47.668773",236.6],["18.954285","47.66888",241],["18.955659","47.66866",245],["18.956527","47.668028",250.8],["18.957419","47.667167",258.4]]}},{"type":"Feature","properties":{"type":99,"segment":"113024","segmentName":"Utols\u00f3 emelked\u0151 sprint DKr\u0151l","segmentDistance":"D\u013a\u017eka: 287.10 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 4.7 %<\/b>","segmentNameHref":"utolso-emelkedo-sprint-dkrol"},"geometry":{"type":"LineString","coordinates":[["18.955659","47.66866",245],["18.955659","47.66866",245],["18.956527","47.668028",250.8],["18.957419","47.667167",258.4]]}},{"type":"Feature","properties":{"type":99,"segment":"113025","segmentName":"Pankos -Csob\u00e1nka el\u00e1g.","segmentDistance":"D\u013a\u017eka: 2.20 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -3.4 %<\/b>","segmentNameHref":"pankos-csobanka-elag"},"geometry":{"type":"LineString","coordinates":[["18.958298","47.666529",259.8],["18.958298","47.666529",259.8],["18.959381","47.666445",255.6],["18.960331","47.666729",250.6],["18.96153","47.66752",242],["18.962644","47.667743",234.8],["18.963695","47.667604",229.8],["18.964806","47.666929",224.6],["18.965293","47.665706",212.8],["18.965977","47.664608",206.6],["18.967722","47.663832",202.2],["18.971007","47.662859",195.4],["18.974253","47.660734",188.4],["18.974942","47.659897",186],["18.974989","47.658642",182.8],["18.976029","47.657144",181]]}},{"type":"Feature","properties":{"type":99,"segment":"113026","segmentName":"Pomaz - full gazz","segmentDistance":"D\u013a\u017eka: 3.85 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.8 %<\/b>","segmentNameHref":"pomaz-full-gazz"},"geometry":{"type":"LineString","coordinates":[["18.977763","47.6561",179.2],["18.977763","47.6561",179.2],["18.979824","47.65512",175.8],["18.982436","47.654113",167.8],["18.984881","47.653227",166.6],["18.989312","47.652428",169.2],["18.990836","47.651943",170.4],["18.994272","47.65136",167.2],["18.997626","47.651089",162.4],["19.001266","47.651047",157.2],["19.003001","47.650908",159.6],["19.005138","47.650831",162.4],["19.01073","47.649604",158.8],["19.013581","47.649253",156.8],["19.017273","47.648839",155.2],["19.019687","47.648452",153],["19.021445","47.647947",151.8],["19.022317","47.647596",150.2],["19.024767","47.647279",148.4],["19.026573","47.647206",146.6],["19.02704","47.647392",145]]}},{"type":"Feature","properties":{"type":99,"segment":"113028","segmentName":"hill after Csob\u00e1nka","segmentDistance":"D\u013a\u017eka: 608.60 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 1.2 %<\/b>","segmentNameHref":"hill-after-csobanka"},"geometry":{"type":"LineString","coordinates":[["18.982436","47.654113",167.8],["18.982436","47.654113",167.8],["18.984881","47.653227",166.6],["18.989312","47.652428",169.2]]}},{"type":"Feature","properties":{"type":99,"segment":"113029","segmentName":"Pom\u00e1z t\u00e1blasprint","segmentDistance":"D\u013a\u017eka: 248.10 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 1 %<\/b>","segmentNameHref":"pomaz-tablasprint"},"geometry":{"type":"LineString","coordinates":[["18.984881","47.653227",166.6],["18.984881","47.653227",166.6]]}},{"type":"Feature","properties":{"type":99,"segment":"113036","segmentName":"Madzsar J\u00f3zsef utca \u22a2 P\u00fcnk\u00f6sdf\u00fcrd\u0151 utca \u22a3 Napf\u00e9ny utca","segmentDistance":"D\u013a\u017eka: 859.50 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.1 %<\/b>","segmentNameHref":"madzsar-jozsef-utca-punkosdfurdo-utca-napfeny-utca"},"geometry":{"type":"LineString","coordinates":[["19.053473","47.595137",129.4],["19.053473","47.595137",129.4],["19.054521","47.595182",129.2],["19.054521","47.595182",129.2],["19.058402","47.594905",128.2]]}},{"type":"Feature","properties":{"type":99,"segment":"113037","segmentName":"M\u00e1ty\u00e1s kir\u00e1ly u. \u22a2 Kir\u00e1lyok \u00fatja \u22a3 Em\u0151d u.","segmentDistance":"D\u013a\u017eka: 1.03 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.1 %<\/b>","segmentNameHref":"matyas-kiraly-u-kiralyok-utja-emod-u"},"geometry":{"type":"LineString","coordinates":[["19.064722","47.583043",130],["19.064722","47.583043",130],["19.064014","47.580013",128.8]]}},{"type":"Feature","properties":{"type":99,"segment":"107187","segmentName":"P\u00f3k - Mozaik","segmentDistance":"D\u013a\u017eka: 1.91 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: 0 %<\/b>","segmentNameHref":"pok-mozaik"},"geometry":{"type":"LineString","coordinates":[["19.061285","47.564949",130.2],["19.061285","47.564949",130.2],["19.059525","47.565071",128.6],["19.059173","47.564844",130.2],["19.056696","47.565087",130.8],["19.054826","47.564426",129.6],["19.053733","47.562826",129.8],["19.05291","47.561272",130.6],["19.052338","47.561032",131.6],["19.051639","47.559754",130.8],["19.050355","47.557334",130],["19.048666","47.55414",130.8]]}},{"type":"Feature","properties":{"type":99,"segment":"107188","segmentName":"Graphi Sprint Reverse short h\u00edd-Melbourne","segmentDistance":"D\u013a\u017eka: 553.90 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.3 %<\/b>","segmentNameHref":"graphi-sprint-reverse-short-hid-melbourne"},"geometry":{"type":"LineString","coordinates":[["19.059173","47.564844",130.2],["19.059173","47.564844",130.2],["19.056696","47.565087",130.8],["19.054826","47.564426",129.6]]}},{"type":"Feature","properties":{"type":99,"segment":"107189","segmentName":"J\u00e9gverem \u00c9-D","segmentDistance":"D\u013a\u017eka: 867.20 metrov<\/b>","segmentGrade":"Priemern\u00e9 klesanie: 0 %<\/b>","segmentNameHref":"jegverem-e-d"},"geometry":{"type":"LineString","coordinates":[["19.052338","47.561032",131.6],["19.052338","47.561032",131.6],["19.051639","47.559754",130.8],["19.050355","47.557334",130],["19.048666","47.55414",130.8]]}},{"type":"Feature","properties":{"type":99,"segment":"105592","segmentName":"Margit-hid a sziget bej\u00e1rat\u00e1ig","segmentDistance":"D\u013a\u017eka: 318.30 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 1.8 %<\/b>","segmentNameHref":"margit-hid-a-sziget-bejarataig"},"geometry":{"type":"LineString","coordinates":[["19.039359","47.514769",133.2],["19.039359","47.514769",133.2],["19.042502","47.514816",140.2]]}},{"type":"Feature","properties":{"type":99,"segment":"105593","segmentName":"Margit h\u00edd Buda \u2192 Pest","segmentDistance":"D\u013a\u017eka: 515.00 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.2 %<\/b>","segmentNameHref":"margit-hid-buda-pest"},"geometry":{"type":"LineString","coordinates":[["19.039359","47.514769",133.2],["19.039359","47.514769",133.2],["19.042502","47.514816",140.2],["19.043602","47.514842",140.2],["19.046051","47.513944",137]]}},{"type":"Feature","properties":{"type":99,"segment":"133144","segmentName":"Olimpia sprint reverse","segmentDistance":"D\u013a\u017eka: 333.10 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.2 %<\/b>","segmentNameHref":"olimpia-sprint-reverse"},"geometry":{"type":"LineString","coordinates":[["19.046942","47.513678",128.8],["19.046942","47.513678",128.8],["19.046396","47.512572",127.8]]}}] 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":"47.7982456","lng":"18.728247899722","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto2323892-0_67fdca0f179d9.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto2323892-0_67fdca0f179d9.jpg"},{"lat":"47.756090399722","lng":"18.413752599722","url":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto2323892-1_67fdca1066f7f.jpg","thumbnail":"https:\/\/images.mtbiker.sk\/vyjazdy\/big\/stravaPhoto2323892-1_67fdca1066f7f.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=bW9kdWw9dnlqYXpkeSZleHRlcm5hbElkPTIzMjM4OTImaXRlbU5hbWU9ViVDMyVCRGphemQrJUM0JThELisyMzIzODkyJmNvbW1lbnRUeXBlPWNvbW1lbnQmYXV0aG9yVXNlcklkPTEyMjM0JndpZGdldElkPWNvbW1lbnRzJmFsbG93SW5zZXJ0PTEmYWxsb3dSZXBseT0xJnJldHVyblVybD1odHRwcyUzQSUyRiUyRnd3dy5tdGhpa2VyLnNrJTJGYWt0aXZpdHklMkYyMzIzODkyJTJGYmljeWtlbC10ZWNoYmlrZXJzLTIwMTkuaHRtbCUzRm9kJTNEMiUyNnJpZGVfaWQlM0QyMzIzODkyJnBhcnNlZFVybCU1QnNjaGVtZSU1RD1odHRwcyZwYXJzZWRVcmwlNUJob3N0JTVEPXd3dy5tdGhpa2VyLnNrJnBhcnNlZFVybCU1QnBhdGglNUQ9JTJGYWt0aXZpdHklMkYyMzIzODkyJTJGYmljeWtlbC10ZWNoYmlrZXJzLTIwMTkuaHRtbCZwYXJzZWRVcmwlNUJxdWVyeSU1RD1vZCUzRDIlMjZyaWRlX2lkJTNEMjMyMzg5MiZpbmNsdWRlQ29tbWVudElkPTA|" + 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(); if ($('#registrationModal.modal').hasClass('show')) { setTimeout(function(){ $('body').addClass('modal-open'); // registration modal is still opened }, 20); } }); }); $(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"; }); }); }); -->