1/** 2 * JS trida pro prohlidku - videa 3 * @author Martin Stránský SG <[email protected]> 4 */ 5var TourVideo = { 6 7 /** 8 * Predchozi prohlidka 9 * @param {jQuery} $button 10 * @return {void} 11 */ 12 prev: function($button) { 13 let $iframe = $('.DetailVideo iframe'); 14 let active = parseInt($iframe.attr('data-active')); 15 let new_active = active - 1; 16 17 if (typeof $iframe.attr('data-src-' + new_active) === 'undefined') { 18 $button.addClass('disabled'); 19 return; 20 } 21 $iframe.attr('data-active', new_active); 22 $iframe.attr('src', $iframe.attr('data-src-' + new_active)) 23 24 setTimeout(function() { 25 active = parseInt($iframe.attr('data-active')); 26 if (typeof $iframe.attr('data-src-' + new_active) === 'undefined') { 27 $button.addClass('disabled'); 28 } 29 }, 300); 30 }, 31 32 33 /** 34 * Nasledujici prohlidka 35 * @param {jQuery} $button 36 * @return {void} 37 */ 38 next: function($button) { 39 let $iframe = $('.DetailVideo iframe'); 40 let active = parseInt($iframe.attr('data-active')); 41 let new_active = active + 1; 42 43 if (typeof $iframe.attr('data-src-' + new_active) === 'undefined') { 44 $button.addClass('disabled'); 45 return; 46 } 47 $iframe.attr('data-active', new_active); 48 $iframe.attr('src', $iframe.attr('data-src-' + new_active)); 49 50 setTimeout(function() { 51 active = parseInt($iframe.attr('data-active')); 52 if (typeof $iframe.attr('data-src-' + new_active) === 'undefined') { 53 $button.addClass('disabled'); 54 } 55 }, 300); 56 } 57 58}; 59 60 61/** 62 * Volani funkci 63 * @returns {undefined} 64 */ 65$(function(){ 66 67 $('.TourSite').on('click', '.DetailVideo button.prev', function (event) { 68 event.preventDefault(); 69 $('.DetailVideo .DetailPointButtons button').removeClass('disabled'); 70 TourVideo.prev($(this)); 71 }); 72 73 $('.TourSite').on('click', '.DetailVideo button.next', function (event) { 74 event.preventDefault(); 75 $('.DetailVideo .DetailPointButtons button').removeClass('disabled'); 76 TourVideo.next($(this)); 77 }); 78 79}); 80
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.