1$(document).ready(function(){ 2 $('[data-toggle_block]').on('click', function(e){ 3 let target = $($(this).data('toggle_block')) 4 if( target.length ) { 5 target.slideToggle(function(){ 6 $(e.target).text( target.css('display') === 'none'?'РазвеÑнÑÑÑ':'СвеÑнÑÑÑ' ) 7 }) 8 } 9 }); 10 11 $('[data-toggle_modal]').on('click', function(){ 12 let target = $(this).data('toggle_modal') 13 $('.modal-content:visible').slideUp(400, () => { 14 $(target).slideDown() 15 }) 16 }); 17}); 18 19function openModal(modal){ 20 $('#popup-auth .modal-content').hide() 21 $('#popup-auth .modal-content.' + (modal || 'modal-login') ).show() 22 $('#popup-auth').modal('show') 23 return false; 24} 25 26function addAnotherField(){ 27 if( $("input[type='text'][name='Users[prof_status]']").length === 0 ) { 28 let input = $("<input type=\"text\" style=\"margin-top: 9px;\" name=\"Users[prof_status]\" placeholder=\"СпеÑиалÑноÑÑÑ\"/>") 29 $('#users-prof_status').after(input) 30 } 31} 32function removeAnotherField() { 33 $("input[type='text'][name='Users[prof_status]']").remove() 34} 35function addAnotherTheme(){ 36 if( $("input[type='text'][name='Theses[theme]']").length === 0 ) { 37 let input = $("<input type=\"text\" class=\"form-control\" style=\"margin-top: 9px;\" name=\"Theses[theme]\"/>") 38 $('#theses-theme').after(input) 39 } 40} 41function removeAnotherTheme() { 42 $("input[type='text'][name='Theses[theme]']").remove() 43} 44 45function addCityTextInput(){ 46 if( $("input[type='text'][name='Users[city]']").length === 0 ) { 47 let input = $("<input type=\"text\" id='users-city' style=\"margin-top: 9px;\" name=\"Users[city]\" placeholder=\"ÐоÑод\"/>") 48 $('#users-city').after(input) 49 $("select[name='Users[city]']").prop('name', 'Users[city_disabled]').prop('id', 'users-city_disabled') 50 } 51} 52function removeCityTextInput(){ 53 $("input[type='text'][name='Users[city]']").remove() 54 $("select[name='Users[city_disabled]']").prop('name', 'Users[city]').prop('id', 'users-city') 55} 56function hideCityList(){ 57 $("select[name='Users[city_disabled]']").hide().val('') 58 $("input[name='Users[city]']").css({marginTop:'-7px'}) 59} 60function showCityList(){ 61 $("select[name='Users[city]']").show() 62} 63function addCompanyTextInput(){ 64 if( $("input[type='text'][name='Users[company_name]']").length === 0 ) { 65 let input = $("<input type=\"text\" id='users-company_name' style=\"margin-top: 9px;\" name=\"Users[company_name]\" placeholder=\"Ðазвание компании\"/>") 66 $('#users-company_name').after(input) 67 $("select[name='Users[company_name]']").prop('name', 'Users[company_name_disabled]').prop('id', 'users-company_name_disabled') 68 } 69} 70function removeCompanyTextInput(){ 71 $("input[type='text'][name='Users[company_name]']").remove() 72 $("select[name='Users[company_name_disabled]']").prop('name', 'Users[company_name]').prop('id', 'users-company_name') 73} 74function hideCompanyList(){ 75 $("select[name='Users[company_name_disabled]']").hide().val('') 76 $("input[name='Users[company_name]']").css({marginTop:'-7px'}) 77} 78function showCompanyList(){ 79 $("select[name='Users[company_name]']").show() 80} 81 82$('#popup-auth form select').on('change', function(e){ 83 let value = $(e.target).val() 84 $(this).css({color: value === null ? '#727272' : '#495057'}); 85 let id = $(this).attr('id'); 86 if(id === 'users-country') { 87 if (+value === 173) { 88 removeCityTextInput(); 89 showCityList(); 90 } else { 91 addCityTextInput() 92 hideCityList() 93 } 94 } 95 if (id === 'users-city'){ 96 if( value === 'another') 97 addCityTextInput() 98 else 99 removeCityTextInput() 100 } 101 if (id === 'users-company_name'){ 102 if( value === 'another') 103 addCompanyTextInput() 104 else 105 removeCompanyTextInput() 106 } 107 if(id === 'users-prof_status'){ 108 if(value === 'another') 109 addAnotherField() 110 else 111 removeAnotherField() 112 } 113}); 114$('#tab-tesis form select').on('change', function(e) { 115 let value = $(e.target).val() 116 $(this).css({color: value === null ? '#727272' : '#495057'}); 117 let id = $(this).attr('id'); 118 if(id === 'theses-theme'){ 119 console.log(value) 120 if(value === 'another') 121 addAnotherTheme() 122 else 123 removeAnotherTheme() 124 } 125}); 126let authForm = $('#popup-auth form'); 127// запÑеÑÐ°ÐµÑ Ð¿ÐµÑезагÑÑÐ·ÐºÑ ÑÑÑаниÑÑ Ð½Ð° ÑоÑÐ¼Ð°Ñ Ð°Ð²ÑоÑизаÑии, воÑÑÑановлениÑ, ÑегиÑÑÑаÑии 128authForm.on('beforeSubmit', function(e){
129 e.preventDefault(); 130 return false; 131}) 132 133authForm.on('beforeValidate ajaxBeforeSend ajaxComplete', function(e){ 134 console.log( e.type ); 135 $(e.target).find('button[type="submit"]').prop('disabled', e.type !== 'ajaxComplete') 136}); 137 138authForm.on('afterValidate', function(e, resp){ 139 if( resp.redirect ) 140 window.location.href = resp.redirect; 141 142 console.log( resp, typeof(resp['users-format']) ) 143 144 if( typeof(resp['users-format']) !== 'undefined' && resp['users-format'].length) 145 $('#users-format').parent('div').addClass('is-invalid') 146 else 147 $('#users-format').parent('div').removeClass('is-invalid') 148 149 if( Object.keys(resp)[0] ){ 150 if ($(".is-invalid").length > 0) { 151 console.log(104, $(".is-invalid"), $(".is-invalid")[0]) 152 $(".is-invalid")[0].scrollIntoView({behavior: 'smooth'}); 153 } 154 // let key = $('#' + Object.keys(resp)[0] ); 155 // console.log(key); 156 // $('body #popup-auth').animate({scrollTop: key.offset().top}) 157 } 158 159 if (resp.form === 'recovery-password' && resp.status === 'success') { 160 $('.recovery-form').addClass('d-none'); 161 $('#recovery-success-step1').html('ÐнÑÑÑÑкÑÐ¸Ñ Ð¿Ð¾ воÑÑÑÐ°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¿Ð°ÑÐ¾Ð»Ñ Ð±Ñла вÑÑлана по адÑеÑÑ ÑлекÑÑонной поÑÑÑ. ÐожалÑйÑÑа, пÑовеÑÑÑе Ñвой e-mail').removeClass('d-none'); 162 } 163 164}); 165 166$('#committee_showMore').on('click', function(e){ 167 e.preventDefault(); 168 let status = $(this).attr('block_status'); 169 console.log( 'committee', status); 170 if(status === 'closed') { 171 $('#committee_hiddenBlock').slideDown(1500, function() { 172 $(this).css('display', 'flex'); 173 }); 174 //$('html, body').animate({ scrollTop: ($('#committee').offset().top - 60) + 'px'}, 700); 175 $(this).attr('block_status', 'opened').text('СкÑÑÑÑ'); 176 }else{ 177 $('html, body').animate({ scrollTop: ($('#committee').offset().top - 60) + 'px'}, 700); 178 $('#committee_hiddenBlock').slideUp(1500); 179 $(this).attr('block_status', 'closed').text('СмоÑÑеÑÑ Ð²Ñе'); 180 } 181}) 182 183 184$(document).ready(function(){ 185 $('#placeAddress .toggleText').on('click', function(e){ 186 e.preventDefault(); 187 let hidden = $(this).closest('.wrap').find('.hiddenText'); 188 189 if($(this).text() === 'РазвеÑнÑÑÑ') { 190 hidden.slideDown(700); 191 $(this).text('СкÑÑÑÑ'); 192 }else{ 193 hidden.slideUp(700); 194 $(this).text('РазвеÑнÑÑÑ'); 195 let offsetTop = $('#placeAddress').offset().top; 196 $('html, body').animate({'scrollTop': offsetTop + 40 + 'px'}); 197 } 198 }) 199}); 200 201 202$('#yamaps-script').on('load', function() { 203 console.log('yamaps is loading!'); 204 ymaps.ready(function() { 205 window.map = new ymaps.Map("map", { 206 "type":"yandex#map", 207 "zoom":15, 208 "center":[37.654062, 55.763564] 209 }); 210 map.behaviors.disable("scrollZoom"); 211 var office = new ymaps.Placemark([37.654062, 55.763564], { 212 "hintContent":"ФÐÐУ «ÐÐÐЦ онкологии им. Ð.Ð. ÐÐ»Ð¾Ñ Ð¸Ð½Ð°Â» ÐинздÑава РоÑÑии<br/><span style=\"color:gray\">г. ÐоÑква, ÐаÑиÑÑкое ÑоÑÑе, д.23<\/span>", 213 "iconContent": "" 214 }, { 215 "preset": "islands#blueIcon" 216 }); 217 map.geoObjects.add(office); 218 }); 219 ymaps.ready(function() { 220 window.map = new ymaps.Map("map1", { 221 "type":"yandex#map", 222 "zoom":15, 223 "center":[37.654062, 55.763564] 224 }); 225 map.behaviors.disable("scrollZoom"); 226 var office = new ymaps.Placemark([37.654062, 55.763564], { 227 "hintContent":"ФÐÐУ «ÐÐÐЦ онкологии им. Ð.Ð. ÐÐ»Ð¾Ñ Ð¸Ð½Ð°Â» ÐинздÑава РоÑÑии<br/><span style=\"color:gray\">г. ÐоÑква, ÐаÑиÑÑкое ÑоÑÑе, д.23<\/span>", 228 "iconContent": "" 229 }, { 230 "preset": "islands#blueIcon" 231 }); 232 map.geoObjects.add(office); 233 });
234 235 ymaps.ready(function() { 236 window.map = new ymaps.Map("map2", { 237 "type":"yandex#map", 238 "zoom":16, 239 "center":[37.578262, 55.710732] 240 }); 241 map.behaviors.disable("scrollZoom"); 242 var office = new ymaps.Placemark([37.578262, 55.710732], { 243 "hintContent":"<span style=\"color:gray\">ÐоÑква, ÐенинÑкий пÑоÑпекÑ, 32а<\/span>", 244 "iconContent": "" 245 }, { 246 "preset": "islands#blueIcon" 247 }); 248 map.geoObjects.add(office); 249 }); 250 ymaps.ready(function() { 251 window.map = new ymaps.Map("map3", { 252 "type":"yandex#map", 253 "zoom":16, 254 "center":[37.578262, 55.710732] 255 }); 256 map.behaviors.disable("scrollZoom"); 257 var office = new ymaps.Placemark([37.578262, 55.710732], { 258 "hintContent":"<span style=\"color:gray\">ÐоÑква, ÐенинÑкий пÑоÑпекÑ, 32а<\/span>", 259 "iconContent": "" 260 }, { 261 "preset": "islands#blueIcon" 262 }); 263 map.geoObjects.add(office); 264 }); 265}); 266$(document).ready(function(){ 267 $('*[data-scroll_to]').on('click', function(){ 268 let anchor = $('[data-id=' + $(this).data('scroll_to') + ']'); 269 270 if(anchor.length) 271 scrollToElement(anchor); 272 }); 273 274 function scrollToElement(e){ 275 console.log('call'); 276 277 let offset = $(window).width() <= 767 ? 0 : -75; 278 279 let anchorPosition = e.offset().top + offset; 280 281 let distance = anchorPosition - $(document).scrollTop(); 282 283 if(distance < 0) 284 distance = distance * -1; 285 286 let speed = distance * 0.35; 287 288 $('html, body').animate({ 289 scrollTop: anchorPosition + 'px' 290 }, speed); 291 } 292}); 293 294/* 295 296 function hideAlerts(){ 297 $.each($('.alert'), function(){ 298 $(this).hide(); 299 }); 300 } 301 302 // Хак, ÑÑÐ¾Ð±Ñ Ð±ÑаÑÐ·ÐµÑ Ð½Ðµ ÑкÑоллил докÑÐ¼ÐµÐ½Ñ ÐºÑда ненадо пÑи обновлении 303 if (window.location.hash) { 304 $(document).scroll( function() { 305 var hash = window.location.hash 306 var hashName = hash.substring(1, hash.length); 307 var element; 308 if ($(hash).length != 0){ 309 element = $(hash); 310 }else if ($('a[name="' + hashName + '"]').length != 0) { 311 element = $('a[name="' + hashName + '"]:first'); 312 } 313 if (element != undefined){ 314 window.scrollTo(0, element.position().top); 315 } 316 $(document).unbind("scroll"); 317 }); 318 } 319 // START menu events 320 321 $(".menu a, .mobile-app, .precourceBtn").on('click', function (e) { 322 e.preventDefault(); 323 const data_id = $(this).attr('data-id'); 324 if(window.english) { 325 console.log(data_id); 326 if(typeof data_id !== 'undefined'){ 327 window.location = '/' + data_id; 328 return false; 329 } 330 } 331 if (typeof (data_id) === 'undefined' && $(this).attr('href') !== '#') { 332 window.location = $(this).attr('href'); 333 } else if (typeof (data_id) === 'undefined' && $(this).attr('href') == '#') { 334 let modal = $(this).attr('data-target'); 335 hideAlerts(); 336 $(modal).modal('show'); 337 } else { 338 const el = $(data_id); 339 console.log( el, el.length); 340 if(el.length > 0) { 341 let top = el.offset().top; 342 console.log(top); 343 $("body, html").animate({scrollTop: top - 70 + "px"}, 700); 344 return false; 345 }else{ 346 window.location = '/'+data_id; 347 } 348 } 349 350 }); 351 352 let hash = window.location.hash; 353 if(hash.length > 0){ 354 let el = $(hash); 355 let top = el.offset().top; 356 $("body, html").scrollTop(0); 357 $("body, html").animate({scrollTop: top - 70 +"px"}, 700); 358 } 359 // END menu events 360 361}); 362 363$(document).ready(function() { 364 $("input").focus(function () { 365 $(this).next().empty() 366 $(this).css('border-bottom', "1px solid #000") 367 }) 368 369 let hash = window.location.hash; 370 if(hash == '#auth') { 371 $("#popup-auth, #dark").css('display', 'block'); 372 } 373 374 375 $(".to_tab_tesis").click(function () { 376 $("[href='#tab-tesis']").click(); 377 });
378 379 $(".to_auth").click(function (e) { 380 e.preventDefault(); 381 $("#popup-auth, #dark").fadeIn(300); 382 }); 383 384 $(".to_program").click(function(e) { 385 e.preventDefault(); 386 let top = $('.grid-program').offset().top; 387 $("body, html").animate({scrollTop: top+"px"}, 700); 388 }); 389 390 $(".not_active").click(function(e) { 391 e.preventDefault(); 392 $("#dark, #popup").fadeIn(300); 393 }); 394 $("#dark, .popup-close, #popup-auth-link-reg").click(function () { 395 $("#dark, .popup").fadeOut(300); 396 }); 397 $("#link_auth").click(function (e) { 398 e.preventDefault(); 399 $("#popup-auth, #dark").fadeIn(300); 400 }); 401 $(".link_reg").click(function (e) { 402 e.preventDefault(); 403 let id = $(this).attr('id'); 404 let screen_top = Math.ceil(document.getElementById(id).getBoundingClientRect().top); 405 let top = $(this).offset().top; 406 $("#popup-reg").css('top', (top-screen_top+20)+'px'); 407 $("#popup-reg, #dark").fadeIn(300); 408 }); 409 410 $("input[name='send_reg']").click(function (e) { 411 e.preventDefault(); 412 let error = false; 413 let form = $("#reg form").serialize().split('&'); 414 let ready_obj = {} 415 form.forEach(function(item) { 416 let arr = item.split('='); 417 let name = arr[0]; 418 let value = arr[1]; 419 value = decodeURIComponent(value); 420 if(value == "") { 421 if(name != 'lastname') { 422 if(!error) error = name; 423 } 424 } 425 if(name == 'pass') { 426 let pass_repeat = $("input[name='pass_repeat']").val(); 427 if(value !== pass_repeat) { 428 if(!error) error = name; 429 } 430 } 431 if(name == 'email') { 432 let reg = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; 433 if(!reg.test(value)) { 434 if(!error) error = 'email_error'; 435 console.log(value); 436 } 437 } 438 if(name == 'login') { 439 if(!error) { 440 $.ajax({
441 type: "GET", 442 url: "/session/verifyLogin?login="+value, 443 //data: {login: value,}, 444 async: false, 445 success: function() {}, 446 error: function(xhr, er, status) { 447 if(!error) error = 'login-error'; 448 $('#reg input[name="login"]').css({ 449 'border-color': 'red' 450 }); 451 $("#error-login").text("Такой логин Ñже ÑÑÑеÑÑвÑеÑ"); 452 $("#error-login").css('display', 'block'); 453 let top = $('#reg input[name="login"]').offset().top; 454 $("body, html").animate({scrollTop: top+"px"}, 300); 455 return false; 456 } 457 }); 458 } 459 } 460 ready_obj[name] = value; 461 }); 462 if(error) { 463 if(error == 'pass') { 464 $('input[name="pass"]').css({ 465 'border-color': 'red' 466 }); 467 let top = $('input[name="pass"]').offset().top; 468 $("body, html").animate({scrollTop: top+"px"}, 300); 469 $("#error-pass").text("ÐаÑоли не ÑовпадаÑÑ"); 470 $("#error-pass").css('display', 'block'); 471 } 472 else if(error == 'email_error') { 473 $('input[name="email"]').css({ 474 'border-color': 'red' 475 }); 476 let top = $('input[name="email"]').offset().top; 477 $("body, html").animate({scrollTop: top+"px"}, 300); 478 $("#error-email").text("ÐекоÑÑекÑнÑй e-mail"); 479 $("#error-email").css('display', 'block'); 480 } 481 else if(error == 'login-error') { 482 $('#reg input[name="login"]').css({ 483 'border-color': 'red' 484 }); 485 let top = $('#reg input[name="login"]').offset().top; 486 $("body, html").animate({scrollTop: top+"px"}, 300); 487 $("#error-login").text("Такой логин Ñже ÑÑÑеÑÑвÑеÑ"); 488 $("#error-login").css('display', 'block'); 489 } 490 else { 491 $('#reg input[name="'+error+'"]').css({ 492 'border-color': 'red' 493 }); 494 let top = $('#reg [name="'+error+'"]').offset().top; 495 $("body, html").animate({scrollTop: top+"px"}, 300); 496 $("#error-"+error).text("ÐаполниÑе поле"); 497 $("#error-"+error).css('display', 'block'); 498 } 499 error = false; 500 return false; 501 } 502 else { 503 let ag = $("input[name='confirm']:checked").val(); 504 if(!ag) { 505 $("#error-confirm").text('ÐÑимиÑе ÑÑÐ»Ð¾Ð²Ð¸Ñ ÑÑаÑÑиÑ'); 506 $("#error-confirm").css({ 507 'display': 'block', 508 'color': 'red' 509 }); 510 return false; 511 } 512 $('<input type="hidden" name="js" value="1"/>').appendTo($("#reg form")); 513 $("#reg form").submit(); 514 } 515 }); 516 517 $("input[name='confirm']").change(function () { 518 $("#send_form p").empty(); 519 $("#send_form p").css('display', 'none'); 520 }); 521 522 $("#reg input, #reg select").focus(function () { 523 $(this).css({ 524 'border-color': '#fff' 525 }); 526 let name = $(this).attr('name'); 527 $("#error-"+name).empty(); 528 $("#error-"+name).css('display', 'none'); 529 }); 530 531 $("#tab-tesis input, #tab-tesis textarea").focus(function() { 532 $(this).css({ 533 'border-color': '#9C9C9C' 534 }); 535 let name = $(this).attr('name'); 536 $("#error-"+name).empty(); 537 $("#error-"+name).css('display', 'none'); 538 });
539 540 $('input[name="auth"]').click(function(e) { 541 e.preventDefault(); 542 let login = $("#auth-login").val(); 543 let password = $("#auth-password").val(); 544 545 $.ajax({ 546 type: "GET", 547 url: "/session/verifyCredentials", 548 data: { 549 login: login.trim(), 550 password: password 551 }, 552 success: function(res) { 553 console.log("SUCCESS"); 554 $("#popup-auth form").submit(); 555 }, 556 error: function(xhr, error, status) { 557 $("#popup-auth-btn-error").text('ÐевеÑнÑе логин или паÑолÑ'); 558 } 559 }); 560 }); 561 562 $("#popup-auth input").focus(function() { 563 $("#popup-auth-btn-error").empty(); 564 }); 565 566 $("input[name='tesis_send']").click(function (e) { 567 e.preventDefault(); 568 let error = false; 569 let form = $("#thesis_popup form").serialize().split('&'); 570 571 form.forEach(function(item) { 572 let arr = item.split('='); 573 let name = arr[0]; 574 let value = arr[1]; 575 value = decodeURIComponent(value); 576 if(value == "") { 577 if(!error) error = name; 578 } 579 else if(name == 'email') { 580 const email_input = $("#email_input") 581 const is_true_email = /.+@.+\..+/i.test(email_input.val()) 582 if(!is_true_email) error = 'email_incorrect' 583 } 584 }); 585 if(error) { 586 if(error === 'email_incorrect') { 587 $("#email_input").next().text('ÐекоÑÑекÑнÑй email') 588 $("#email_input").next().css('display', 'block'); 589 } 590 else { 591 $('input[name="'+error+'"]').css({'border-color': 'red'}); 592 $("#error-"+error).text("ÐаполниÑе поле"); 593 $("#error-"+error).css('display', 'block'); 594 } 595 596 error = false; 597 return false; 598 } 599 else $("#thesis_popup form").submit(); 600 }); 601 602 $("#popup-auth-link-forget").click(function (e) { 603 e.preventDefault(); 604 $("#popup-auth").css('display', 'none'); 605 $("#popup-forget, #dark").fadeIn(300); 606 }); 607 608 $("input[name='forget-send']").click(function (e) { 609 e.preventDefault(); 610 let login = $("input[name='email-forget']").val(); 611 if(login == "") { 612 $("input[name='email-forget']").css('border-color', 'red') 613 $("#error-email-forget").text('ÐведиÑе логин'); 614 return false; 615 } 616 login = decodeURIComponent(login); 617 $.ajax({
618 type: "POST", 619 url: "/session/restore", 620 data: {login: login,}, 621 async: false, 622 success: function(res) { 623 $("#success_restore").text(res); 624 $("#form-forget").remove(); 625 }, 626 error: function(xhr, er, status) { 627 $("#error-email-forget").text(xhr.responseText); 628 return false; 629 } 630 }); 631 }); 632 633 $("input[name='email-forget']").focus(function () { 634 $(this).css('border-color', '#000'); 635 $("#error-email-forget").empty(); 636 }); 637 638 $("input[name='password_new']").focus(function () { 639 let form = $(this).closest('form'); 640 $(form).find("#password_alert").text(''); 641 }); 642 643 $("input[name='send_new_pass']").click(function (e) { 644 e.preventDefault(); 645 let form = $(this).closest('form'); 646 let password_new = $("input[name='password_new']").val(); 647 if(password_new == '') { 648 $(form).find("#password_alert").text('ÐведиÑе новÑй паÑолÑ!'); 649 return false; 650 } 651 else { 652 password_new = decodeURIComponent(password_new); 653 let hash = $(this).attr('data-hash'); 654 $.ajax({
655 type: "POST", 656 url: "/session/restore/"+hash, 657 data: {password_new: password_new}, 658 async: false, 659 success: function(res) { 660 $("#success_msg_new_pass").text(res); 661 $("#restoreForm").remove(); 662 }, 663 error: function(xhr, er, status) { 664 $(form).find("#password_alert").text(xhr.responseText); 665 return false; 666 } 667 }); 668 } 669 }); 670 671 $("#popup-forget-link-auth").click(function (e) { 672 e.preventDefault(); 673 $("#popup-auth").fadeIn(300); 674 $("#popup-forget").css('display', 'none'); 675 }); 676 677 $("#popup-forget-link-reg").click(function (e) { 678 e.preventDefault(); 679 $("#popup-forget, #dark").fadeOut(300); 680 $('html, body').animate({scrollTop: $("#reg").offset().top + "px"}, 500); 681 }); 682 683 let init_slick_gold = false; 684 let init_slick_silver = false; 685 let init_slick_bronze = false; 686 let init_slick_sponsor = false; 687 let init_slick_exponent = false; 688 689 $("#general-sponsor").slick({ 690 dots: false, 691 infinite: true, 692 slidesToShow: 4, 693 slidesToScroll: 1, 694 // centerMode: true, 695 // centerPadding: '0', 696 arrows: true, 697 }); 698 699 // $("#gold-sponsor").slick({ 700 // dots: false, 701 // infinite: true, 702 // slidesToShow: 4, 703 // slidesToScroll: 1, 704 // // centerMode: true, 705 // // centerPadding: '0', 706 // arrows: true, 707 // }); 708 // 709 // $("#silver-sponsor").slick({ 710 // dots: false, 711 // infinite: true, 712 // slidesToShow: 4, 713 // slidesToScroll: 1, 714 // // centerMode: true, 715 // // centerPadding: '0', 716 // arrows: true, 717 // }); 718 // 719 // $("#bronze-sponsor").slick({ 720 // dots: false, 721 // infinite: true, 722 // slidesToShow: 4, 723 // slidesToScroll: 1, 724 // // centerMode: true, 725 // // centerPadding: '0', 726 // arrows: true, 727 // }); 728 // 729 // $("#sponsor-sponsor").slick({ 730 // dots: false, 731 // infinite: true, 732 // slidesToShow: 4, 733 // slidesToScroll: 1, 734 // // centerMode: true, 735 // // centerPadding: '0', 736 // arrows: true, 737 // }); 738 // 739 // $("#exponent-sponsor").slick({ 740 // dots: false, 741 // infinite: true, 742 // slidesToShow: 4, 743 // slidesToScroll: 1, 744 // // centerMode: true, 745 // // centerPadding: '0', 746 // arrows: true, 747 // }); 748 749 $("[data-id='#gold-sponsor']").click(function (e) { 750 if(!init_slick_gold) { 751 setTimeout(function () { 752 $("#gold-sponsor").slick({ 753 dots: false, 754 infinite: true, 755 slidesToShow: 4, 756 slidesToScroll: 1, 757 // centerMode: true, 758 // centerPadding: '0', 759 arrows: true, 760 }); 761 init_slick_gold = true; 762 }, 100); 763 } 764 }); 765 766 $("[data-id='#silver-sponsor']").click(function (e) { 767 if(!init_slick_silver) { 768 setTimeout(function () { 769 $("#silver-sponsor").slick({ 770 dots: false, 771 infinite: true, 772 slidesToShow: 4, 773 slidesToScroll: 1, 774 // centerMode: true, 775 // centerPadding: '0', 776 arrows: true, 777 }); 778 init_slick_silver = true; 779 }, 100) 780 } 781 }); 782 783 $("[data-id='#bronze-sponsor']").click(function (e) { 784 if(!init_slick_bronze) { 785 setTimeout(function () { 786 $("#bronze-sponsor").slick({ 787 dots: false, 788 infinite: true, 789 slidesToShow: 4, 790 slidesToScroll: 1, 791 // centerMode: true, 792 // centerPadding: '0', 793 arrows: true, 794 }); 795 init_slick_bronze = true; 796 }, 100); 797 } 798 });
799 800 $("[data-id='#sponsor-sponsor']").click(function (e) { 801 if(!init_slick_sponsor) { 802 setTimeout(function () { 803 $("#sponsor-sponsor").slick({ 804 dots: false, 805 infinite: true, 806 slidesToShow: 4, 807 slidesToScroll: 1, 808 // centerMode: true, 809 // centerPadding: '0', 810 arrows: true, 811 }); 812 init_slick_sponsor = true; 813 }, 100); 814 } 815 }); 816 817 $("[data-id='#exponent-sponsor']").click(function (e) { 818 if(!init_slick_exponent) { 819 setTimeout(function () { 820 $("#exponent-sponsor").slick({ 821 dots: false, 822 infinite: true, 823 slidesToShow: 4, 824 slidesToScroll: 1, 825 // centerMode: true, 826 // centerPadding: '0', 827 arrows: true, 828 }); 829 init_slick_exponent = true; 830 }, 100); 831 } 832 }); 833 834 835 $(".tabs a").click(function (e) { 836 e.preventDefault(); 837 $(".tabs a").removeClass('tab-active'); 838 $(this).addClass('tab-active'); 839 const dataId = $(this).attr('data-id'); 840 $('.sponsors-logo').css('display', 'none'); 841 $(dataId).fadeIn(300); 842 //$(dataId).css('opacity', 1); 843 }); 844 845 846 847 // $('#news .block-text').on('shown.bs.collapse', function (e) { 848 // var offset = $(this).parent('div').offset(); 849 // if(offset) { 850 // $('html,body').animate({ 851 // scrollTop: offset.top -50 852 // }, 200); 853 // } 854 // }); 855 856}); 857*/ 858 859$(document).ready(function(){ 860 // $('.owl-carousel').owlCarousel({ 861 // items: 3, 862 // margin: 20, 863 // nav: true, 864 // //navText : ["<i class='fa fa-chevron-left'></i>","<i class='fa fa-chevron-right'></i>"] 865 // }); 866 867 868 // полÑÑение знаÑÐµÐ½Ð¸Ñ Ð¿Ð°ÑамеÑÑа "news" из URL 869 var newsItem = getParameterByName('news'); 870 871 872 // $('.navbar-nav>li>a').on('click', function(){ 873 // $('.navbar-collapse').collapse('hide'); 874 // }); 875 876 $('.navbar-collapse').on('show.bs.collapse', function(){ 877 $('body').addClass('overflow-hidden'); 878 $('header').addClass('white'); 879 }); 880 881 $('.navbar-collapse').on('hidden.bs.collapse', function(){ 882 $('body').removeClass('overflow-hidden'); 883 $('header').removeClass('white'); 884 }); 885 886 $('.navbar-collapse').on('swiped', function(e) { 887 if (e.detail.dir === 'up') { 888 $('.navbar-collapse').collapse('hide'); 889 } 890 }); 891 892 if ($(window).width() < 768) { 893 $('#theses textarea').each(function() { 894 $(this).attr('rows', 10); 895 }) 896 } 897 898 899 900 // пÑовеÑка, еÑÑÑ Ð»Ð¸ паÑамеÑÑ 901 if (newsItem !== null) { 902 903 var element = document.getElementById("news"); 904 var rect = element.getBoundingClientRect(); 905 window.scrollTo({ 906 top: rect.top + window.pageYOffset, 907 behavior: 'smooth' 908 }); 909 910 911 // setTimeout(() => { 912 // $("#news").get(0).scrollIntoView({behavior: 'smooth'}); 913 // 914 // 915 // }, 5000) 916 917 //debugger; 918 $('#news-item-' + newsItem).modal('show'); 919 // оÑкÑÑÑие модалÑного окна 920 921 } 922 923 924}); 925 926 927// полÑÑение знаÑÐµÐ½Ð¸Ñ Ð¿Ð°ÑамеÑÑа из URL 928function getParameterByName(name, url) { 929 if (!url) url = window.location.href; 930 name = name.replace(/[\[\]]/g, '\\$&'); 931 var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), 932 results = regex.exec(url); 933 if (!results) return null; 934 if (!results[2]) return ''; 935 return decodeURIComponent(results[2].replace(/\+/g, ' ')); 936}
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.