1var simpleTreeCollection; 2var itemTabNumber = 1; 3var popupIdForm = 0; 4function DisplayOrder (ord){ 5od1=document.getElementById('order1'); 6od2=document.getElementById('order2'); 7od3=document.getElementById('order3'); 8if (ord=='order1') od1.style.display='block'; 9 else od1.style.display='none'; 10if (ord=='order2') od2.style.display='block'; 11 else od2.style.display='none'; 12if (ord=='order3') od3.style.display='block'; 13 else od3.style.display='none'; 14} 15 16function ShowMainPage(id){ 17 jQuery("div.conteiner").hide(); 18 jQuery(".menu_lefttop a").removeClass('podsvet'); 19 jQuery(".menu_lefttop a#mm"+id).toggleClass('podsvet'); 20 jQuery("h1.left").removeClass('podsvet'); 21 jQuery("h1#mm"+id).toggleClass('podsvet'); 22 jQuery("#mi"+id).show(); 23} 24 25var onloadCallback = function() { 26 try { 27 document.querySelectorAll('.g-recaptcha').forEach((elem) => { 28 grecaptcha.ready(function () { 29 grecaptcha.execute('6Lc-84gpAAAAAECnT9Agi-6iz9wbOE65-3SdXRwp', { action: 'contact' }).then(function (token) { 30 elem.value = token; 31 }); 32 }); 33 }); 34 } catch(event) { 35 // ... 36 } 37}; 38 39jQuery(document).ready(function(){ 40 onloadCallback(); 41 /*var lastScrollTop = 0; 42 if($('.header:not(.menu_fixed)').length) { 43 var elemTopMenu = $('.header:not(.menu_fixed)').outerHeight(); 44 $(window).scroll(function(event){ 45 var st = $(this).scrollTop(); 46 if($(window).scrollTop() >= elemTopMenu && st < lastScrollTop) { 47 48 if(!$('div').is('.menu_fixed')) $('.header').addClass('menu_fixed'); 49 } else { 50 $('.header').removeClass('menu_fixed'); 51 } 52 lastScrollTop = st; 53 }); 54 55 }*/ 56 $(window).scroll(function(){ 57 if($(this).scrollTop()>250){ 58 $('.header').addClass('menu_fixed'); 59 $('.hidblock').addClass('hidblock-open'); 60 } 61 else if($(this).scrollTop()<250){ 62 $('.header').removeClass('menu_fixed'); 63 $('.hidblock').removeClass('hidblock-open'); 64 } 65 }); 66 67 $.ajaxSetup({ 68 beforeSend: function(jqXHR, settings) { 69 if(settings.url.indexOf('winlight') !== -1) { 70 setTimeout(function() { 71 onloadCallback(); 72 }, 1000); 73 } 74 } 75 }); 76 let width = $(window).width(); 77 window.addEventListener('resize', () => { 78 let prevWidth = width; 79 width = $(window).width(); 80 if (!(prevWidth < 1231 && width < 1231 )) { 81 let mode = (width >= 1231) ? "block" : "none"; 82 $('#menu_blok').css({ 83 'display': mode 84 }); 85 } 86 positionHeading(); 87 }); 88 89 /*&& ($('.header').hasClass('menu_fixed'))*/ 90 91// Ðобавление ÑÐ°Ð·Ð´ÐµÐ»Ñ Ð²Ñделение 92 93let targetSpan = document.querySelectorAll('span.second_levela') 94targetSpan.forEach(elem => elem.parentNode.parentNode.parentNode.classList.add('category-current')) 95 96// Ðобавление ÑÐ°Ð·Ð´ÐµÐ»Ñ Ð²Ñделение ÐÐÐÐЦ 97 98 99 let fixmeTop = $('#menu_blok').offset().top; 100 $(window).scroll(() => positionHeading()); 101 function positionHeading(){ 102 if (width < 1231) return; 103 let currentScroll = $(window).scrollTop(); 104 if (currentScroll > 158) { 105 $('#menu_blok').css({ 106 'top': '0', 107 'z-index': '9999', 108 'position': 'fixed' 109 }); 110 } else { 111 $('#menu_blok').css({ 112 'position': 'static' 113 }); 114 } 115 } 116 function userVerification(modForm) { 117 var parentElement = modForm.closest('form'); 118 $.post('/index.php', {mod: (modForm.value == 'order') ? 'sale' : modForm.value, type:'AJAX', s: modForm.value, userVerific: '1'}, function(data) { 119 if(parentElement.querySelector('input[name="moduleName"]')) { 120 parentElement.querySelector('input[name="moduleName"]').value = data.replace(/\r?\n/g, ""); 121 } 122 }); 123 124 } 125 126 function formSearch() { 127 var formParamS = $('form input[name="s"]'); 128 for(var i = 0; i < formParamS.length; i++) { 129 if(formParamS[i].closest('form').querySelector('input[name="moduleName"]') !== null) { 130 switch(formParamS[i].value) { 131 case 'sendSmeta': 132 userVerification(formParamS[i]); 133 break; 134 case 'order': 135 userVerification(formParamS[i]); 136 break; 137 } 138 } 139 } 140 } 141 142 $( document ).ajaxComplete(function(event, xhr, options, data) { 143 if(options.url.indexOf("/winlight/order/?fancybox=true") !== -1) { 144 formSearch(); 145 } 146 }); 147 148 formSearch(); 149 /*var formParamS = $('form input[name="s"]'); 150 for(var i = 0; i < formParamS.length; i++) { 151 if(formParamS[i].closest('form').querySelector('input[name="moduleName"]') !== null) { 152 switch(formParamS[i].value) { 153 case 'sendSmeta': 154 userVerification(formParamS[i]); 155 break; 156 case 'order': 157 userVerification(formParamS[i]); 158 break; 159 } 160 } 161 }*/ 162 163 $('.tab_services > .tab_services').on('click', function() { 164 var attrElem = $(this).attr('tab-number'); 165 if($('[tab-number-table="' + attrElem + '"].drop-down-block').hasClass('open')) { 166 $('.drop-down-block-button').html('СвеÑнÑÑÑ');
167 var strTableNameBut = 'ÐеÑейÑи к ÑледÑÑÑÐµÐ¼Ñ ÑÑÐ°Ð¿Ñ ->'; 168 if(itemTabNumber == 4) strTableNameBut = 'ÐÑоÑмиÑÑ Ð·Ð°ÐºÐ°Ð·'; 169 if(!$('p').is('.next-block-button')) $('<p class="next-block-button">' + strTableNameBut + '</p>').insertBefore($('.drop-down-block-button')); 170 } else { 171 $('.next-block-button').remove(); 172 $('.drop-down-block-button').html('РазвеÑнÑÑÑ'); 173 } 174 $('.tab_services').removeClass('open-tab-table'); 175 $('.drop-down-block').removeClass('open-tab-table'); 176 $(this).addClass('open-tab-table'); 177 $('[tab-number-table=' + attrElem + ']').addClass('open-tab-table'); 178 return itemTabNumber = attrElem; 179 }); 180 181 if($('a').is(".ldc_item.ldc_result a.anchor")) { 182 $(".ldc_item.ldc_result a.anchor").on("click", function (event) { 183 event.preventDefault(); 184 var id = $(this).attr('href'), 185 top = $(id).offset().top; 186 if($(window).scrollTop()+10 < top) $('body,html').animate({scrollTop: top}, 1500); 187 }); 188 } 189 190 $('.orangk').on('click', function(e) { 191 if($('textarea[name=Field1]').val().match(/((([A-Za-z]{3,9}):\/\/)*?([-;:&=\+\$,\w]+@{1})?(([-A-Za-z0-9]+\.)+[A-Za-z]{2,3})(:\d+)?((\/[-\+~%\/\.\w]+)?\/?([&?][-\+=&;%@\.\w]+)?(#[\w]+)?)?)/igm)) { 192 e.preventDefault(); 193 $('.zakaz_remonta').append('<p style="color:red;clear:both;text-align:center;margin:18px 0;padding:1em;">Рполе пÑиÑÑÑÑÑвÑÑÑ Ð½ÐµÐ´Ð¾Ð¿ÑÑÑимÑе ÑимволÑ.</p>'); 194 } 195 }); 196 197 198 $('.content div > table').each(function() { 199 $(this).wrap('<div class="tableScroll c_size"></div>'); 200 }); 201 202 $("form.vstrechaForm").on('submit', function(e) { 203 e.preventDefault(); 204 $.post('/index.php', $(this).formSerialize(), function(data) { 205 $('.result').remove(); 206 if(data.indexOf('код') !== -1) { 207 $('.submit.zelenk').after('<span class="result">' + data + '</span>'); 208 } else { 209 $("form.vstrechaForm input[type='submit']").after('<span class="result">' + data + '</span>'); 210 //$("form.vstrechaForm input[type='submit']").replaceWith('<span class="result">' + data + '</span>'); 211 } 212 213 }); 214 }); 215 216 /*$(' #menu_blok > ul > li').on('click', function(e) { 217 if ($(document).width() <= 1230) { 218 if($(this).children().length > 1) { 219 e.preventDefault(); 220 $(this).children('a').toggleClass('menu-childs-open'); 221 $(this).find('ul.second_level').toggle(); 222 } 223 } 224 }); 225 226 $('#menu_blok ul li li').on('click', function(e) { 227 e.stopPropagation(); 228 });*/ 229 230 /*$('.order_blok .winlight.order.zelenk').on('click', function(e) { 231 $('#lb_widget-root').remove(); 232 });*/ 233 234 var inc = 0; 235 var br; 236 var ver; 237 238 for(br in $.browser) break; 239 ver = $.browser.version; 240 241 if (br == 'msie' && ver == '7.0') { 242 if ($("#callBack1").attr('href')) $("#callBack1").attr('href', $("#callBack1").attr('href').replace('/winlight/', '/')); 243 if ($("#callBack2").attr('href')) $("#callBack2").attr('href', $("#callBack2").attr('href').replace('/winlight/', '/')); 244 if ($("#callBack3").attr('href')) $("#callBack3").attr('href', $("#callBack3").attr('href').replace('/winlight/', '/')); 245 } else { 246 $("a.winlight").fancybox({ 247 'frameWidth': 600, 248 'frameHeight': 500, 249 'hideOnContentClick' : false 250 }); 251 } 252 253 jQuery("a.fancybox").fancybox(); 254 jQuery("#admin_top_but a img").animate({opacity: 0.5}, 300); 255 jQuery("#admin_top_but a img").hover(function(){jQuery(this).animate({opacity: 1.0},300)}, function(){jQuery(this).animate({opacity: 0.5},300)}); 256 257 $('#start_login').on('click', function() { 258 $.post('/index.php', {mod: 'login', type: 'AJAX', start_login: 1}, function(data) { 259 if (data == '1') { 260 document.getElementById("loginDiv").innerHTML="<h1>ÐвÑоÑизаÑÐ¸Ñ Ð¿ÑоÑла ÑÑпеÑно</h1><h2>ÐвÑомаÑиÑеÑкое пеÑенапÑавление ...</h2>"; 261 window.location="/menus/"; 262 } else { 263 document.getElementById("loginDiv").innerHTML += "ÐÑибка авÑоÑизаÑии<br>"; 264 } 265 }).error(function() { 266 document.getElementById("loginDiv").innerHTML += "ÐÑибка авÑоÑизаÑии<br>"; 267 }); 268 }); 269}); 270 271function getRequestObject(){ 272 var req = null; 273 if (typeof XMLHttpRequest != "undefined") 274 req = new XMLHttpRequest(); 275 if (!req && typeof ActiveXObject != "undefined"){ 276 try 277 {req=new ActiveXObject("Msxml2.XMLHTTP");} 278 catch (e){
279 try 280 {req=new ActiveXObject("Microsoft.XMLHTTP");} 281 catch (e2){ 282 try 283 {req=new ActiveXObject("Msxml2.XMLHTTP.4.0");} 284 catch (e3) 285 {req=null;} 286 } 287 } 288 } 289 if(!req && window.createRequest) 290 req = window.createRequest(); 291 return req; 292 } 293 294/*----- ÐбÑие -----*/ 295function ChangeField(table,field,id,objID){ 296 nameData = prompt ("ÐведиÑе новое знаÑение:", jQuery('#'+objID).html() ); 297 if (nameData != null){ 298 jQuery('#'+objID).load('/index.php',{mod: 'edit', type: 'AJAX', table: table, field: field, id: id, new_value: nameData}); 299 } 300} 301function ChangeSliderField(table,field,id,modul,objId){ 302 nameData = jQuery('#'+objId).attr('value'); 303 if (nameData != null){ 304 jQuery('#'+modul+'Part'+id).animate({opacity: 0.1}, 200).load('/index.php',{mod: 'edit', type: 'AJAX', table: table, field: field, id: id, new_value: nameData}).animate({opacity: 0.1}, 200); 305 window.location=window.location; 306 } 307} 308function EditorField(table,field,id){ 309 window.open("/forms/editor.php?table="+table+"&field="+field+"&id="+id,"Edit","height=600,width=800,menubar=false,toolbar=false,location=false,directories=false"); 310} 311 312function OpenMedia(table,field,id){ 313 window.open("/forms/file_f.php?s=edit&table="+table+"&field="+field+"&id="+id,'',"width=450,height=100"); 314} 315 316function Refresh(module,id) 317 {jQuery('#'+module+id).animate({opacity: 0.1}, 200).load('/index.php',{mod: module, type: 'AJAX', s: 'Refresh', id: id }).animate({opacity: 1.0}, 200);} 318 319function GetFromForm(formID){ 320 var form = document.getElementById(formID); 321 var formEl = form.elements; 322 var count = formEl.length; 323 var str = ''; 324 for(var i=0; i<count; i++) { 325 if(typeof(formEl[i].name) != 'undefined') { 326 switch(formEl[i].type) { 327 case 'radio': 328 if (formEl[i].checked) {str += '&' + formEl[i].name + '=' + encodeURIComponent((formEl[i].value));} 329 break; 330 case 'checkbox': 331 if (formEl[i].checked) {str += '&' + formEl[i].name + '=' + encodeURIComponent((formEl[i].value));} 332 break; 333 case 'select-multiple': 334 for (var j=0; j < (formEl[i].options.length); j++) 335 if (formEl[i].options[j].selected) 336 str += '&' + formEl[i].name +'['+j+']'+'='+ encodeURIComponent((formEl[i].options[j].value)); 337 break; 338 default: 339 str += '&' + formEl[i].name + '=' + encodeURIComponent((formEl[i].value)); 340 break; 341 } 342 } 343 } 344 return str; 345 } 346/*----- PartModul -----*/ 347 348function Move(modul,who,id,direct){ 349 jQuery('#'+modul+who+id).animate({opacity: 0.1}, 500); 350 if (direct==1) arg = who+"Up"; 351 if (direct==0) arg = who+"Down"; 352 jQuery.post('/index.php', {mod: modul, type: 'AJAX', s: arg, id: id}, function(newid){ 353 jQuery('#'+modul+who+newid).animate({opacity: 0.1}, 500); 354 if (newid == id){ 355 if (direct==1) alert("ÐÑÑе нелÑзÑ!"); 356 if (direct==0) alert("Ðиже нелÑзÑ!"); 357 jQuery('#'+modul+who+id).load('/index.php',{mod: modul, type: 'AJAX', s: 'Show'+who, id: id }).animate({opacity: 1.0}, 500); 358 } 359 else{ 360 try { 361 jQuery('#'+modul+who+newid).attr("id", "temp"); 362 jQuery('#'+modul+who+id).attr("id", modul+who+newid); 363 jQuery('#temp').attr("id", modul+who+id); 364 jQuery('#'+modul+who+id).load('/index.php',{mod: modul, type: 'AJAX', s: 'Show'+who, id: id }).animate({opacity: 1.0}, 500); 365 jQuery('#'+modul+who+newid).load('/index.php',{mod: modul, type: 'AJAX', s: 'Show'+who, id: newid }).animate({opacity: 1.0}, 500); 366 } 367 catch (error) { 368 jQuery('#'+modul+who+id).attr("id", modul+who+newid); 369 jQuery('#'+modul+who+newid).load('/index.php',{mod: modul, type: 'AJAX', s: 'Show'+who, id: newid }).animate({opacity: 1.0}, 500); 370 } 371 } 372 }, 'text'); 373 } 374 375function Hide(modul,who,id){ 376 jQuery('#'+modul+who+id).animate({opacity: 0.1}, 200).load('/index.php',{mod: modul, type: 'AJAX', s: who+'Hide', id: id }).animate({opacity: 1.0}, 200); 377} 378 379function Show(modul,who,id){ 380 jQuery('#'+modul+who+id).animate({opacity: 0.1}, 200).load('/index.php',{mod: modul, type: 'AJAX', s: who+'Show', id: id }).animate({opacity: 1.0}, 200); 381} 382 383function HideM(id){ 384 jQuery('#menusItemPanel'+id).animate({opacity: 0.1}, 200).load('/index.php',{mod:'menus', type:'AJAX', s:'ItemHide', id:id}).animate({opacity: 1.0}, 200); 385} 386 387function ShowM(id){ 388 jQuery('#menusItemPanel'+id).animate({opacity: 0.1}, 200).load('/index.php',{mod:'menus', type:'AJAX', s:'ItemShow', id:id}).animate({opacity: 1.0}, 200); 389} 390 391function RefreshList(modul, part) 392 {jQuery('#'+modul+'List').animate({opacity: 0.1}, 200).load('/index.php',{mod: modul, type: 'AJAX', s: 'ShowList', part: part }).animate({opacity: 1.0}, 200);} 393 394function ItemCheck(modul,id,block) 395 {jQuery('#'+modul+'Item'+id).animate({opacity: 0.1}, 200).load('/index.php',{mod: modul, type: 'AJAX', s: 'ItemSetBlock', id: id, block: block}).animate({opacity: 1.0}, 200)} 396 397function ItemDel(modul,id){ 398 if (confirm("ÐÑ Ð´ÐµÐ¹ÑÑвиÑелÑно Ñ Ð¾ÑиÑе ÑдалиÑÑ ÑлеменÑ?")){ 399 jQuery('#'+modul+"Item"+id).animate({opacity: 0.1}, 500, function(){ 400 jQuery('#'+modul+"Item"+id).load('/index.php',{mod: modul, type: 'AJAX', s: 'ItemDel', id: id }).remove(); 401 }); 402 } 403} 404 405function PartDel(modul,id){ 406 if (confirm("ÐÑ Ð´ÐµÐ¹ÑÑвиÑелÑно Ñ Ð¾ÑиÑе ÑдалиÑÑ Ñаздел?\n(Раздел бÑÐ´ÐµÑ Ñдален вмеÑÑе Ñо вÑеми ÑлеменÑами)")){ 407 jQuery('#'+modul+"Part"+id).animate({opacity: 0.1}, 500, function(){ 408 jQuery('#'+modul+"Part"+id).load('/index.php',{mod: modul, type: 'AJAX', s: 'PartDel', id: id }).remove(); 409 }); 410 } 411} 412 413function ItemAdd(modul,part){ 414 count = jQuery('#ItemAddCount').attr('value'); 415 dir = jQuery('#ItemAddDir').attr('value'); 416 jQuery('#'+modul+'List').animate({opacity: 0.1}, 200).load('/index.php',{mod:modul, type:'AJAX', s:'ItemAdd', part:part, count:count, dir:dir}).animate({opacity: 1.0}, 200); 417} 418 419function ItemAdds(modul,part){ 420 count = jQuery('#ItemAddCount').attr('value'); 421 dir = jQuery('#ItemAddDir').attr('value'); 422 jQuery('#'+modul+'List').animate({opacity: 0.1}, 200).load('/index.php',{mod:modul, type:'AJAX', s:'ItemAdds', part:part, count:count, dir:dir}).animate({opacity: 1.0}, 200); 423} 424 425function PartAdd(modul){ 426 jQuery('#'+modul+'PartList').animate({opacity: 0.1}, 200).load('/index.php',{mod: modul, type: 'AJAX', s: 'PartAdd' }).animate({opacity: 1.0}, 200); 427} 428 429function PartAddEx(modul,id){ 430 jQuery('#'+modul+'PartList').animate({opacity: 0.1}, 200).load('/index.php',{mod: modul, type: 'AJAX', s: 'PartAdd', id: id }).animate({opacity: 1.0}, 200); 431} 432 433function ClearAll(modul){ 434 if (confirm("ÐÑ Ð´ÐµÐ¹ÑÑвиÑелÑно Ñ Ð¾ÑиÑе оÑиÑÑÑ Ð²ÑÑ Ð±Ð°Ð·Ñ Ð´Ð°Ð½Ð½Ð¾Ð³Ð¾ модÑлÑ?")){ 435 jQuery('#'+modul+"PartList").load('/index.php',{mod: modul, type: 'AJAX', s: 'ClearAll'}); 436 } 437} 438 439function SetToAllPart(modul,field){ 440 var nameData = ""; 441 nameData = prompt ("ÐведиÑе новое знаÑение:", nameData ); 442 if (nameData != null){ 443 jQuery('#'+modul+"PartList").animate({opacity: 0.1}, 700); 444 jQuery('#'+modul+"PartList").load('/index.php',{mod: modul, type: 'AJAX', s: 'SetToAll', field: field, new_value: nameData }); 445 jQuery('#'+modul+"PartList").animate({opacity: 1.0}, 700); 446 } 447} 448 449function FaqAct(id) 450 { 451 jQuery('#t_block'+id).slideToggle(); 452 jQuery('#o_block'+id).toggle(); 453 jQuery('#btn_block'+id).toggle();
454 if (jQuery('#t_block'+id+' .zelenk').html('ÐÑоÑиÑаÑÑ Ð¾ÑвеÑ')){ 455 jQuery('#t_block'+id+' .zelenk').html('СкÑÑÑÑ Ð¾ÑвеÑ') 456 } 457 else{ 458 jQuery('#t_block'+id+' .zelenk').html('ÐÑоÑиÑаÑÑ Ð¾ÑвеÑ') 459 } 460 } 461 462function inquirerAct(formObj){ 463 var formEl = formObj.elements; 464 var count = formEl.length; 465 var flag = false; 466 for(var i=0; i<count; i++) { 467 if(typeof(formEl[i].name) != 'undefined') { 468 if (formEl[i].name=='item') 469 if (formEl[i].checked) 470 flag=true; 471 } 472 } 473 if (flag){ 474 qString = jQuery(formObj).formSerialize(); 475 jQuery.post("/index.php", qString, function(rez){ 476 //alert(rez); 477 jQuery('#opros').fadeOut().html(rez).fadeIn(); 478 },'text'); 479 } 480 else alert('Ðадо вÑбÑаÑÑ Ð²Ð°ÑÐ¸Ð°Ð½Ñ Ð¾ÑвеÑа!'); 481} 482 483/*----- menus -----*/ 484function MenusClick(id){ 485 jQuery(".simpleTree div").slideUp(); 486 jQuery("#menusItemPanel"+id).slideDown(); 487 } 488 489function MenusChangeType(id,oldtype,type){ 490 if (confirm("ÐÑ Ð´ÐµÐ¹ÑÑвиÑелÑно Ñ Ð¾ÑиÑе измениÑÑ Ñип пÑÐ½ÐºÑ Ð¼ÐµÐ½Ñ?")) 491 jQuery('#menusItemPanel'+id).animate({opacity: 0.1}, 200).load('/index.php',{mod:'menus', type:'AJAX', s:'ItemSetType', id:id, txt:type}).animate({opacity: 1.0}, 200); 492 else document.getElementById("menusSelect"+id).value=oldtype; 493 } 494 495function MenusChangeTypeP(id,oldtype,type){ 496 if (confirm("ÐÑ Ð´ÐµÐ¹ÑÑвиÑелÑно Ñ Ð¾ÑиÑе измениÑÑ Ñип пÑÐ½ÐºÑ Ð¼ÐµÐ½Ñ?")) 497 jQuery('#menusItemPanel'+id).animate({opacity: 0.1}, 200).load('/index.php',{mod:'menus', type:'AJAX', s:'ItemSetType', id:id, txt:type}).animate({opacity: 1.0}, 200); 498 else document.getElementById("menusSelectP"+id).value=oldtype; 499 } 500 501function MenusChangeTypePI(id,oldtype,type){ 502 if (confirm("ÐÑ Ð´ÐµÐ¹ÑÑвиÑелÑно Ñ Ð¾ÑиÑе измениÑÑ Ñип пÑÐ½ÐºÑ Ð¼ÐµÐ½Ñ?")) 503 jQuery('#menusItemPanel'+id).animate({opacity: 0.1}, 200).load('/index.php',{mod:'menus', type:'AJAX', s:'ItemSetType', id:id, txt:type}).animate({opacity: 1.0}, 200); 504 else document.getElementById("menusSelectPI"+id).value=oldtype; 505 } 506 507function MenusItemAdd(parent){ 508 jQuery('#menusItem'+parent+' ul').animate({opacity: 0.1}, 200); 509 jQuery.post('/index.php', {mod:'menus', type:'AJAX', s:'ItemAdd', id:parent}, function(rez){ 510 //alert(parent+rez); 511 jQuery('#menusItem'+parent+' ul').html(rez); 512 simpleTreeCollection.get(0).setTreeNodes(jQuery('#menusItem'+parent+ ' ul'), true); 513 },'text'); 514 jQuery('#menusItem'+parent+' ul').animate({opacity: 1.0}, 200); 515} 516 517/*----- Seo -----*/ 518 519function SeoWordAdd(type){ 520 qString = jQuery("#SeoForm").formSerialize(); 521 jQuery.post("/index.php", qString, function(rez){ 522 jQuery('#SeoWord').fadeOut().html(rez).fadeIn(); 523 },'text'); 524 } 525 526function SeoWordDel(id) 527 {jQuery('#SeoWord').fadeOut().load('/index.php',{mod:'seo', type:'AJAX', s:'ItemDel', id:id}).fadeIn();} 528 529 530/*----- Canonical -----*/ 531 532function canonicalAdd() { 533 qString = jQuery("#canonicalFrom").formSerialize(); 534 jQuery.post("/index.php", qString, function(rez){ 535 jQuery('#canonicalItem').fadeOut().html(rez).fadeIn(); 536 },'text'); 537 } 538 539function canonicalDel(id) 540 {jQuery('#canonicalItem').fadeOut().load('/index.php',{mod:'canonical', type:'AJAX', s:'ItemDel', id:id}).fadeIn();} 541 542/*----- ÐÑоÑее -----*/ 543 544function Login(){ 545 var login = encodeURIComponent((document.getElementById("admin_login").value)); 546 var pass = encodeURIComponent((document.getElementById("admin_pass").value)); 547 var arg = "mod=login&type=AJAX&login="+login+"&pass="+pass; 548 549 var xmlHttp = getRequestObject(); 550 var addrSave=window.top.location.protocol+"//"+window.top.location.host; 551 xmlHttp.onreadystatechange = function() { 552 if (xmlHttp.readyState == 4) { 553// alert(xmlHttp.responseText); 554 if (xmlHttp.responseText == 1){ 555 document.getElementById("loginDiv").innerHTML="<h1>ÐвÑоÑизаÑÐ¸Ñ Ð¿ÑоÑла ÑÑпеÑно</h1><h2>ÐвÑомаÑиÑеÑкое пеÑенапÑавление ...</h2>"; 556 window.location="/menus/"; 557/* 558 document.getElementById("loginDiv").innerHTML="<h1>
558ÐвÑоÑизаÑÐ¸Ñ Ð¿ÑоÑла ÑÑпеÑно</h1><h2>ÐвÑомаÑиÑеÑкое пеÑенапÑавление ÑеÑез <span style='color: red;' id='countdown'></span> ÑекÑнд</h2>"; 559 document.getElementById("countdown").innerHTML=4 560 countredirect(); 561*/ 562 }else{ 563 document.getElementById("loginDiv").innerHTML+="ÐепÑавилÑнÑй логин или паÑолÑ<br>"; 564 } 565 } 566 }; 567 xmlHttp.open('POST', addrSave, true); 568 xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"); 569 xmlHttp.setRequestHeader("Content-Length", arg.length); 570 xmlHttp.send(arg); 571 } 572function Auth(){ 573 var login = encodeURIComponent((document.getElementById("admin_login").value)); 574 var pass = encodeURIComponent((document.getElementById("admin_pass").value)); 575 var arg = "mod=login&type=AJAX&login="+login+"&pass="+pass; 576 577 var xmlHttp = getRequestObject(); 578 var addrSave=window.top.location.protocol+"//"+window.top.location.host; 579 xmlHttp.onreadystatechange = function() { 580 if (xmlHttp.readyState == 4) { 581 //alert(xmlHttp.responseText); 582 if (xmlHttp.responseText == 1){ 583 document.getElementById("auth").innerHTML="<h1>ÐвÑоÑизаÑÐ¸Ñ Ð¿ÑоÑла ÑÑпеÑно</h1>"; 584 window.location=window.location; 585 }else{ 586 document.getElementById("auth").innerHTML+="ÐепÑавилÑнÑй логин или паÑолÑ<br>"; 587 } 588 } 589 }; 590 xmlHttp.open('POST', addrSave, true); 591 xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"); 592 xmlHttp.setRequestHeader("Content-Length", arg.length); 593 xmlHttp.send(arg); 594} 595 596function countredirect(){ 597 var currentsecond=document.getElementById("countdown").innerHTML; 598 currentsecond-=1; 599 document.getElementById("countdown").innerHTML=currentsecond; 600 if (currentsecond==1) 601 window.location="/menus/"; 602 else setTimeout("countredirect()",1000); 603 } 604 605/* new catalog */ 606 607function catalogFullMenuOpen(id){ 608 event.preventDefault(); 609 610 var pm = jQuery('#catalogFullMenuUl' + id); 611 if (pm.hasClass('nodisplay')){ 612 pm.removeClass('nodisplay'); 613 }else{ 614 pm.addClass('nodisplay'); 615 } 616} 617 618function portfolioFullMenuOpen(id){ 619 event.preventDefault(); 620 621 var pm = jQuery('#portfolioFullMenuUl' + id); 622 if (pm.hasClass('nodisplay')){ 623 pm.removeClass('nodisplay'); 624 }else{ 625 pm.addClass('nodisplay'); 626 } 627} 628 629 630/* Capcha refresh */ 631function kcaptcha_reload(){ 632 document.getElementById('kcaptcha').src = window.location.protocol + "//" + window.location.hostname + "/includes/kcaptcha/index.php" + '?rand = '+Math.random(); 633} 634 635/* Cookie */ 636function setCookie(name, value, expires, path, domain, secure) { 637 document.cookie = name + "=" + escape(value) + 638 ((expires) ? "; expires=" + expires : "") + 639 ((path) ? "; path=" + path : "") + 640 ((domain) ? "; domain=" + domain : "") + 641 ((secure) ? "; secure" : ""); 642} 643 644function getCookie(name) { 645 var matches = document.cookie.match(new RegExp( 646 "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)" 647 )) 648 return matches ? decodeURIComponent(matches[1]) : undefined 649} 650 651function deleteCookie(name) { 652 setCookie(name, null, { expires: -1 }) 653} 654 655 656/* <!-- ÐеогÑаÑÐ¸Ñ */ 657 658function geoCityAdd(){ 659 jQuery('#geoListCitys').animate({opacity: 0.1}, 200).load('/index.php',{mod:'geo', type:'AJAX', s:'CityAdd'}).animate({opacity: 1.0}, 200); 660} 661 662function geoCityRename(id, n){ 663 var name = prompt('УкажиÑе Ðазвание гоÑода', n); 664 if (name != null) { 665 jQuery('#geoListCitys').animate({opacity: 0.1}, 200).load('/index.php',{mod:'geo', type:'AJAX', s:'geoCityRename', id:id, name:name}, function(){location.reload();}).animate({opacity: 1.0}, 200); 666 } 667} 668 669function geoDel(table, id){ 670 if(!confirm('ÐÑ Ð¿Ð¾Ð´ÑвеÑждаеÑе Ñдаление?')) return; 671 jQuery('#geoList' + table + 's').animate({opacity: 0.1}, 200).load('/index.php',{mod:'geo', type:'AJAX', s:'geoDel', id:id, table:table}).animate({opacity: 1.0}, 200); 672} 673 674function geoCityDefault(id){ 675 jQuery('#geoListCitys').animate({opacity: 0.1}, 200).load('/index.php',{mod:'geo', type:'AJAX', s:'geoCityDefault', id:id}).animate({opacity: 1.0}, 200); 676} 677 678function geoPageAdd(idPage) { 679 idCity = jQuery('#geo_select_citys_' + idPage).val(); 680 jQuery('#geoListPages').animate({opacity: 0.1}, 200).load('/index.php',{mod:'geo', type:'AJAX', s:'geoPageAdd', idCity:idCity, idPage:idPage}).animate({opacity: 1.0}, 200); 681} 682 683function geoBlockAdd(idBlock) { 684 idCity = jQuery('#geo_select1_citys_' + idBlock).val(); 685 jQuery('#geoListBlocks').animate({opacity: 0.1}, 200).load('/index.php',{mod:'geo', type:'AJAX', s:'geoBlockAdd', idCity:idCity, idBlock:idBlock}).animate({opacity: 1.0}, 200); 686} 687 688/* --> */ 689jQuery(function($) { 690 $(".left_swap").click(function () { 691 //$(this).toggleClass('opened'); 692 $("#menu_blok").toggle(); 693 return false;
694 }); 695}) 696jQuery(function($) { 697 $(".left_swap").click(function () { 698 $(this).toggleClass('opened'); 699 $(".menu_top").toggle(); 700 return false; 701 }); 702}) 703 704$(document).ready(function () { 705 //Fixing jQuery Click Events for the iPad 706 var ua = navigator.userAgent, 707 event = (ua.match(/iPad/i)) ? "touchstart" : "click"; 708 if ($('.tablePrice').length > 0) { 709 $('.tablePrice .tableHeader').on(event, function () { 710 $(this).toggleClass("active", "").nextUntil('.tableHeader').css('display', function (i, v) { 711 return this.style.display === 'table-row' ? 'none' : 'table-row'; 712 }); 713 }); 714 } 715 716 let scrollPosition = 0; 717 let ticking = false; 718 719/* function doSomething(scroll_pos) { 720 const mobileSlideStop = document.querySelector('.slider .bx-stop'); 721 if(scroll_pos >= 450) { 722 mobileSlideStop.addClass('active') 723 } 724 if (scroll_pos < 450) { 725 mobileSlideStop.removeClass('active') 726 } 727 }*/ 728 729 window.addEventListener('scroll', function(e) { 730 scrollPosition = window.scrollX; 731 732 if (!ticking) { 733 window.requestAnimationFrame(function() { 734 /* doSomething(scrollPosition);*/ 735 ticking = false; 736 }); 737 738 ticking = true; 739 } 740 }); 741}) 742 743 function handleResize() { 744 var screenWidth = $(window).width(); 745 } 746 747 // ÐÑзÑваем ÑÑнкÑÐ¸Ñ handleResize пÑи загÑÑзке ÑÑÑаниÑÑ 748 handleResize(); 749 750 // ÐÑивÑзÑваем обÑабоÑÑик ÑобÑÑÐ¸Ñ resize 751 $(window).on('resize', function() { 752 handleResize(); 753 }); 754 755/* каÑÑÑÐµÐ»Ñ ÐÑимеÑÑ Ð½Ð°ÑÐ¸Ñ ÑÐ°Ð±Ð¾Ñ 756$(document).ready(function(){ 757 const slider = $("#slider").owlCarousel({ 758 loop:true, 759 margin:10, 760 nav:true, 761 responsive:{ 762 0:{ 763 items:1 764 }, 765 600:{ 766 items:1 767 }, 768 1000:{ 769 items:1 770 } 771 } 772 }); 773 let width = $( window ).width(); 774 if(width < 768){ 775 $( '#blok_rabot_main' ).addClass('owl-carousel owl-theme'); 776 $("#blok_rabot_main").owlCarousel({ 777 loop:true, 778 margin:10, 779 nav:true, 780 responsive:{ 781 0:{ 782 items:1 783 }, 784 600:{ 785 items:1 786 }, 787 1000:{ 788 items:1 789 } 790 } 791 }); 792 }else{ 793 $( '#blok_rabot_main' ).removeClass('owl-carousel owl-theme'); 794 $( '#blok_rabot_main' ).owlCarousel('destroy'); 795 } 796 797 $( window ).resize(function(){ 798 let width = $( window ).width(); 799 console.log(width); 800 if(width < 768){ 801 $( '#blok_rabot_main' ).addClass('owl-carousel owl-theme'); 802 $("#blok_rabot_main").owlCarousel({ 803 loop:true, 804 margin:10, 805 nav:true, 806 responsive:{ 807 0:{ 808 items:1 809 }, 810 600:{ 811 items:1 812 }, 813 1000:{ 814 items:1 815 } 816 } 817 }); 818 }else{ 819 $( '#blok_rabot_main' ).removeClass('owl-carousel owl-theme'); 820 $( '#blok_rabot_main' ).owlCarousel('destroy'); 821 } 822 }); 823});*/ 824 825$(function() { 826 var Accordion = function(el, multiple) { 827 this.el = el || {}; 828 // more then one submenu open? 829 this.multiple = multiple || false; 830 831 var dropdownlink = this.el.find('.dropdownlink'); 832 dropdownlink.on('click', 833 { el: this.el, multiple: this.multiple }, 834 this.dropdown); 835 }; 836 837 Accordion.prototype.dropdown = function(e) { 838 var $el = e.data.el, 839 $this = $(this), 840 //this is the ul.submenuItems 841 $next = $this.next(); 842 843 $next.slideToggle(); 844 $this.parent().toggleClass('open'); 845 846 if(!e.data.multiple) { 847 //show only one menu at the same time 848 $el.find('.second_level').not($next).slideUp(0).parent().removeClass('open'); 849 } 850 } 851 852 var accordion = new Accordion($('#menu_blok ul'), false); 853 })
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.