1// --- dostepnosc okienek "Zaloguj" i "Pobierz aplikacje" --- 2// przycisk, ktory otworzyl okienko (po zamknieciu wraca na niego fokus) 3var ostatniPrzyciskOkienka = null; 4 5function otworzOkienko(okienko, przyciski) { 6 ostatniPrzyciskOkienka = document.activeElement; 7 okienko.removeAttribute('inert'); 8 przyciski.forEach(function (p) { if (p) { p.setAttribute('aria-expanded', 'true'); } }); 9 10 // fokus na pierwszy link/przycisk w okienku (po animacji otwierania) 11 window.setTimeout(function () { 12 var pierwszy = okienko.querySelector('a[href], button'); 13 if (pierwszy) { 14 pierwszy.focus(); 15 } 16 }, 550); 17} 18 19function zamknijOkienko(okienko, przyciski) { 20 okienko.setAttribute('inert', ''); 21 przyciski.forEach(function (p) { if (p) { p.setAttribute('aria-expanded', 'false'); } }); 22 23 if (ostatniPrzyciskOkienka && typeof ostatniPrzyciskOkienka.focus === 'function' && okienko.contains(document.activeElement)) { 24 ostatniPrzyciskOkienka.focus(); 25 } 26} 27 28function przyciskiLogowania() { 29 return [document.getElementById('ebank_btn'), document.getElementById('ebank_btn_top'), document.getElementById('ebank_btn_tel')]; 30} 31 32// przycisk "Zaloguj", pod ktorym otwiera sie okienko: na telefonie ten z paska u gory (ebank_btn_tel), 33// bo przycisk z naglowka jest wtedy ukryty 34function przyciskZaloguj() { 35 var tel = document.getElementById('ebank_btn_tel'); 36 37 return (tel && tel.getClientRects().length) ? tel : document.getElementById('ebank_btn'); 38} 39 40// Telefon: wysokosc okienka dopasowana do tresci (zamiast sztywnych 550/300 px), 41// ale nie wyzsza niz miejsce do dolnej krawedzi ekranu (wtedy tresc sie przewija). 42function wysokoscNaTelefonie(okienko) { 43 var tresc = okienko.scrollHeight; 44 var miejsce = window.innerHeight - okienko.getBoundingClientRect().top - 16; 45 46 return Math.max(120, Math.min(tresc, miejsce)) + 'px'; 47} 48 49function pokaz() { 50 51 let bartek = document.getElementById('id_ebank_pole'); 52 let bartektlo = document.getElementById('id_ebank_tlo'); 53 54 let szerokoscStrony = window.innerWidth; 55 56 57 58 let cursorPosition = window.pageYOffset; 59 60 if (cursorPosition >
60= 80 && szerokoscStrony > 766) { 61 62 const btnBartekTop = document.getElementById("ebank_btn_top"); 63 let btnBartekTopHeight = btnBartekTop.clientHeight; 64 let btnBartekTopWidth = btnBartekTop.clientWidth; 65 let btnBartekTopX = btnBartekTop.getBoundingClientRect().x; 66 let btnBartekTopY = btnBartekTop.getBoundingClientRect().y; 67 bartek.style.top = (btnBartekTopY + btnBartekTopHeight + 15) + "px"; 68 bartek.style.right = (window.innerWidth - (btnBartekTopX + btnBartekTopWidth) - 25) + "px"; 69 70 71 } else { 72 73 const btnBartek = przyciskZaloguj(); 74 let btnBartekHeight = btnBartek.clientHeight; 75 let btnBartekWidth = btnBartek.clientWidth; 76 let btnBartekX = btnBartek.getBoundingClientRect().x; 77 let btnBartekY = btnBartek.getBoundingClientRect().y; 78 bartek.style.top = (btnBartekY + btnBartekHeight + 15) + "px"; 79 bartek.style.right = (window.innerWidth - (btnBartekX + btnBartekWidth)) + "px"; 80 81 } 82 83 bartek.classList.add('visible'); 84 bartektlo.classList.add('visible'); 85 86 if (szerokoscStrony > 766) { 87 88 $("#id_ebank_pole").animate({ 89 // opacity: 1, 90 height: "340px", 91 92 }, 500) 93 94 } else { 95 96 $("#id_ebank_pole").animate({ 97 // opacity: 1, 98 height: wysokoscNaTelefonie(bartek), 99 100 }, 500) 101 102 103 } 104 105 $("#id_ebank_tlo").animate({ 106 opacity: 0.5, 107 108 109 }, 500) 110 111 otworzOkienko(bartek, przyciskiLogowania()); 112} 113 114 115//pokaz apllikacja 116 117function pokaz_aplikacja() { 118 let cursorPosition = window.pageYOffset; 119 120 let bartektlo = document.getElementById('id_ebank_tlo'); 121 let szerokoscStrony = window.innerWidth; 122 123 let aplikacja = document.getElementById('aplikacja_popup'); 124 125 126 127 const btnBartekTop = document.getElementById("aplikacja_btn"); 128 let btnBartekTopHeight = btnBartekTop.clientHeight; 129 let btnBartekTopWidth = btnBartekTop.clientWidth; 130 let btnBartekTopX = btnBartekTop.getBoundingClientRect().x; 131 let btnBartekTopY = btnBartekTop.getBoundingClientRect().y; 132 aplikacja.style.top = (btnBartekTopY + btnBartekTopHeight + 15) + "px"; 133 aplikacja.style.right = (window.innerWidth - (btnBartekTopX + btnBartekTopWidth) - 25) + "px"; 134 135 136 137 138 139 140 aplikacja.classList.add('visible'); 141 bartektlo.classList.add('visible'); 142 143 144 if (szerokoscStrony > 766) { 145 146 147 $("#aplikacja_popup").animate({ 148 // opacity: 1, 149 height: "100px", 150 151 }, 500) 152 153 } else { 154 155 $("#aplikacja_popup").animate({ 156 // opacity: 1, 157 height: wysokoscNaTelefonie(aplikacja), 158 159 }, 500) 160 161 } 162 163 $("#id_ebank_tlo").animate({ 164 opacity: 0.5, 165 166 167 }, 500) 168 169 otworzOkienko(aplikacja, [document.getElementById('aplikacja_btn')]); 170} 171 172 173 174 175 176function usun() { 177 178 var bartek = document.getElementById('id_ebank_pole'); 179 var bartektlo = document.getElementById('id_ebank_tlo'); 180 bartek.classList.remove('visible'); 181 bartektlo.classList.remove('visible'); 182 183 $("#id_ebank_pole").animate({ 184 // opacity: 0, 185 height: "0px", 186 }, .500); 187 188 $("#id_ebank_tlo").animate({ 189 opacity: 0, 190 }, .500) 191 192 zamknijOkienko(bartek, przyciskiLogowania()); 193} 194 195 196 197function usun_aplikacja() { 198 199 var bartek = document.getElementById('aplikacja_popup'); 200 var bartektlo = document.getElementById('id_ebank_tlo'); 201 bartek.classList.remove('visible'); 202 bartektlo.classList.remove('visible'); 203 204 $("#aplikacja_popup").animate({ 205 // opacity: 0, 206 height: "0px", 207 }, .500); 208 209 $("#id_ebank_tlo").animate({ 210 opacity: 0, 211 }, .500) 212 213 zamknijOkienko(bartek, [document.getElementById('aplikacja_btn')]); 214} 215 216// Esc zamyka otwarte okienko 217document.addEventListener('keydown', function (e) { 218 if (e.key !== 'Escape') { 219 return; 220 } 221 222 var logowanie = document.getElementById('id_ebank_pole'); 223 var aplikacja = document.getElementById('aplikacja_popup'); 224 225 if (logowanie && logowanie.classList.contains('visible')) { 226 usun(); 227 } 228 229 if (aplikacja && aplikacja.classList.contains('visible')) { 230 usun_aplikacja(); 231 } 232}); 233 234 235 236 237 238 239 240var tlo = document.getElementById('id_ebank_tlo'); 241tlo.addEventListener("click", usun); 242tlo.addEventListener("click", usun_aplikacja); 243 244//carousel link 245 246// let bartek = $(".carousel-item").each(function (index) { 247 248// $(this).find('a').attr('href'); 249// } 250 251// ) 252 253 254 255$(function () { 256 $(".carousel-item").each(function (index) { 257 258 // klikniecie w dowolne miejsce slajdu przenosi pod link ze slajdu (jesli slajd go ma) 259 $(this).on("click", function () { 260 let link = $(this).find('a').attr('href'); 261 262 if (link !== undefined) { 263 window.location = link; 264 } 265 }); 266 }); 267});
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.