1 2(function ($) { 3 "use strict"; 4 5 $(document).ajaxSuccess(function(){ 6 $('.views-row.is-ready-to-fadein').each(function(index) { 7 $(this).removeClass('is-ready-to-fadein').css('opacity', 0).delay(50*index).fadeTo(300, 1.0); 8 }); 9 10 11 }); 12 $(document).ready(function () { 13 // $("#title1", ".path-25let").lettering(); 14 // $("#title2", ".path-25let").lettering(); 15 // $("#title3", ".path-25let").lettering(); 16 // $("#title4", ".path-25let").lettering(); 17 18 $('<a>',{ 19 title: Drupal.t('Search'), 20 id: 'search-toggle', 21 href: 'javascript:void(0)', 22 click: function() { 23 $('.block-search').toggleClass('element-invisible'); 24 $(this).toggleClass('active'); 25 $('#search-block-form input[name="search_block_form"]') 26 .focus() 27 .trigger('focus'); 28 return false; 29 } 30 }) 31 32 .wrap('<div class="search-toggle-wrapper mobile-hidden"></div>') 33 .parent() 34 .insertBefore('#nav-prioritized'); 35 36 $('<a>',{ 37 title: Drupal.t('Search'), 38 text: Drupal.t('Search'), 39 id: 'menu-search-toggle', 40 href: 'javascript:void(0)', 41 click: function() { 42 $('.block-search').toggleClass('element-invisible'); 43 $('#search-toggle').addClass('active'); 44 $('.nav__dropdown-toggle ').click(); 45 $('#search-block-form input[name="search_block_form"]') 46 .focus() 47 .trigger('focus'); 48 return false; 49 } 50 }) 51 .wrap('<li class="mobile-only"></li>') 52 .parent() 53 .appendTo('#nav-main > ul.links'); 54 55 $('<a>',{ 56 title: Drupal.t('Close'), 57 id: 'search-close', 58 class: 'mobile-only', 59 href: 'javascript:void(0)', 60 click: function() { 61 $('.block-search').addClass('element-invisible'); 62 $('#search-toggle').removeClass('active'); 63 return false; 64 } 65 }) 66 .prependTo('#search-block-form .form-actions'); 67 68 69 $('.views-row.is-ready-to-fadein').removeClass('is-ready-to-fadein'); 70 //$('.bef-select-as-links li a').on('click', function(e){ 71 //console.log($(this).attr('href')); 72 //history.pushState(null, null, $(this).attr('href')); 73 //}); 74 75 76 // Smooth scrolling for internal links 77 78 var scrollElement = 'html, body'; 79 80 /* $('html, body').each(function () { 81 var initScrollTop = $(this).attr('scrollTop'); 82 $(this).attr('scrollTop', initScrollTop + 1); 83 if ($(this).attr('scrollTop') == initScrollTop + 1) { 84 scrollElement = this.nodeName.toLowerCase(); 85 $(this).attr('scrollTop', initScrollTop); 86 return false; 87 } 88 }); 89 */ 90 91 $("a[href^='#'].scroll").click(function(event) { 92 event.preventDefault(); 93 94 var $this = $(this), 95 target = this.hash, 96 $target = $(target); 97 98 $(scrollElement).stop().animate({ 99 'scrollTop': $target.offset().top, 100 }, 500, 'swing', function() { 101 window.location.hash = target; 102 }); 103 104 }); 105 106 window.goBack = function (e){ 107 var defaultLocation = "/aktuality"; 108 var oldHash = window.location.hash; 109 110 history.back(); // Try to go back 111 112 var newHash = window.location.hash; 113 114 /* If the previous page hasn't been loaded in a given time (in this case 115 * 1000ms) the user is redirected to the default location given above. 116 * This enables you to redirect the user to another page. 117 * 118 * However, you should check whether there was a referrer to the current 119 * site. This is a good indicator for a previous entry in the history 120 * session. 121 * 122 * Also you should check whether the old location differs only in the hash, 123 * e.g. /index.html#top --> /index.html# shouldn't redirect to the default 124 * location. 125 */ 126 127 if( 128 newHash === oldHash && 129 (typeof(document.referrer) !== "string" || document.referrer === "") 130 ){ 131 window.setTimeout(function(){ 132 // redirect to default location 133 window.location.href = defaultLocation; 134 },1000); // set timeout in ms 135 } 136 if(e){ 137 if(e.preventDefault) 138 e.preventDefault(); 139 if(e.preventPropagation) 140 e.preventPropagation(); 141 } 142 return false; // stop event propagation and browser default event 143 } 144 145 if (window.location.pathname === '/lide/vse' && window.location.hash !== '') { 146 setTimeout(function() { 147 $('a' + window.location.hash).trigger( "click" ); 148 }, 1500); 149 } 150 151 }); 152 153 154 Drupal.behaviors.cestadomuPriorityNav = { 155 attach: function (context, settings) { 156 $('.nav-wrapper', context).once('priority-nav', function () { 157 priorityNav.init({ 158 mainNavWrapper: ".nav-wrapper", 159 breakPoint: 480, 160 throttleDelay: 0, 161 navDropdownLabel: 'dalÅ¡Ã', 162 offsetPixels: 0, 163 }); 164 }); 165 } 166 }; 167 168 Drupal.behaviors.cestadomu = { 169 attach: function (context, settings) { 170 171 $('input').not('.noicheck').not('.icheck-input').icheck({ 172 focusClass: 'focus', 173 autoAjax: true, 174 }); 175 176 177/* // Filtr podle zaÅazenà na stránce lidé: DEPRECATED at the moment, the related view.lide was changed to contextual filter without ajax... 178 $('#seznam-zarazeni .zarazeni-item a').on('click', function( event ) { 179 event.preventDefault(); 180 $('.zarazeni-item').removeClass('active'); 181 $(this).parent('.zarazeni-item').addClass('active'); 182 var showTerms = $(this).data('zobraz-zarazeni'); 183 184 $('.og-grid-item').parent().hide(); 185 $('.og-grid-item.zarazeni-' + showTerms).parent().each(function(index) { 186 $(this).removeClass('is-ready-to-fadein').css('opacity', 0).delay(50*index).fadeTo(300, 1.0); 187 }); 188 $( window ).resize(); 189 190 });*/ 191 192 // Na koho se obrátit 193 $('.show-person').on('click', function( event ) { 194 event.preventDefault(); 195 var person = $(this).data('person'); 196 if (window.location.pathname === '/lide/vse') { 197 $('a#zamestnanec-' + person).trigger( "click" ); 198 } 199 else { 200 window.location = '/lide/vse#zamestnanec-' + person; 201 } 202 }); 203 204 if ( $.isFunction($.fn.lightSlider) ) { 205 var slider = $("#slider-darci > ul").lightSlider({ 206 item: 1, 207 autoWidth: false, 208 loop: true, 209 auto: true, 210 pause:8000, 211 pauseOnHover:true, 212 slideMove: 1, // slidemove will be 1 if loop is true 213 slideMargin: 0, 214 adaptiveHeight: true, 215 }); 216 217 var slider = $(".lightslider > ul").lightSlider({ 218 item: 1, 219 autoWidth: false, 220 slideMove: 1, // slidemove will be 1 if loop is true 221 slideMargin: 0, 222 223 addClass: '', 224 mode: "fade", 225 useCSS: true, 226 cssEasing: 'ease', //'cubic-bezier(0.25, 0, 0.25, 1)',// 227 easing: 'linear', //'for jquery animation',//// 228 229 speed: 400, //ms'
230 auto: false, 231 loop: false, 232 slideEndAnimation: true, 233 pause: 2000, 234 235 keyPress: false, 236 controls: false, 237 prevHtml: '', 238 nextHtml: '', 239 240 rtl:false, 241 adaptiveHeight:true, 242 243 vertical:false, 244 245 /* 246 onSliderLoad: function (el) { 247 248 var maxHeight = 0, 249 container = $(el), 250 children = container.children(); 251 252 children.each(function () { 253 var childHeight = $(this).height(); 254 if (childHeight > maxHeight) { 255 maxHeight = childHeight; 256 } 257 }); 258 console.log(maxHeight); 259 container.height(maxHeight); 260 }, 261 */ 262 //verticalHeight:500, 263 264 265 // thumbItem:10, 266 // pager: false, 267 // gallery: false, 268 // galleryMargin: 5, 269 // thumbMargin: 5, 270 // currentPagerPosition: 'middle', 271 272 // enableTouch:true, 273 // enableDrag:true, 274 // freeMove:true, 275 // swipeThreshold: 40, 276 }); 277 } 278 279 if ($(window).width() < 768) { 280 $('#nav-tabs > li a').click(function () { 281 $('html, body').animate({ 282 scrollTop: $('#tabs-collapse').offset().top 283 }, 500); 284 }); 285 } 286 } 287 }; 288})(jQuery);
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.