1$(document).ready(function() { 2 //custom selects init 3 $('.selectpicker').selectpicker({ 4 }); 5 6 $('#navbar-header-mobile-toggler') 7 .on('click tap', function () { 8 $(this).toggleClass('active'); 9 }); 10 11 /* $('.main-menu--head .dropdown--main-menu .dropdown-toggle').on('mouseenter mouseleave click tap', function() { 12 $(this).parent().toggleClass("open"); 13 $(this).toggleClass("open"); 14 });*/ 15 16 17 18 var tableOptionsPharm = { 19 "responsive": true, 20 "paging": false, 21 "bPaginate": false, 22 "ordering": false, 23 "info": false, 24 "language": { 25 "searchPlaceholder": "ÐоиÑк по апÑекам", 26 "processing": "ÐодождиÑе...", 27 "search": "", 28 "lengthMenu": "ÐоказаÑÑ _MENU_ запиÑей", 29 "info": "ÐапиÑи Ñ _START_ до _END_ из _TOTAL_ запиÑей", 30 "infoEmpty": "ÐапиÑи Ñ 0 до 0 из 0 запиÑей", 31 "infoFiltered": "(оÑÑилÑÑÑовано из _MAX_ запиÑей)", 32 "infoPostFix": "", 33 "loadingRecords": "ÐагÑÑзка запиÑей...", 34 "zeroRecords": "ÐапиÑи оÑÑÑÑÑÑвÑÑÑ.", 35 "emptyTable": "Ð ÑаблиÑе оÑÑÑÑÑÑвÑÑÑ Ð´Ð°Ð½Ð½Ñе", 36 "paginate": { 37 "first": "ÐеÑваÑ", 38 "previous": "ÐÑедÑдÑÑаÑ", 39 "next": "СледÑÑÑаÑ", 40 "last": "ÐоÑледнÑÑ" 41 }, 42 "aria": { 43 "sortAscending": ": акÑивиÑоваÑÑ Ð´Ð»Ñ ÑоÑÑиÑовки ÑÑолбÑа по возÑаÑÑаниÑ", 44 "sortDescending": ": акÑивиÑоваÑÑ Ð´Ð»Ñ ÑоÑÑиÑовки ÑÑолбÑа по ÑбÑваниÑ" 45 } 46 }, 47 "dom": '<"top"<"search-icon xl-basic-search">>rt<"bottom"><"clear">' 48 }; 49 50 $('.page table').addClass('table table-striped table-condensed table-bordered table-hover').wrap(function(){ 51 return '<div class="table-responsive"></div>'; 52 }); 53 var tables = $('.page table').DataTable(tableOptionsPharm); 54 tables.draw( false ) 55 .columns.adjust() 56 .responsive.recalc(); 57 58/* 59 $('.preview-list').each(function (index, element) { 60/!* $(element).addClass(''+index+'');*!/ 61 62 var showButton = $(this).find('.preview-list__more .more-link'); 63 showButton/!*.addClass(''+index+'')*!/.hide(); 64 65 $(this).find('.article-preview').each(function (indexInner, elementInner) { 66 /!* console.log(''+elementInner+'', indexInner);*!/ 67 if (indexInner > 3){ 68 $(elementInner).hide(); 69 showButton.show().on('click', function () { 70 /!*console.log(''+element+'');*!/ 71 $(element).find('.article-preview').show('slow'); 72 }); 73 } 74 }); 75 });*/ 76 77 var galleryContainer = $('.object-gallery'); 78 var imgFirst = galleryContainer.find('a:first-of-type'); 79 80 var imgRest = galleryContainer.find('a:not(:first-of-type)'); 81 imgRest.wrapAll('<div class="object-gallery__img-rest" />'); 82 imgFirst.wrapAll('<div class="object-gallery__img-first" />'); 83 console.log(imgRest.length); 84 /*imgFirst.appendTo(galleryContainer); 85 imgRest.appendTo(galleryContainer);*/ 86 87 var contentImages = $('.page--inner .page__content--inner > p img, .page--inner .page__content--inner > div > img'); 88 contentImages.each(function (i, e) { 89 var imgBigSrc = $(this).attr('src'); 90 if ( !$(this).parent('a').attr('data-fancybox')){ 91 $(this).wrap('<a href="'+imgBigSrc+'" data-fancybox\=\"gallery-1\"></a>'); 92 } 93 if ( !$(this).hasClass('img-responsive')){ 94 $(this).addClass('img-responsive'); 95 } 96 }); 97 98 /* galleryContainer.children().each(function(i){ 99 if(i % 1 == 0 && i != 0){ 100 // We get the elements we need to wrap, but they're going to be in reverse order (thanks to .prevAll()) 101 var elementsToWrap = $(this).prevAll().not('.wrap2'); 102 var temp = []; 103 for(var j=0; j < elementsToWrap.length; j++){ 104 // Reverse the objects selected by placing them in a temporary array. 105 temp[(elementsToWrap.length-1) - j] = elementsToWrap.eq(j)[0]; 106 } 107 // Wrap the array back into a jQuery object, then use .wrapAll() to add a div around them 108 $(temp).wrapAll('<div class="wrap2" />'); 109 } 110 });*/ 111 112 /*var galleryContainer = $('.object-gallery'); 113 var imgFirst = $('.object-gallery:first-child'); 114 imgFirst.detach().wrap('<div class="object-gallery__img--first"></div>'); 115 var imgRest = $('.object-gallery:not(:first-child)'); 116 imgRest.detach().wrap('<div class="object-gallery__img-rest"></div>'); 117 console.log(imgRest); 118 galleryContainer.find('a:first-child').prepend(imgFirst).append(imgRest);*/ 119 120 121 $('#navbar-footer-mobile') 122 .on('shown.bs.collapse', function () { 123 $('#navbar-footer-mobile-toggler').addClass('active') 124 }) 125 .on('hidden.bs.collapse', function () { 126 $('#navbar-footer-mobile-toggler').removeClass('active') 127 });
128 $('#navbar-header-mobile') 129 .on('shown.bs.collapse', function () { 130 $('#navbar-header-mobile-toggler').addClass('active') 131 }) 132 .on('hidden.bs.collapse', function () { 133 $('#navbar-header-mobile-toggler').removeClass('active') 134 }); 135 136 $("#navbar-footer").on("shown.bs.collapse", function () { 137 $('html, body').animate({ 138 scrollTop: $('#smooth-open-anchor').offset().top + $('#smooth-open-anchor').outerHeight(true) - $(window).height() 139 }, 1800); 140 }); 141 142 $(function(){ 143 $(".dropdown.active").toggleClass("open",true); 144 $(".dropdown.active").on("hide.bs.dropdown",function(e) { 145 e.preventDefault(); 146 return false; 147 }); 148 }); 149 150 $('.preview-list__more > a').on('click', function () { 151 $(this).parents('.preview-list').find('.article-preview.hidden-xs').removeClass('hidden-xs'); 152 }); 153 154}); 155
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.