1/** 2 * @file 3 * A JavaScript file for the theme. 4 * 5 * In order for this JavaScript to be loaded on pages, see the instructions in 6 * the README.txt next to this file. 7 */ 8 9// JavaScript should be made compatible with libraries other than jQuery by 10// wrapping it with an "anonymous closure". See: 11// - https://drupal.org/node/1446420 12// - http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth 13 14 15var redisign2026Inited = false; 16 17var replaceCompanyGroupPlaceholders = function(q1,q1){ return; }; 18var initPartners2026Page = function(){ return; }; 19 20(function ($, Drupal, window, document, undefined) { 21 22 23// To understand behaviors, see https://drupal.org/node/756722#behaviors 24Drupal.behaviors.my_custom_behavior = { 25 attach: function(context, settings) { 26 27 // Place your code here. 28 $('.wfm-add.btn-success').each(function(){$(this).removeClass('btn-success').addClass('btn-default')}); 29 $('.webform-submit.btn-default').each(function(){$(this).removeClass('btn-default').addClass('btn-success')}); 30 31 if($('.comnews-logo').length == 0) $('.m-footer li:nth-child(5)').append('<a href="https://www.comnews.ru" class="comnews-logo">ComNews</a>'); 32 33 $('.cc-access-log').each(function(){ 34 let id = $(this).attr('rel'); 35 setInterval(function(){jQuery.get('/log.php',{id:id}); console.log(id);},60000); 36 }); 37 38 39 40 41 setInterval("jQuery('.page-en .wfm-remove').each(function(){jQuery(this).text('Remove').css('display','inline-block');});",2000); 42 setInterval("jQuery('.cc-youtube').each(function(){jQuery(this).height(jQuery(this).width()/16*9);});",2000); 43 setInterval("jQuery('.cc-player').each(function(){jQuery(this).height(jQuery(this).width()/16*9);});",2000); 44 45 $('.toggle-m-menu').click(function(){$('.toggle-m-menu .menu').toggle();}); 46 $('footer').prepend($('.page-about .map')); 47 48 $('body').click(function(e){if(!$(e.target).hasClass('toggle-m-menu')){if($('.cc-menu.m-main').css('display')!= 'none') $('.cc-menu.m-main').toggle();} console.log(e);}) 49 50 $('.page-registration .form-actions .form-submit').click(function(){ yaCounter34410770.reachGoal('SEND_REG'); console.log('SEND_REG');}); 51 52 $('.view-banners .banner .title').each(function(){ 53 let str = $(this).text(); 54 str = str.replace(' ','</div><div class="d2">'); 55 str = str.replace(' ','</div><div class="d3">'); 56 $(this).html('<div class="d1">'+str+'</div>'); 57 }); 58 59 if(jQuery('.cc-conf-menu.desktop.v1').length > 0){ 60 61 setInterval(function(){ 62 //if (jQuery('.cc-conf-menu')[0].hasAttribute('aaa')){ 63 jQuery('.cc-conf-menu.desktop>li').width('auto'); 64 jQuery('.cc-conf-menu.desktop>li>a').css('opacity','0').css('padding','0px'); 65 //console.log('==================='); 66 var lenLI = 0; 67 for (var i = 0; i < jQuery('.cc-conf-menu.desktop>li').length; i++){ 68 lenLI = lenLI+jQuery(jQuery('.cc-conf-menu.desktop>li')[i]).width(); 69 //console.log('--'+i+'=='+jQuery(jQuery('.cc-conf-menu li')[i]).width()); 70 } 71 //console.log(lenLI); 72 var delta = jQuery('.cc-conf-menu.desktop').width()-lenLI-6; 73 //console.log(delta); 74 if( Math.abs(delta) >= jQuery('.cc-conf-menu.desktop>li').length - 1){ 75 delta = Math.floor(delta / (jQuery('.cc-conf-menu.desktop>li').length - 1)); 76 //console.log(delta); 77 78 var f = 0; 79 var lenLI = 0; 80 for (var i = 0; i < jQuery('.cc-conf-menu.desktop>li').length; i++){ 81 if (f) {jQuery(jQuery('.cc-conf-menu.desktop>li')[i]).width(jQuery(jQuery('.cc-conf-menu.desktop li')[i]).width()+delta);} 82 else {jQuery(jQuery('.cc-conf-menu.desktop>li')[i]).width(jQuery(jQuery('.cc-conf-menu.desktop li')[i]).width());} 83 f = 1; 84 lenLI = lenLI+jQuery(jQuery('.cc-conf-menu.desktop>li')[i]).width(); 85 //console.log('--'+i+'=='+jQuery(jQuery('.cc-conf-menu li')[i]).width()); 86 } 87 //console.log(lenLI); 88 } 89 jQuery('.cc-conf-menu.desktop>li>a').css('opacity','1'); 90 91 //} 92 },500); 93 94 95 } 96 97 98 if($('.cc-person-placeholder').length > 0){ 99 $('.cc-person-placeholder').each(function(){ 100 if($('.cc-persons-full .cc-person').length > 0){ 101 $(this).append($($('.cc-persons-full .cc-person')[0])); 102 $(this).parent().addClass('cc-persons-quote'); 103 } 104 }); 105 if($('.cc-persons-quote').length > 0){ 106 $('<div class="cc-persons-quotes"></div>').insertBefore($($('.cc-persons-quote')[0])); 107 $('.cc-persons-quotes').append($('.cc-persons-quote')); 108 } 109 110 } 111 112 if($('.cc-person-placeholder22').length > 0){ 113 $('.cc-person-placeholder22').each(function(){ 114 if($('.cc-persons-full .cc-person').length > 0){ 115 $(this).append($($('.cc-persons-full .cc-person')[0])); 116 } 117 }); 118 } 119 120 121 122 123 if ($('.page-imagecrop').length){ 124 125 $('html').css('background-color','transparent'); 126 $('.imagecrop-form-link a').addClass('btn btn-primary').css('color','#fff').css('margin-top','19px'); 127 $('#cancel-crop').hide(); 128 setTimeout(function(){ 129 if ($('#cancel-crop').text() != $('#cancel-crop').attr('title')) 130 $('#cancel-crop').addClass('btn btn-success').css('color','#fff').css('top','30px'); 131 else 132 $('#cancel-crop').addClass('btn btn-danger').css('color','#fff').css('top','30px'); 133 $('#cancel-crop').show(); 134 } , 1000); 135 $('#edit-submit').addClass('btn btn-primary').css('color','#fff').css('position','absolute').css('top','30px').css('right','160px'); 136 $('a.imagecrop-form-link').hide(); 137 $('#imagecrop-crop-settings-form input').css('width','100%'); 138 139 } 140 141 if ($('.navbar-header').width() != 0){ 142 $('#block-block-1').css('background-color','#fff'); 143 $('#block-block-1').insertBefore('footer.footer'); 144 } 145 146 if ($('.page-adm').length){ 147 $('.menu.nav.navbar-nav li a').each(function(){if($(this).text() == 'Drupal') $(this).attr('href','javascript:document.location.href=\''+$(this).attr('href')+'\';');}); 148 $('.views-field-status').each(function(){ if ($('div',this).text() == 'Ðе опÑбликовано') $('div',this).css('background-color','#FEE').css('padding','3px');}); 149 } 150 151 if ($('.page-adm-conferences').length){ 152 153 $('#lang').bind('change',function(){ var l = $(this).val(); $('.template').hide(); $('.template.'+l).show();}); 154 $('#copyConf').bind('click',function(){ 155 var l = $('#lang').val(); 156 var t = $('#conf_'+l).val(); 157 //console.log('l='+l+' t='+t); 158 jQuery.post('/create.php',{l:l, t:t},function(data){ 159 if (data >0){ 160 document.location.href = '/adm/conferences#overlay=node/'+data+'/edit%3Fdestination%3Dadm/conferences'; 161 } 162 163 }); 164 165 166 }); 167 168 169 } 170 171 $('.crop').each(function(){ 172 173 var len = parseInt($(this).attr('crop'),10); 174 if (!isNaN(len) && len > 0){ 175 var str = $(this).text(); 176 177 if ((str.length - len) > 10){ 178 len = Math.ceil(len / 2) ; 179 $(this).attr('title',str); 180 $(this).text(str.substring(0, len )+ ' ... ' + str.substring(str.length - len ) ); 181 } 182 } 183 }); 184 185 $('.gear').bind('mouseenter', function(){ 186 var p = $(this).parent(); 187 $('.gear-before',p).show(); 188 $('.gear-container .gear-before',p).hide(); 189 }); 190 $('.gear').bind('mouseleave', function(){ 191 var p = $(this).parent(); 192 $('.gear-before',p).hide(); 193 }); 194 195 196 if ($('.page-adm-statuses').length){ 197 198 199 $('#copyStatus').bind('click',function(){ 200 //var l = $('#lang').val(); 201 var ru = $('#ccStatus_ru').val(); 202 var en = $('#ccStatus_en').val(); 203 //console.log('l='+l+' t='+t); 204 jQuery.post('/create.php',{ru:ru, en:en, type : 'status'},function(data){ 205 if (data >0){ 206 document.location.href = '/adm/statuses'; 207 } else if (data == 0) alert('ÐÑибка! СÑаÑÑÑ Ð½Ðµ бÑл добавлен.'); else alert('Такой ÑÑаÑÑÑ Ñже еÑÑÑ!'); 208 209 }); 210 211 212 }); 213 214 215 } 216 217 218 219 //$('option').each( function(){if ($(this).text() == '- Any -') $(this).text('- ÐÑе -');}); 220 221 222 if ($('.page-adm-conferences .views-field-field-pages a').length){ 223 224 $('.page-adm-conferences .views-field-field-pages a').each(function(){ 225 var h = $(this).attr('href'); 226 $(this).attr('href',h+'/edit?destination=adm/conferences'); 227 }); 228 } 229 230 231 } 232}; 233 234$(function(){ 235 236 if($('#navbar .view-banners').length > 0 && $('#navbar .view-banners .view-content .banner').length == 0){ 237 $('#navbar').addClass('no-banners'); 238 239 } 240 241 $('form.webform-client-form').each(function(){ 242 let form = $(this); 243 let components = $('.webform-component',form); 244 245 let cb = $('<div class="form-item webform-component webform-component-checkboxes webform-component--politika-pd form-group form-item form-item-submitted-politika-pd form-type-checkboxes form-group"><div id="edit-submitted-politika-pd" class="form-checkboxes ppd"><div class="form-item form-item-submitted-politika-pd-даÑ-ÑоглаÑие-на-обÑабоÑкÑ-пеÑÑоналÑнÑÑ -даннÑÑ form-type-checkbox checkbox"> <label class="control-label" for="edit-submitted-politika-pd-1"><input required="required" class="ppd form-checkbox" type="checkbox" id="edit-submitted-politika-pd-1" name="submitted[politika_pd][ÐÐ°Ñ ÑоглаÑие на обÑабоÑÐºÑ Ð¿ÐµÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ ]" value="ÐÐ°Ñ ÑоглаÑие на обÑабоÑÐºÑ Ð¿ÐµÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ ">* ÐÐ°Ñ ÑоглаÑие ÐÐР«ÐомÐÑÑÑ ÐÑÑп» на обÑабоÑÐºÑ Ð¿ÐµÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ Ñ ÑелÑÑ Ð¿Ð¾Ð»ÑÑÐµÐ½Ð¸Ñ Ð¸Ð½ÑоÑмаÑионнÑÑ ÑообÑений. ÐеÑеÑÐµÐ½Ñ Ð¿ÐµÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ : ÑамилиÑ, имÑ, оÑÑеÑÑво; адÑÐµÑ ÑлекÑÑонной поÑÑÑ; Ð½Ð¾Ð¼ÐµÑ Ð¼Ð¾Ð±Ð¸Ð»Ñного ÑелеÑона; Ð½Ð¾Ð¼ÐµÑ ÑабоÑего ÑелеÑона; наименование компании; наименование должноÑÑи; инÑе ÑведениÑ, Ð½ÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ñе Ð´Ð»Ñ Ð´Ð¾ÑÑÐ¸Ð¶ÐµÐ½Ð¸Ñ Ñказанной Ñели обÑабоÑки. <a target="_blank" href="https://www.comnews-conferences.ru/sites/default/files/policy-of-processing-personal-data.pdf">ÐолиÑика обÑабоÑки пеÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ </a></label></div></div> <label class="control-label element-invisible" for="edit-submitted-politika-pd">ÐолиÑика ÐÐ <span class="form-required" title="ÐÑо поле обÑзаÑелÑно Ð´Ð»Ñ Ð·Ð°Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ.">*</span></label><div class="help-block"></div></div>'); 246 if($(components[components.length - 1]).hasClass('form-type-markup')) cb.insertBefore(components[components.length - 1]); else cb.insertAfter(components[components.length - 1]); 247 }); 248 /* 249 $('.ppd').each(function(){ 250 var str = $('label',this).html(); 251 $('label',this).html(str + ' ' + $('.help-block',$(this).parent()).html()); 252 $('.help-block',$(this).parent()).html(''); 253 }); 254 */ 255 256 //form edit link 257 if($('body.logged-in section.block-webform').length >0){ 258 let nid = $('body.logged-in section.block-webform').attr('id').split('-')[4]; 259 $('body.logged-in section.block-webform h2.block-title').html('<a href="/node/'+nid+'/webform" class="form-edit-link" target="_blank" title="РедакÑиÑоваÑÑ ÑоÑмÑ">'+$('body.logged-in section.block-webform h2.block-title').text()+'</a>'); 260 $('body.logged-in section.block-webform h2.block-title').css('display','block'); 261 } 262 263 if(jQuery('#h-menu .cc-conf-menu.v2').length > 0){ 264 $('#h-menu .mobile').prepend('<div id="ham"></div>'); 265 $('#h-menu #ham').on('click', function(){$(this).parent().toggleClass('opened');}) 266 $('#h-menu .mobile .cc-conf-menu.v2').prepend('<div id="close"></div>'); 267 $('#h-menu .cc-conf-menu.v2 #close').on('click', function(){$(this).parent().parent().toggleClass('opened');}) 268 269 $('#h-menu .cc-conf-menu.v2>li').each(function(){ 270 if($(this).attr('data-parent') != undefined) { 271 let parent = $('#'+$(this).attr('data-parent'),$(this).parent()); 272 if($('ul',parent).length == 0) { 273 parent.append('<ul></ul>'); 274 parent.addClass('dd'); 275 $('#'+$(this).attr('data-parent')+'>a',$(this).parent()).on('click',function(evt){(evt.preventDefault) ? evt.preventDefault() : evt.returnValue = false; }); 276 } 277 $('ul',parent).append($(this)); 278 } 279 }); 280 } 281 282 283 setInterval(function(){ 284 if($('#h-menu .desktop .cc-menu.v2 #menu-home').length && ($('#h-menu .desktop .cc-menu.v2>li:last-child').attr('id') != 'menu-home' || $('#h-menu .desktop .cc-menu.v2 #menu-home').css('display') == 'none')){ 285 $('#h-menu .desktop .cc-menu.v2').append($('#h-menu .desktop .cc-menu.v2 #menu-home')); 286 $('#h-menu .desktop .cc-menu.v2 #menu-home').show(); 287 } 288 },500); 289 setInterval(function(){ 290 if($('#h-menu .mobile .cc-menu.v2 #menu-home').length && ($('#h-menu .mobile .cc-menu.v2>li:last-child').attr('id') != 'menu-home' || $('#h-menu .mobile .cc-menu.v2 #menu-home').css('display') == 'none')){ 291 $('#h-menu .mobile .cc-menu.v2').append($('#h-menu .mobile .cc-menu.v2 #menu-home')); 292 $('#h-menu .mobile .cc-menu.v2 #menu-home').show(); 293 } 294 },500); 295 296 297 298 /** 299 * 2026 redesign 300 * 301 */ 302 /* desctop menu V3 */ 303 $('#h-menu .desktop .cc-menu.v2').each(function(){ 304 this.initV3 = function(){ 305 let menu = $(this); 306 let container = $(this).parent(); 307 container.prepend('<ul class="cc-conf-menu v3 cc-menu"></ul>'); 308 $('.v3',container).append($('#menu-logo',menu).clone()); 309 $('.v3',container).append('<li id="sm-conf-buttons" class="sm-conf-buttons"></li><li id="d-menu"><div class="hw"><div id="ham"></div></div><div id="close"></div><ul id="d-menu-content"></ul></li>'); 310 $('.v3 #d-menu-content',container).html(menu.html()); 311 $('.v3 #d-menu-content #menu-logo',container).remove(); 312 $('.v3 #d-menu #menu-home',container).appendTo('.v3 #d-menu ul',container); 313 $('#d-menu .hw').on('click', function(){$(this).parent().toggleClass('opened'); if($(this).parent().hasClass('opened')) $('html').css('overflow-y','hidden'); else $('html').css('overflow-y','auto'); }) 314 $('.desktop .cc-menu.v3 #d-menu-content>li.dd>a').on('click',function(evt){(evt.preventDefault) ? evt.preventDefault() : evt.returnValue = false; }); 315 let btns = ''; 316 $('.cc-conf-banner .sm-conf-buttons').each(function(){ console.log(this,$(this).css('display')); if($(this).css('display') !== 'none') btns += this.outerHTML;}); 317 $('.v3 #sm-conf-buttons',container).html(btns+$('.cc-conf-counter')[0].outerHTML); 318 } 319 320 321 }); 322 // partners with groups and stands for exhibition 2026 323 if(typeof partners2026 !== 'undefined' && partners2026){ 324 console.log('exhibitions2026'); 325 let html = ''; 326 let parent = null; 327 $('.cc-companies-full .cc-group').each(function(){ 328 let group = $(this); 329 if(group.hasClass('is-group')) { 330 parent = group; 331 } else{ 332 if(parent !== null){ 333 parent.append(group); 334 } 335 } 336 }); 337 let i = 1; 338 $('.cc-companies-full .is-group.is-exhibition').each(function(){ 339 340 let group = $(this); 341 let label = $('.cc-label-'+group.data('group')); 342 let labelHTML = ''; 343 if(label){ 344 labelHTML = label[0].outerHTML; 345 label.remove(); 346 } 347 let html = '<table class="stands"><thead><tr><td colspan="3">'+labelHTML+'</td></tr></thead><tbody>'; 348 $('.cc-group', this).each(function(){ 349 let stand = $('.cc-label',this); 350 let company = $('.cc-company',this); 351 $('.gear,.gear-before',stand).remove(); 352 stand = stand.text(); 353 console.log(stand); 354 let j = parseInt(stand.split('â')[1],10); 355 let str = stand.split('â')[0]; 356 let str1 = stand.split('â')[1]; 357 if(!isNaN(j)){ 358 console.log('j='+j+' i='+i); 359 if(j+'' == str1+''){ 360 if(i != j){ 361 362 for(let k = i; k < j; k++){ 363 364 html += '<tr class="available" data-stand="'+k+'" data-group="'+$(this).data('group')+'"><th>'+k+'</th><td colspan="2" class="cc-stand">'+str+' â'+k+'</td></tr>'; 365 i++; 366 } 367 if(company.length) html += '<tr class="sold" data-stand="'+str1+'" data-group="'+$(this).data('group')+'"><th>'+str1+'</th><td class="cc-stand">'+stand+'</td><td class="cc-company gear-container">'+$('.cc-company',this).html()+'</td></tr>'; 368 else html += '<tr class="available" data-stand="'+str1+'" data-group="'+$(this).data('group')+'"><th>'+str1+'</th><td colspan="2" class="cc-stand">'+str+' â'+str1+'</td></tr>'; 369 i++; 370 } else { 371 if(company.length) html += '<tr class="sold" data-stand="'+str1+'" data-group="'+$(this).data('group')+'"><th>'+str1+'</th><td class="cc-stand">'+s
371tand+'</td><td class="cc-company gear-container">'+$('.cc-company',this).html()+'</td></tr>'; 372 else html += '<tr class="available" data-stand="'+str1+'" data-group="'+$(this).data('group')+'"><th>'+str1+'</th><td colspan="2" class="cc-stand">'+str+' â'+str1+'</td></tr>'; 373 i++; 374 } 375 } else { 376 if(company.length) html += '<tr class="sold" data-stand="'+str1+'" data-group="'+$(this).data('group')+'"><th>'+str1+'</th><td class="cc-stand">'+stand+'</td><td class="cc-company gear-container">'+$('.cc-company',this).html()+'</td></tr>'; 377 else html += '<tr class="available" data-stand="'+str1+'" data-group="'+$(this).data('group')+'"><th>'+str1+'</th><td colspan="2" class="cc-stand">'+str+' â'+str1+'</td></tr>'; 378 } 379 } 380 381 382 }); 383 html += '</tbody></table>'; 384 group.html(html); 385 }); 386 387 //$('.cc-companies-full').html(html); 388 } 389 /* 390 * replace %company-group-XXX% 391 */ 392 replaceCompanyGroupPlaceholders = function(body,groups) { 393 console.log('replaceCompanyGroupPlaceholders2026'); 394 if (!body.length || !groups.length) return; 395 396 var groupHtml = {}; 397 398 groups.find('[data-group]').each(function () { 399 var groupId = $(this).attr('data-group'); 400 if (!groupId || groupHtml[groupId]) return; 401 groupHtml[groupId] = this.outerHTML; 402 }); 403 404 body.each(function () { 405 var html = $(this).html() || ''; 406 html = html.replace(/%cc-group-([a-zA-Z0-9_-]+)%/g, function (match, groupId) { 407 match = match.replace(/%/ig,''); 408 return '<div data-group="'+match+'"></div>'; 409 //return groupHtml[groupId] || match; 410 }); 411 $(this).html(html); 412 $('div[data-group]',this).each(function(){ 413 $(this).append($('.'+$(this).data('group'),groups)); 414 }); 415 }); 416 } 417 /** 418 * Initializes the redesign for the partners2026 419 */ 420 initPartners2026Page = function(){ 421 //let initID = setInterval(function(){ 422 // if ((typeof partners2026Inited !== 'undefined') && partners2026Inited){ clearInterval(initID);} else { return; } 423 replaceCompanyGroupPlaceholders($('.cc-pagetext .partners2026'),$('.cc-companies-full')); 424 425 if($('.partners2026').length){ 426 console.log('partners2026'); 427 $('.alert.alert-block').remove(); 428 let i = 2; 429 if($('.partners2026>blockquote:first-of-type>table').length > 0){ 430 $('body').append('<style>.partners2026>blockquote:nth-of-type(2) { order: 1;} .partners2026>blockquote:nth-of-type(3) { order: 2;} .partners2026>blockquote:nth-of-type(4) { order: 6;} .partners2026>blockquote:nth-of-type(5) { order: 3;} .partners2026>blockquote:nth-of-type(6) { order: 4;} .partners2026>blockquote:nth-of-type(7) { order: 5;}</style>'); 431 $('.partners2026>blockquote:first-of-type table td').each(function(){ 432 let j = i; 433 if($('.partners2026>blockquote:nth-of-type('+j+')').length){ 434 $(this).on('click', function(){ 435 if(!$(this).hasClass('hidden')){ 436 $('td.act').removeClass('act'); 437 $(this).addClass('act'); 438 //$('.partners2026>blockquote').removeClass('act'); 439 //$('.partners2026>blockquote:nth-of-type('+j+')').addClass('act'); 440 let dy = 190; 441 if($('body').width() == 750) dy = 250; 442 $([document.documentElement, document.body]).animate({scrollTop: $('.partners2026>blockquote:nth-of-type('+j+')').offset().top - dy }, 500); 443 } 444 }); 445 } else { 446 $(this).addClass('hidden'); 447 } 448 i++; 449 }); 450 // Создаем новÑй observer (наблÑдаÑелÑ) 451 let observer26 = new IntersectionObserver(function (entries, obs) { 452 let highlighted = false; 453 entries.forEach(function (entry) { 454 // ÐÑли ÑÐ»ÐµÐ¼ÐµÐ½Ñ Ð² зоне видимоÑÑи, Ñо ниÑего не пÑоиÑÑ Ð¾Ð´Ð¸Ñ 455 if (!entry.isIntersecting || highlighted) return; 456 // ÐÑклÑÑаем «наблÑдаÑелÑ» 457 //obs.unobserve(entry.target); 458 // ÐобавлÑем ÑекÑÑ 459 jQuery('.partners2026>blockquote:first-of-type table td').removeClass('act'); 460 let h = jQuery(entry.target).parent().data('header').split(','); 461 jQuery('.partners2026>blockquote:first-of-type table tr:nth-of-type('+h[0]+') td:nth-of-type('+h[1]+')').addClass('act'); 462 if( h[0] > 1 && h[1] > 1) jQuery('.partners2026>blockquote:first-of-type table tr:nth-of-type(1) td:nth-of-type(2)').addClass('act'); 463 highlighted = true; 464 }); 465 }); 466 jQuery('.partners2026>blockquote:nth-of-type(2)>*:first-child').each(function(){observer26.observe(this); $(this).parent().attr('data-header','1,1');}); 467 jQuery('.partners2026>blockquote:nth-of-type(3)>*:first-child').each(function(){observer26.observe(this); $(this).parent().attr('data-header','1,2');}); 468 jQuery('.partners2026>blockquote:nth-of-type(4)>*:first-child').each(function(){observer26.observe(this); $(this).parent().attr('data-header','2,1');}); 469 jQuery('.partners2026>blockquote:nth-of-type(5)>
469*:first-child').each(function(){observer26.observe(this); $(this).parent().attr('data-header','2,2');}); 470 jQuery('.partners2026>blockquote:nth-of-type(6)>*:first-child').each(function(){observer26.observe(this); $(this).parent().attr('data-header','2,3');}); 471 jQuery('.partners2026>blockquote:nth-of-type(7)>*:first-child').each(function(){observer26.observe(this); $(this).parent().attr('data-header','2,4');}); 472 473 474 } else if($('.partners2026>blockquote:first-of-type>ul').length > 0){ 475 $('body').append('<style>.partners2026>blockquote:nth-of-type(2) { order: 1;} .partners2026>blockquote:nth-of-type(3) { order: 100;} .partners2026>blockquote:nth-of-type(4) { order: 2;} .partners2026>blockquote:nth-of-type(5) { order: 3;} .partners2026>blockquote:nth-of-type(6) { order: 4;} .partners2026>blockquote:nth-of-type(7) { order: 5;}</style>'); 476 $('.partners2026>blockquote:first-of-type>ul>li').each(function(){ 477 let j = i; 478 if($(this).hasClass('separator')) return; 479 if($('.partners2026>blockquote:nth-of-type('+j+')').length){ 480 $(this).on('click', function(){ 481 if(!$(this).hasClass('hidden')){ 482 $('.partners2026>blockquote:first-of-type>ul>li.act').removeClass('act'); 483 //$(this).addClass('act'); 484 //$('.partners2026>blockquote').removeClass('act'); 485 //$('.partners2026>blockquote:nth-of-type('+j+')').addClass('act'); 486 let dy = 190; 487 if($('body').width() == 750) dy = 250; 488 $([document.documentElement, document.body]).animate({scrollTop: $('.partners2026>blockquote:nth-of-type('+j+')').offset().top - dy }, 500); 489 } 490 }); 491 } else { 492 $(this).addClass('hidden'); 493 } 494 i++; 495 }); 496 $('.partners2026>blockquote:first-of-type>ul>li>em').each(function(){ $(this).parent().addClass('exhibition'); }); 497 $('<li class="separator"></li>').insertBefore($('.partners2026>blockquote:first-of-type>ul>li.exhibition')); 498 499 // Создаем новÑй observer (наблÑдаÑелÑ) 500 let observer26 = new IntersectionObserver(function (entries, obs) { 501 let highlighted = false; 502 entries.forEach(function (entry) { 503 // ÐÑли ÑÐ»ÐµÐ¼ÐµÐ½Ñ Ð² зоне видимоÑÑи, Ñо ниÑего не пÑоиÑÑ Ð¾Ð´Ð¸Ñ 504 if (!entry.isIntersecting || highlighted) return; 505 // ÐÑклÑÑаем «наблÑдаÑелÑ» 506 //obs.unobserve(entry.target); 507 // ÐобавлÑем ÑекÑÑ 508 jQuery('.partners2026>blockquote:first-of-type>ul>li').removeClass('act'); 509 let h = jQuery(entry.target).parent().data('header').split(','); 510 jQuery('.partners2026>blockquote:first-of-type>ul>li:nth-of-type('+h[0]+')').addClass('act'); 511 if( h[0] != h[1]) jQuery('.partners2026>blockquote:first-of-type>ul>li:nth-of-type('+h[1]+')').addClass('act'); 512 highlighted = true; 513 }); 514 }); 515 jQuery('.partners2026>blockquote:nth-of-type(2)>*:first-child').each(function(){observer26.observe(this); $(this).parent().attr('data-header','1,1');}); 516 jQuery('.partners2026>blockquote:nth-of-type(3)>*:first-child').each(function(){observer26.observe(this); $(this).parent().attr('data-header','2,2');}); 517 jQuery('.partners2026>blockquote:nth-of-type(4)>*:first-child').each(function(){observer26.observe(this); $(this).parent().attr('data-header','4,4');}); 518 jQuery('.partners2026>blockquote:nth-of-type(5)>*:first-child').each(function(){observer26.observe(this); $(this).parent().attr('data-header','4,5');}); 519 jQuery('.partners2026>blockquote:nth-of-type(6)>*:first-child').each(function(){observer26.observe(this); $(this).parent().attr('data-header','4,6');}); 520 jQuery('.partners2026>blockquote:nth-of-type(7)>*:first-child').each(function(){observer26.observe(this); $(this).parent().attr('data-header','4,7');}); 521 522 } 523 /* 524 $('.partners2026>blockquote:first-of-type table tr:nth-child(1) td:nth-child(2)').on('click',function(){ 525 if(!$('.partners2026>blockquote:first-of-type table tr:nth-child(2) td:nth-child(2)').hasClass('hidden')){ 526 $('.partners2026>blockquote:first-of-type table tr:nth-child(2) td:nth-child(2)').addClass('act'); 527 $('.partners2026L>blockquote').removeClass('act'); 528 //$('.partners2026>blockquote:nth-of-type(3)').addClass('act'); 529 //$('.partners2026>blockquote:nth-of-type(5)').addClass('act'); 530 //$([document.documentElement, document.body]).animate({scrollTop: $('.partners2026>blockquote:nth-of-type(5)').offset().top - 100 }, 500); 531 } 532 }); 533 $('.partners2026>blockquote:first-of-type table tr:nth-child(2) td:nth-child(2),.partners2026>blockquote:first-of-type table tr:nth-child(2) td:nth-child(3),.partners2026>blockquote:first-of-type table tr:nth-child(2) td:nth-child(4)').on('click',function(){ 534 if(!$(this).hasClass('hidden')){ 535 $('.partners2026>blockquote:first-of-type table tr:nth-child(1) td:nth-child(2)').addClass('act'); 536 //$('.partners2026>blockquote:nth-of-type(3)').addClass('act'); 537 } 538 }); 539 */ 540 //$('.partners2026>blockquote:first-of-type table tr:nth-child(1) td:nth-child(1)').addClass('act'); 541 let animatedHeader26 = (function() { 542 543 let docElem = document.documentElement; 544 let header = null; 545 if($('.partners2026>blockquote:first-of-type>table').length > 0) { 546 header = $('.partners2026>blockquote:first-of-type>table'); 547 let didScroll = false;
548 549 function init26() { 550 window.addEventListener( 'scroll', function( event ) { 551 if( !didScroll ) { 552 didScroll = true; 553 setTimeout( scrollPage26, 50 ); 554 } 555 }, false ); 556 } 557 558 function scrollPage26() { 559 let changeHeaderOn = $('.partners2026>blockquote:first-of-type').offset().top; 560 let dy = 220; 561 if($('body').width() == 750) dy = 150; 562 if ( scrollY26() >= changeHeaderOn - dy ) {header.addClass('sticky' );} else { header.removeClass('sticky');} 563 didScroll = false; 564 } 565 function scrollY26() {return window.pageYOffset || docElem.scrollTop;} 566 init26(); 567 } 568 if($('.partners2026>blockquote:first-of-type>ul').length > 0) { 569 header = $('.partners2026>blockquote:first-of-type>ul'); 570 let didScroll = false; 571 572 function init26() { 573 window.addEventListener( 'scroll', function( event ) { 574 if( !didScroll ) { 575 didScroll = true; 576 setTimeout( scrollPage26, 50 ); 577 } 578 }, false ); 579 } 580 581 function scrollPage26() { 582 let changeHeaderOn = $('.partners2026>blockquote:first-of-type').offset().top; 583 let dy = 220; 584 if($('body').width() == 750) dy = 150; 585 if ( scrollY26() >= changeHeaderOn - dy ) {header.addClass('sticky' );} else { header.removeClass('sticky');} 586 didScroll = false; 587 } 588 function scrollY26() {return window.pageYOffset || docElem.scrollTop;} 589 init26(); 590 } 591 592 593 594 595 })(); 596 597 let f26_openModal = function(txt){ 598 $('body').css('overflow','hidden'); 599 $('body').append('<div id="modal-bg"></div><div id="modal-container" class="p26"><div id="modal-close">Ã</div><div id="modal-body">' 600 + txt 601 +'</div></div></div>'); 602 $('#modal-close, #modal-bg').on('click',function(){ $('#modal-bg, #modal-container').remove(); $('body').css('overflow','auto');}); 603 } 604 $('.cc-group div.cc-company').on('click', function(e){ 605 e.preventDefault(); 606 f26_openModal($('.cc-descr',this).html()); 607 $('.cc-clogo', this).clone().insertBefore('#modal-body .cc-title'); 608 609 }); 610 611 612 613 } 614 615 616 //},500); 617 618 } 619 620 redisign2026Inited = true; 621 622 /**************************************************************/ 623 //stands for exhibition old 624 if($('.cc-companies-full .cc-label-101188').length && (typeof partners2026 === 'undefined')){ 625 let i = 1; 626 let html = '<table class="stands">'; 627 $('.cc-companies-full .cc-group').each(function(){ 628 let stand = $('.cc-label',this); 629 let company = $('.cc-company',this); 630 $('.gear,.gear-before',stand).remove(); 631 stand = stand.text(); 632 console.log(stand); 633 let j = parseInt(stand.split('â')[1],10); 634 let str = stand.split('â')[0]; 635 let str1 = stand.split('â')[1]; 636 if(!isNaN(j)){ 637 console.log('j='+j+' i='+i); 638 if(j+'' == str1+''){ 639 if(i != j){ 640 641 for(let k = i; k < j; k++){ 642 643 html += '<tr><td colspan="2" class="cc-stand">'+str+' â'+k+'</td></tr>'; 644 i++; 645 } 646 if(company.length) html += '<tr><td class="cc-stand">'+stand+'</td><td class="cc-company gear-container">'+$('.cc-company',this).html()+'</td></tr>'; 647 else html += '<tr><td colspan="2" class="cc-stand">'+str+' â'+str1+'</td></tr>'; 648 i++; 649 } else { 650 if(company.length) html += '<tr><td class="cc-stand">'+stand+'</td><td class="cc-company gear-container">'+$('.cc-company',this).html()+'</td></tr>'; 651 else html += '<tr><td colspan="2" class="cc-stand">'+str+' â'+str1+'</td></tr>'; 652 i++; 653 } 654 } else { 655 if(company.length) html += '<tr><td class="cc-stand">'+stand+'</td><td class="cc-company gear-container">'+$('.cc-company',this).html()+'</td></tr>'; 656 else html += '<tr><td colspan="2" class="cc-stand">'+str+' â'+str1+'</td></tr>'; 657 } 658 } 659 660 661 }); 662 html += '</table>'; 663 $('.cc-companies-full').html(html); 664 665 666 } 667 let f_openModal = function(txt){ 668 $('body').css('overflow','hidden'); 669 $('body').append('<div id="modal-bg"></div><div id="modal-container"><div id="modal-close">Ã</div><div id="modal-body">' 670 + txt 671 +'</div></div></div>');
672 $('#modal-close, #modal-bg').on('click',function(){ $('#modal-bg, #modal-container').remove(); $('body').css('overflow','auto');}); 673 } 674 $('.stands .cc-clogo').on('click', function(e){ 675 e.preventDefault(); 676 f_openModal($('.cc-descr',$(this).parent()).html()); 677 $(this).clone().insertBefore('#modal-body .cc-title'); 678 679 }); 680 $('.stands .cc-title').on('click', function(e){ 681 e.preventDefault(); 682 f_openModal($(this).parent().html()); 683 $('.cc-clogo',$(this).parent().parent()).clone().insertBefore('#modal-body .cc-title'); 684 685 }); 686 //=============== 687 688 689 690 if(!$('input[name="submitted[website]"]').length){ 691 $('form.webform-client-form>div').append('<div class="form-item webform-component webform-component-hidden webform-component--website form-item form-item-submitted-website form-type-hidden" style="display: none"><input type="hidden" name="submitted[website]" value="comnews-conferences.ru"></div>'); 692 $('.webform-client-form .form-actions button.webform-submit').on('click',function(){ $('input[name="submitted[website]"]').val('comconf.ru');}); 693 $('form.webform-client-form').on('submit',function(){ $('input[name="submitted[website]"]').val('comconf.ru');}); 694 } 695 696 697 if($('.cc-main-title em').length){ 698 //$('.cc-all').removeClass('act'); 699 //$('.cc-categories').addClass('act'); 700 $('.cc-main-title em').on('click',function(){ 701 $('.cc-main-title em').removeClass('act'); 702 $(this).addClass('act'); 703 $('.cc-categories, .cc-all').removeClass('act'); 704 if($(this).text() == 'вÑе'|| $(this).text() == 'all') $('.cc-all').addClass('act'); else $('.cc-categories').addClass('act'); 705 }) 706 } 707 708 709 710 if($('table.exhibition').length){ 711 $('body').append('<script src="https://www.youtube.com/iframe_api"></script>'); 712 $('table.exhibition .link, table.exhibition .pdf, table.exhibition .page').each(function(){ 713 714 let parent = $(this); 715 let link = $($('a',parent)[0]).attr('href'); 716 $('tr:nth-child(1) img',$(this).parent().parent().parent()).on('click',function(){ 717 if(parent.hasClass('page')){ 718 window.open(link,'_self'); 719 } else { 720 window.open(link,'_blank'); 721 } 722 }); 723 }); 724 $('table.exhibition .youtube').each(function(){ 725 let parent = $(this); 726 727 $('tr:nth-child(1) img',$(this).parent().parent().parent()).on('click',function(){ 728 if($('#youtube').length == 0){ 729 $('body').append('<div id="ytbg"></div><div id="youtube"><div id="player"></div></div>'); 730 $('#ytbg').on('click',function(){ $('#youtube, #ytbg').remove();}); 731 let id = $('.cc-yt-container',parent).attr('rel'); 732 let player; 733 player = new YT.Player('player', { 734 height: '540', 735 width: '960', 736 videoId: id, 737 events: { 738 'onReady': function(event) { 739 $('#youtube #player').css('width','100%') 740 event.target.playVideo(); 741 } 742 }}); 743 744 } 745 746 }); 747 }); 748 $('table.exhibition .text').each(function(){ 749 let parent = $(this); 750 751 $('tr:nth-child(1) img',$(this).parent().parent().parent()).on('click',function(){ 752 if($('#exh-window').length == 0){ 753 $('body').append('<div id="exh-bg"></div><div id="exh-window"></div>'); 754 755 $('#exh-window').html(parent.html()); 756 $('#exh-window').prepend('<div id="close">[закÑÑÑÑ]</div>'); 757 $('#exh-bg,#close').on('click',function(){ $('#exh-window, #exh-bg').remove();}); 758 } 759 760 }); 761 }); 762 } 763 764 $('input.email').addClass('form-control'); 765 766 /* 767 if($('.view-banners .view-content').length){ 768 var h = 0; 769 $('.view-banners .view-content .views-row').each(function(){ if($(this).height() > h) h = $(this).height()}); 770 $('.view-banners .view-content').height(h); 771 $('.view-banners .view-content .views-row-1').addClass('active'); 772 $('.view-banners .view-content .views-row').addClass('item'); 773 $('.view-banners .view-content').carousel({ 774 interval: 3000 775 }) 776 } 777 */ 778 779 $('.page-adm-sendlists .view-display-id-page_7 .dropdown').each(function(){ 780 var obj = $(this); 781 var color = ''; 782 if (obj.hasClass('s0')) color = '#FCC'; 783 if (obj.hasClass('s1')) color = '#6CF'; 784 if (obj.hasClass('s2')) color = '#9FC'; 785 if (obj.hasClass('s3')) color = '#FF9'; 786 if (obj.hasClass('s4')) color = ''; 787 if (color != '') $('td',$(this).parent().parent()).css('background-color',color); 788 }); 789 790 $('.page-adm a.button').addClass('btn btn-default'); 791
792 $('.page-adm a.button').parent().append('<a class="btn btn-default btn-filter">ФилÑÑÑ</a>'); 793 $('.page-adm a.btn-filter').click(function(){ 794 var h = $('.page-adm .view-filters').css('display'); 795 if (h == 'none'){ 796 var hh = $('.page-adm .view-filters').height(); 797 $('.page-adm .view-filters').height(0); 798 $('.page-adm .view-filters').show(); 799 $('.page-adm .view-filters').animate({ height:hh}); 800 } else { 801 $('.page-adm .view-filters').animate({ height:'0'},function(){$('.page-adm .view-filters').hide(); $('.page-adm .view-filters').height('auto'); }); 802 } 803 }); 804 805 806 //if( !/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) { 807 808 $('a[href^="https://www.youtube.com"],a[href^="http://www.youtube.com"],a[href^="https://youtube.com"],a[href^="http://youtube.com"],a[href^="http://youtu.be"],a[href^="https://youtu.be"]').each(function(){ 809 810 var obj = $(this); 811 if (obj.attr('href').split('/')[3] != 'channel'){ 812 obj.attr('rel',obj.attr('href')); 813 814 var title = obj.attr('title'); 815 816 var id = obj.attr('rel'); 817 let t = ''; 818 if (id.split('?').length > 1){ 819 id = id.split('?')[1]; 820 var ids = id.split('&'); 821 for (var i in ids){ var n = ids[i].split('='); if (n[0] == 'v') {id = n[1];} if (n[0] == 't') {t = '?start='+n[1];} } 822 } else { 823 id = id.split('/')[3]; 824 } 825 id = id + t; 826 //obj.attr('href','javascript:void(0);'); 827 //obj.css('display', 'block'); 828 //obj.css('margin','0px auto'); 829 //obj.css('width','98%'); 830 831 obj.parent().html('<div class="cc-yt-container" rel="'+id+'"><iframe class="cc-youtube" width="98%" height="'+340+'" src="//www.youtube.com/embed/'+id+'" frameborder="0" allowfullscreen></iframe></div>'); 832 833 } 834 }); 835 836 $('a[href^="https://www.rutube.ru"],a[href^="http://www.rutube.ru"],a[href^="https://rutube.ru"],a[href^="http://rutube.ru"]').each(function(){ 837 838 var obj = $(this); 839 if (obj.attr('href').split('/')[3] == 'video' && obj.attr('href').indexOf('noplayer') == -1){ 840 let title = obj.attr('title'); 841 let id = obj.attr('href').split('/')[4]; 842 /* 843 let params = obj.attr('href').split('?')[1]; 844 let p = ''; 845 if(params != undefined) { 846 params = params.split('&'); 847 params.forEach(element => { 848 let pr = element.split('='); 849 if(pr[0] == 'p') p = 'p='+pr[1]+'&'; 850 }); 851 } 852 */ 853 if(id == 'private') id = obj.attr('href').split('/')[5]; 854 obj.parent().html('<div class="cc-yt-container" rel="'+id+'"><iframe class="cc-youtube" width="98%" height="410" src="https://rutube.ru/play/embed/'+id+'" frameborder="0" allow="clipboard-write" webkitAllowFullScreen mozallowfullscreen allowfullscreen></iframe></div>'); 855 856 } 857 }); 858 //} 859 860 861 }); 862 863 864})(jQuery, Drupal, this, this.document); 865 866/**/ 867jQuery(function(){ 868 jQuery('.cc-companies-short.cc-footer').each(function(){ 869 if(jQuery('.cc-logo',this).length > 7){ 870 jQuery('.cc-list',this).slick({ 871 infinite: true, 872 arrows: true, 873 slidesToShow: 6, 874 slidesToScroll: 6, 875 autoplay: true, 876 autoplaySpeed: 2000, 877 responsive: [ 878 { 879 breakpoint: 1199, 880 settings: { 881 slidesToShow: 4, 882 slidesToScroll: 4 883 } 884 }, 885 { 886 breakpoint: 900, 887 settings: { 888 slidesToShow: 3, 889 slidesToScroll: 3 890 } 891 }, 892 { 893 breakpoint: 700, 894 settings: { 895 slidesToShow: 2, 896 slidesToScroll: 2 897 } 898 }, 899 { 900 breakpoint: 400, 901 settings: { 902 slidesToShow: 1, 903 slidesToScroll: 1 904 } 905 } 906 // You can unslick at a given breakpoint now by adding: 907 // settings: "unslick" 908 // instead of a settings object 909 ] 910 }); 911 912 913 } 914 }); 915}); 916 917/**/ 918function __dumpToggle(){ 919 920 var id = jQuery(this).attr('id').split('\_')[2]; 921 var cell = jQuery('#dump_v_'+id); 922 if (cell.css('display') == 'none') { 923 cell.css('display','block'); 924 cell.css('min-height',jQuery(this).height()); 925 } else { 926 cell.css('display','none'); 927 cell.css('min-height',jQuery(this).height()); 928 } 929 930} 931 932 933function showVideo(){ 934 jQuery('#st-modal').show(); 935 jQuery('#st-modal-container').show(); 936 937 var obj = jQuery('#st-modal-inside'); 938 var id = jQuery(this).attr('rel'); 939 let t = ''; 940 if (id.split('?').length > 1){ 941 id = id.split('?')[1]; 942 var ids = id.split('&'); 943 for (var i in ids){ var n = ids[i].split('='); if (n[0] == 'v') {id = n[1];} if(n[0] == 't') { t = '?t='+n[1];}} 944 } else { 945 id = id.split('/')[3]; 946 } 947 id = id + t; 948 var w = obj.width(); 949 var h = obj.height(); 950 obj.html('<iframe width="'+w+'" height="'+h+'" src="//www.youtube.com/embed/'+id+'" frameborder="0" allowfullscreen></iframe>'); 951 jQuery('body').css('overflow','hidden'); 952 953 954} 955 956 957var cbpAnimatedHeader = (function() { 958 959 var docElem = document.documentElement, 960 header = document.querySelector( '#navbar' ), 961 didScroll = false, 962 changeHeaderOn = 500; 963 964
965 function init() { 966 window.addEventListener( 'scroll', function( event ) { 967 if( !didScroll ) { 968 didScroll = true; 969 setTimeout( scrollPage, 50 ); 970 } 971 }, false ); 972 } 973 974 function scrollPage() { 975 var sy = scrollY(); 976 changeHeaderOn = jQuery('#navbar').height() - jQuery('#admin-menu').height() - jQuery('#navbar .navbar-collapse').height() - jQuery('.cc-top-navbar').height(); 977 console.log(changeHeaderOn); 978 if ( sy >= changeHeaderOn ) { 979 jQuery('#navbar').addClass('sticky' ); 980 var mTop = jQuery('#admin-menu').height() + jQuery('.cc-top-navbar').height(); 981 jQuery('#navbar .navbar-collapse').css('top', mTop + 'px'); 982 } 983 else { 984 jQuery('#navbar').removeClass('sticky'); 985 } 986 didScroll = false; 987 } 988 989 function scrollY() { 990 return window.pageYOffset || docElem.scrollTop; 991 } 992 993 init(); 994 995})(); 996 997function getQueryParam(name) { 998 var query = window.location.search.substring(1); 999 var vars = query.split("&"); 1000 1001 for (var i = 0; i < vars.length; i++) { 1002 var pair = vars[i].split("="); 1003 if (decodeURIComponent(pair[0]) === name) { 1004 return decodeURIComponent(pair[1] || ""); 1005 } 1006 } 1007 return null; 1008} 1009 1010function scrollToParam() { 1011 var s = getQueryParam("scroll"); 1012 console.log("scroll to: " + s,jQuery('#'+s)); 1013 if (s === null) return; 1014 jQuery([document.documentElement, document.body]).animate({scrollTop: jQuery('#'+s).offset().top - 200}, 400); 1015} 1016 1017 1018
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.