1$(document).ready(function(){ 2 jsEqualHeights('.js-equal-columns'); 3 4 if ($('.glider--timeline').length){ 5 var gliderTimeline = new Glider(document.querySelector('.glider--timeline'), { 6 scrollLock: 1, 7 slidesToShow: 1, 8 slidesToScroll: 1, 9 duration: 0.2, 10 draggable: true, 11 dragVelocity: 6, 12 dots: '.glider-dots', 13 arrows: { 14 prev: '.glider-prev', 15 next: '.glider-next' 16 } 17 }); 18 19 gliderTimeline.scrollItem(5); 20 } 21 22 // data methodoloy 23 if ($('.dm__body').length){ 24 let dmBody = $('.dm__body'); 25 26 // tab controls for data methodology 27 $('.tab--01').click(function(e){ 28 dmBody.removeClass('dm--panel--02'); 29 dmBody.removeClass('dm--panel--03'); 30 dmBody.removeClass('dm--panel--04'); 31 dmBody.addClass('dm--panel--01'); 32 $('.dm__nav').get(0).scrollIntoView({block: 'center'}); 33 e.preventDefault(); 34 }); 35 36 $('.tab--02').click(function(e){ 37 dmBody.removeClass('dm--panel--01'); 38 dmBody.removeClass('dm--panel--03'); 39 dmBody.removeClass('dm--panel--04'); 40 dmBody.addClass('dm--panel--02'); 41 $('.dm__nav').get(0).scrollIntoView({block: 'center'}); 42 e.preventDefault(); 43 }); 44 45 $('.tab--03').click(function(e){ 46 dmBody.removeClass('dm--panel--01'); 47 dmBody.removeClass('dm--panel--02'); 48 dmBody.removeClass('dm--panel--04'); 49 dmBody.addClass('dm--panel--03'); 50 $('.dm__nav').get(0).scrollIntoView({block: 'center'}); 51 e.preventDefault(); 52 }); 53 54 $('.tab--04').click(function(e){ 55 dmBody.removeClass('dm--panel--01'); 56 dmBody.removeClass('dm--panel--02'); 57 dmBody.removeClass('dm--panel--03'); 58 dmBody.addClass('dm--panel--04'); 59 $('.dm__nav').get(0).scrollIntoView({block: 'center'}); 60 e.preventDefault(); 61 }); 62 63 // expansion controls for grid 64 $('.grid__button').click(function(e){ 65 $('.dm__model__grid').toggleClass('grid--short'); 66 $('.dm__model__grid').get(0).scrollIntoView({block: 'center'}); 67 e.preventDefault(); 68 }); 69 70 // anchor controls for copy 71 $('.tab--02--omap--table').click(function(e){ 72 $('.tab--02').click(); 73 $('#omap-table').get(0).scrollIntoView({block: 'center'}); 74 e.preventDefault(); 75 }); 76 77 //used for hyperlink URL with # for mapping 78 var hash = window.location.hash.substr(1); 79 if(hash.toLowerCase() == 'curation'){//01 - same as click action above 80 dmBody.removeClass('dm--panel--02'); 81 dmBody.removeClass('dm--panel--03'); 82 dmBody.removeClass('dm--panel--04'); 83 dmBody.addClass('dm--panel--01'); 84 $('.dm__nav').get(0).scrollIntoView({block: 'center'}); 85 e.preventDefault(); 86 } 87 if(hash.toLowerCase() == 'genomics'){//04 88 dmBody.removeClass('dm--panel--01'); 89 dmBody.removeClass('dm--panel--02'); 90 dmBody.removeClass('dm--panel--03'); 91 dmBody.addClass('dm--panel--04'); 92 $('.dm__nav').get(0).scrollIntoView({block: 'center'}); 93 e.preventDefault(); 94 95 } 96 if(hash.toLowerCase() == 'omop'){//02 97 dmBody.removeClass('dm--panel--01'); 98 dmBody.removeClass('dm--panel--03'); 99 dmBody.removeClass('dm--panel--04'); 100 dmBody.addClass('dm--panel--02'); 101 $('.dm__nav').get(0).scrollIntoView({block: 'center'}); 102 e.preventDefault(); 103 } 104 } 105 106 107 // Institutional Agreements 108 if ($('.agreements__app').length){ 109 var tableWrapper = $('.app__table__wrapper'); 110 var inputField = $('.search'); 111 var inputFieldVal = ''; 112 var inputFieldClear = $('.input__clear'); 113 var emptyResult = $('.app__table__empty'); 114 var emptyResultVal = $('.empty__term'); 115 116 var iaOptions = { 117 valueNames: ['institution', 'contact'] 118 }; 119 120 var iaList = new List('agreements-app', iaOptions); 121 122 iaList.on('updated', function(){ 123 if (iaList.searched == true){ 124 inputFieldClear.addClass('show--clear'); 125 } else { 126 inputFieldClear.removeClass('show--clear'); 127 } 128 129 if (iaList.visibleItems.length == 0){ 130 inputFieldVal = '\u2018'+ inputField.val() +'\u2019'; 131 emptyResultVal.text(inputFieldVal); 132 tableWrapper.hide(); 133 emptyResult.show(); 134 } else { 135 tableWrapper.show(); 136 emptyResult.hide(); 137 emptyResultVal.text(''); 138 } 139 });
140 141 inputFieldClear.click(function(){ 142 inputField.val(''); 143 iaList.search(); 144 iaList.update(); 145 inputField.focus(); 146 }); 147 } 148 149 150 151 152 153}); 154function jsEqualHeights(elementTarget) { 155 // Cache the highest 156 var highestBox = 0; 157 // Select and loop the elements you want to equalise 158 $(elementTarget).each(function(){ 159 // If this box is higher than the cached highest then store it 160 if($(this).height() > highestBox) { 161 highestBox = $(this).height(); 162 } 163 164 }); 165 166 // Set the height of all those children to whichever was highest 167 $(elementTarget).height(highestBox); 168}
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.