favorite comment 0
thumb_up0thumb_down

directions_bikeziletky.cc | SLOVACKO

 💪 140.76 new kilometers
🏘 Completed 25% of Velký Ořechov
🏘 Completed 25% of Lhotka U Hradčovic
-- From Wandrer.earth

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ť
166 km
schedule Čas
06:45:28
landscape Nastúpané
3 154 m

bar_chartŠtatistiky

Priemer Max
Rýchlosť 24,6 km/h 76,1 km/h
Výkon 136 W 762 W
Kadencia 68 rpm -
Energetický výdaj 7 526 kcal

cloudPodmienky

Priemerná teplota 27 °C

directions_bike Posledné aktivity bikera

thumb_up0thumb_down

directions_bike mosquitoland

trending_up 245,2 km
schedule 08:51:50
landscape 1 616 m
thumb_up0thumb_down

directions_bike fin

trending_up 140,8 km
schedule 04:28:28
landscape 216 m
thumb_up0thumb_down

directions_bike norge #10

trending_up 227,7 km
schedule 10:18:22
landscape 4 085 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 Luha\u010dovice DH","segmentDistance":"D\u013a\u017eka: 3.61 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -4.3 %<\/b>","segmentNameHref":"kladna-zilin-%3E-luhacovice-dh"},"geometry":{"type":"LineString","coordinates":[["17.773609","49.091307",438.4],["17.773609","49.091307",438.4],["17.769046","49.088832",428],["17.767535","49.087615",417.2],["17.765166","49.084396",416],["17.763855","49.083212",417.2],["17.761832","49.082329",414],["17.759775","49.082384",411.2],["17.759102","49.082984",410],["17.758037","49.084119",407.2],["17.756908","49.085312",402],["17.756301","49.086692",392.8],["17.757851","49.086383",383],["17.758616","49.086199",379.4],["17.75777","49.08744",370.8],["17.755073","49.089552",349.6],["17.753406","49.090396",339.4],["17.750613","49.092762",317],["17.750968","49.09313",312.8],["17.752013","49.092988",305],["17.750017","49.09492",285.6]]}},{"type":"Feature","properties":{"type":99,"segment":"26037","segmentName":"Segment","segmentDistance":"D\u013a\u017eka: 794.39 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 11.1 %<\/b>","segmentNameHref":"segment"},"geometry":{"type":"LineString","coordinates":[["17.761631","49.12345",293.4],["17.761631","49.12345",293.4],["17.758687","49.122796",299.2],["17.756926","49.122284",310.6],["17.755415","49.121943",323.8],["17.754064","49.121735",336.2],["17.752602","49.121364",351.2],["17.75182","49.121074",361.8]]}},{"type":"Feature","properties":{"type":99,"segment":"26038","segmentName":"DH do Ludkovic","segmentDistance":"D\u013a\u017eka: 1.32 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -6.2 %<\/b>","segmentNameHref":"dh-do-ludkovic"},"geometry":{"type":"LineString","coordinates":[["17.750137","49.120393",375],["17.750137","49.120393",375],["17.748198","49.119643",365.8],["17.747893","49.120463",359.6],["17.74831","49.121425",352.6],["17.74745","49.121408",347.8],["17.74353","49.119005",323],["17.741574","49.118589",315.6],["17.740198","49.117994",307.8]]}},{"type":"Feature","properties":{"type":99,"segment":"40890","segmentName":"ludkovice-provodov","segmentDistance":"D\u013a\u017eka: 5.73 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 2.1 %<\/b>","segmentNameHref":"ludkovice-provodov"},"geometry":{"type":"LineString","coordinates":[["17.726252","49.115167",267.6],["17.726252","49.115167",267.6],["17.72609","49.115996",267.6],["17.726302","49.117454",274.4],["17.72623","49.118108",278.6],["17.726034","49.118904",281.6],["17.726785","49.120023",282.6],["17.728875","49.121346",289.2],["17.730182","49.122966",295],["17.73118","49.12578",297.8],["17.732101","49.128311",304.2],["17.733305","49.131443",302.6],["17.734357","49.132777",301.6],["17.73493","49.133479",302.6],["17.73469","49.135282",307.6],["17.733392","49.136271",306.4],["17.733092","49.137254",313],["17.73327","49.138202",322.6],["17.733134","49.138756",326.4],["17.732178","49.13973",326.2],["17.732407","49.140914",327.2],["17.732581","49.142501",332.4],["17.732972","49.14352",336.2],["17.73507","49.144633",349],["17.735807","49.145398",356],["17.737054","49.146419",362.8],["17.738188","49.147327",364.4],["17.739059","49.148552",364.6],["17.739466","49.149609",365.2],["17.739819","49.150466",367.4],["17.74046","49.151237",367.4],["17.740525","49.152005",367.8],["17.741123","49.15317",370.2],["17.741096","49.154559",372],["17.73995","49.155705",372],["17.738149","49.156303",374.4],["17.737194","49.157309",377.4],["17.737131","49.158003",379.2]]}},{"type":"Feature","properties":{"type":99,"segment":"17663","segmentName":"Provodovsk\u00e1 st\u011bna","segmentDistance":"D\u013a\u017eka: 305.80 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 6.5 %<\/b>","segmentNameHref":"provodovska-stena"},"geometry":{"type":"LineString","coordinates":[["17.735728","49.159931",387.4],["17.735728","49.159931",387.4],["17.733475","49.161378",387.6],["17.733475","49.161378",387.6],["17.732379","49.161318",393.6]]}},{"type":"Feature","properties":{"type":99,"segment":"17664","segmentName":"Provodov down to Brezuvky ","segmentDistance":"D\u013a\u017eka: 1.76 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -3.9 %<\/b>","segmentNameHref":"provodov-down-to-brezuvky"},"geometry":{"type":"LineString","coordinates":[["17.730833","49.160726",398.6],["17.730833","49.160726",398.6],["17.728468","49.160663",390.6],["17.722653","49.158048",378.2],["17.71934","49.157115",372.6],["17.716517","49.1557",362.2],["17.712109","49.154463",345.6]]}},{"type":"Feature","properties":{"type":99,"segment":"88494","segmentName":"Segment","segmentDistance":"D\u013a\u017eka: 1.77 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 5.8 %<\/b>","segmentNameHref":"segment"},"geometry":{"type":"LineString","coordinates":[["17.665705","49.141456",320.2],["17.665705","49.141456",320.2],["17.66563","49.1405",323.8],["17.664901","49.140036",332.4],["17.662908","49.139861",344.6],["17.662779","49.139584",347.6],["17.663563","49.138688",354.6],["17.662702","49.136833",369.6],["17.662491","49.135321",378.8],["17.662148","49.133962",386.8],["17.662358","49.133534",389.8],["17.664187","49.132832",394.8],["17.665028","49.131796",400.4],["17.664938","49.130984",402.4],["17.664235","49.129544",408],["17.664499","49.127816",413.4],["17.666154","49.126442",408.6]]}},{"type":"Feature","properties":{"type":99,"segment":"78734","segmentName":"Castkovsky kopec","segmentDistance":"D\u013a\u017eka: 1.84 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 5.5 %<\/b>","segmentNameHref":"castkovsky-kopec"},"geometry":{"type":"LineString","coordinates":[["17.61976","49.103816",228],["17.61976","49.103816",228],["17.62105","49.103746",234.4],["17.62105","49.103746",234.4],["17.621546","49.103171",240.4],["17.623091","49.102944",249.2],["17.624892","49.102149",260],["17.626186","49.101471",266.8],["17.628054","49.100926",276.2],["17.628542","49.100271",282.8],["17.62903","49.098723",295],["17.628877","49.09809",298.6],["17.630354","49.096954",305.8],["17.633463","49.09553",323.2],["17.635939","49.094219",326.6],["17.637975","49.092004",332.4]]}},{"type":"Feature","properties":{"type":99,"segment":"143548","segmentName":"klasika p\u0159es les","segmentDistance":"D\u013a\u017eka: 4.56 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.2 %<\/b>","segmentNameHref":"klasika-pres-les"},"geometry":{"type":"LineString","coordinates":[["17.638696","49.090027",331],["17.638696","49.090027",331],["17.638268","49.089627",330.8],["17.63809","49.089517",329.4],["17.63757","49.088659",325],["17.636624","49.087788",313],["17.635147","49.086902",312.6],["17.634515","49.086199",322],["17.633612","49.084609",321.8],["17.632193","49.08359",320.2],["17.631553","49.082683",315.4],["17.630412","49.08205",326.4],["17.627657","49.08083",321.8],["17.625319","49.080332",324.4],["17.622341","49.079703",323.6],["17.620746","49.079771",315],["17.619688","49.079222",310.2],["17.6187","49.077917",299.8],["17.617142","49.077126",305],["17.615117","49.077054",323.4],["17.613464","49.077096",329.6],["17.612228","49.076832",326.6],["17.611456","49.076195",322.6],["17.609719","49.076049",311.4],["17.607973","49.075626",304.8],["17.60554","49.075733",324.6],["17.602653","49.075667",327],["17.601523","49.074901",320.8],["17.600237","49.074361",317.6],["17.600578","49.073533",318.6],["17.600105","49.072967",314.8],["17.599918","49.072383",307.6],["17.599226","49.072123",302],["17.599512","49.071105",308],["17.600227","49.068813",309.4]]}},{"type":"Feature","properties":{"type":99,"segment":"4270","segmentName":"P\u0159echod HR - P\u0159echod DR","segmentDistance":"D\u013a\u017eka: 386.30 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 1.8 %<\/b>","segmentNameHref":"prechod-hr-prechod-dr"},"geometry":{"type":"LineString","coordinates":[["17.588289","49.04789",210.8],["17.588289","49.04789",210.8],["17.588693","49.047595",209],["17.590159","49.047096",208.6],["17.592502","49.0473",207.8]]}},{"type":"Feature","properties":{"type":99,"segment":"15332","segmentName":"DR - HAV do plna!","segmentDistance":"D\u013a\u017eka: 1.18 km<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.9 %<\/b>","segmentNameHref":"dr-hav-do-plna"},"geometry":{"type":"LineString","coordinates":[["17.606752","49.044557",209.2],["17.606752","49.044557",209.2],["17.608232","49.043725",210.4],["17.612108","49.042754",212.4],["17.613285","49.042273",210.4],["17.616592","49.038439",207.6]]}},{"type":"Feature","properties":{"type":99,"segment":"15333","segmentName":"Ke \u0161kolce","segmentDistance":"D\u013a\u017eka: 364.00 metrov<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 1.4 %<\/b>","segmentNameHref":"ke-skolce"},"geometry":{"type":"LineString","coordinates":[["17.625615","49.031246",208.8],["17.625615","49.031246",208.8],["17.62813","49.029997",216.2]]}},{"type":"Feature","properties":{"type":99,"segment":"15334","segmentName":"Fin\u00e1le ostro\u017esk\u00e9 50-UB-Pod Valy","segmentDistance":"D\u013a\u017eka: 553.20 metrov<\/b>","segmentGrade":"Priemern\u00e9 klesanie: -0.7 %<\/b>","segmentNameHref":"finale-ostrozske-50-ub-pod-valy"},"geometry":{"type":"LineString","coordinates":[["17.6329","49.027445",211.6],["17.6329","49.027445",211.6],["17.635796","49.025123",209.8]]}},{"type":"Feature","properties":{"type":99,"segment":"18395","segmentName":"Uh.Brod -> Slov.stroj.","segmentDistance":"D\u013a\u017eka: 1.09 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 1 %<\/b>","segmentNameHref":"uhbrod-%3E-slovstroj"},"geometry":{"type":"LineString","coordinates":[["17.646237","49.013473",214.6],["17.646237","49.013473",214.6],["17.645932","49.012836",213.6],["17.645839","49.01109",218.8],["17.646253","49.00937",221],["17.647218","49.007056",222],["17.647731","49.005731",222.6],["17.647572","49.005259",223.8],["17.647357","49.00434",225.8]]}},{"type":"Feature","properties":{"type":99,"segment":"1693","segmentName":"Slov.stroj. -> Linea","segmentDistance":"D\u013a\u017eka: 1.18 km<\/b>","segmentGrade":"Priemern\u00e9 st\u00fapanie: 0.7 %<\/b>","segmentNameHref":"slovstroj-%3E-linea"},"geometry":{"type":"LineString","coordinates":[["17.647683","49.003693",224.8],["17.647683","49.003693",224.8],["17.647342","49.002295",225.2],["17.645407","48.997359",233.8],["17.643904","48.994787",234.4]]}}] 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(); } }); 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=bW9kdWw9dnlqYXpkeSZleHRlcm5hbElkPTE5MzkwNTMmaXRlbU5hbWU9ViVDMyVCRGphemQrJUM0JThELisxOTM5MDUzJmNvbW1lbnRUeXBlPWNvbW1lbnQmYXV0aG9yVXNlcklkPTE0NzY0NCZ3aWRnZXRJZD1jb21tZW50cyZhbGxvd0luc2VydD0xJmFsbG93UmVwbHk9MSZyZXR1cm5Vcmw9aHR0cHMlM0ElMkYlMkZ3d3cubXRoaWtlci5zayUyRmFrdGl2aXR5JTJGMTkzOTA1MyUyRmJpY3lrZWwtemlsZXRreWNjLmh0bWwlM0ZvZCUzRDElMjZyaWRlX2lkJTNEMTkzOTA1MyZwYXJzZWRVcmwlNUJzY2hlbWUlNUQ9aHR0cHMmcGFyc2VkVXJsJTVCaG9zdCU1RD13d3cubXRoaWtlci5zayZwYXJzZWRVcmwlNUJwYXRoJTVEPSUyRmFrdGl2aXR5JTJGMTkzOTA1MyUyRmJpY3lrZWwtemlsZXRreWNjLmh0bWwmcGFyc2VkVXJsJTVCcXVlcnklNUQ9b2QlM0QxJTI2cmlkZV9pZCUzRDE5MzkwNTMmaW5jbHVkZUNvbW1lbnRJZD0w|" + 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"; }); }); }); -->