1(function ($) { 2 $.fn.loadMore = function(options){ 3 var defaults = { 4 action: '', 5 limit: 0, 6 container: '', 7 where: '' 8 }; 9 var settings = $.extend({}, defaults, options); 10 11 var handle = function($el){ 12 $el.click(function(e){ 13 e.preventDefault(); 14 var paged = $el.next().val(); 15 var maxPaged = $el.data('maxnum'); 16 var limit = settings.limit; 17 var where = settings.where; 18 var container = settings.container; 19 20 if(($el.attr('data-limit') != 'undefined') && (limit == 0)){ 21 limit = $el.data('limit'); 22 } 23 if(($el.attr('data-where') != 'undefined') && (where == '')){ 24 where = $el.data('where'); 25 } 26 27 if(($el.attr('data-container') != 'undefined') && (container == '')){ 28 container = $el.data('container'); 29 } 30 31 if(paged <= maxPaged){ 32 $el.find('.not-loading').addClass('loading'); 33 $el.attr("disabled", true); 34 $.ajax({ 35 url: ajaxUrl.url, 36 type: 'POST', 37 dataType: 'json', 38 async: false, 39 data: { 40 action: settings.action, 41 paged: paged, 42 limit: limit, 43 where: where 44 }, 45 success: function(response){ 46 $el.find('.not-loading').removeClass('loading'); 47 $el.attr("disabled", false); 48 49 $(container).append(response.html); 50 51 $el.next().val(response.num); 52 53 if(response.num > response.maxnum){ 54 $el.hide(); 55 } 56 else{ 57 $el.show(); 58 } 59 $('.btnPopup').contactPP(); 60 $('.boxTeamItem').ppForm({ 61 action: 'team_detail', 62 baseClass: 'ppTeam', 63 btnClose: false 64 }); 65 66 readmoreWidth(); 67 } 68 }); 69 } 70 }); 71 } 72 73 $(this).each(function () { 74 handle($(this)); 75 }); 76 } 77 78 $.fn.ppForm = function(options){ 79 var defaults = { 80 action: '', 81 template: '', 82 baseClass: '', 83 btnClose: true 84 }; 85 var settings = $.extend({}, defaults, options); 86 87 var handle = function($el){ 88 $el.off().on('click', function(e){ 89 e.preventDefault(); 90 $.fancybox.close(); 91 92 $el.find('.not-loading').addClass('loading'); 93 $el.attr("disabled", true); 94 95 $.ajax({ 96 url: ajaxUrl.url, 97 type: 'POST', 98 dataType: 'json', 99 data: { 100 action: settings.action, 101 template: settings.template, 102 id: $el.data('id') 103 }, 104 success: function(response){ 105 $el.find('.not-loading').removeClass('loading'); 106 $el.attr("disabled", false); 107 108 if(response.error){ 109 toastr.options.positionClass = 'toast-bottom-right'; 110 toastr.error(response.message); 111 } 112 else{ 113 $.fancybox.open({ 114 src : response.message, 115 type : 'html', 116 opts : { 117 touch:false, 118 width: '600px', 119 baseClass: settings.baseClass, 120 smallBtn: settings.btnClose, 121 } 122 }); 123 } 124 } 125 }); 126 }); 127 } 128 129 $(this).each(function () { 130 handle($(this)); 131 }); 132 } 133 134 $.fn.submitForm = function(){ 135 var handle = function($el){ 136 $el.submit(function(e){ 137 e.preventDefault(); 138 139 var data = new FormData(); 140 var form_data = $el.serializeArray(); 141 $.each(form_data, function (key, input) { 142 data.append(input.name, input.value); 143 }); 144 145 //File data 146 if($el.find('input[name="document"]').length > 0) { 147 var file_data = $el.find('input[name="document"]')[0].files; 148 data.append("document", file_data[0]); 149 } 150 151 $el.find('.not-loading').addClass('loading'); 152 $el.find('button').prop('disabled', true); 153 $.ajax({ 154 url: ajaxUrl.url, 155 type: 'POST', 156 dataType: 'json', 157 data: data, 158 contentType: false, 159 processData: false, 160 success: function(response){ 161 $el.find('.not-loading').removeClass('loading'); 162 $el.find('button').prop('disabled', false); 163 164 toastr.options.positionClass = 'toast-bottom-right'; 165 if(response.error){ 166 toastr.error(response.message); 167 } 168 else{ 169 if(response.redirect) { 170 window.location.href = response.redirect; 171 } 172 else if(response.reload){ 173 setTimeout(function() { 174 window.location.reload(); 175 }, 800); 176 } 177 else{ 178 toastr.success(response.message); 179 } 180 } 181 } 182 }); 183 }) 184 } 185 186 $(this).each(function(){ 187 handle($(this)); 188 }) 189 } 190 191 $.fn.scrollToDiv = function(){ 192 var handle = function($el){ 193 $el.click(function(e){ 194 if($el.attr('href').search('#') == 0){ 195 e.preventDefault(); 196 $("html, body").animate({ scrollTop: ($($el.attr('href')).offset().top - 50)}, 800); 197 } 198 }); 199 } 200 201 $(this).each(function () { 202 handle($(this)); 203 }); 204 } 205 $.fn.contactPP = function(){ 206 var handle = function($el){ 207 $el.click(function(e){ 208 e.preventDefault(); 209 var txt_original = $el.html(); 210 var width_original = $el.outerWidth(); 211 var idForm = parseInt($el.attr('href'));
212 var refUrl = $el.data('ref'); 213 var brochure = parseInt($el.data('brochure')); 214 if (!$(this).hasClass('title') && $('.listKnowledge').length<1){ 215 $el.css('width',width_original).html('<i class="fas fa-circle-notch fa-spin"></i>').addClass('disabled'); 216 } 217 else if($('.listKnowledge').length>0){ 218 $el.parent().parent().find('.thumb-item').parent().addClass('disabled'); 219 } 220 $.ajax({ 221 url: ajaxUrl.url, 222 type: 'POST', 223 dataType: 'json', 224 data: { 225 brochure:brochure, 226 id: idForm, 227 refUrl:refUrl, 228 action: 'contact_popup' 229 }, 230 success: function(response){ 231 if (!$(this).hasClass('title') && $('.listKnowledge').length<1){ 232 $el.removeClass('disabled').html(txt_original).css('width','auto'); 233 } 234 else if($('.listKnowledge').length>0){ 235 $el.parent().parent().find('.thumb-item').parent().removeClass('disabled'); 236 } 237 238 if(response.error){ 239 toastr.options.positionClass = 'toast-bottom-right'; 240 toastr.error(response.message); 241 } 242 else{ 243 $.fancybox.open({ 244 src : response.message, 245 246 type : 'html', 247 opts : { 248 249 clickSlide : true, 250 touch:false, 251 width: '600px', 252 baseClass: '', 253 afterShow : function( instance, current ) { 254 reinitCF7Turnstile(); 255 } 256 } 257 258 }); 259 } 260 } 261 }); 262 }) 263 } 264 265 $(this).each(function(){ 266 handle($(this)); 267 }) 268 } 269 270 // $.fn.contactPP = function(){ 271 // var handle = function($el){ 272 // $el.click(function(e){ 273 // e.preventDefault(); 274 // 275 // $el.addClass('disabled'); 276 // 277 // $.ajax({ 278 // url: ajaxUrl.url, 279 // type: 'POST', 280 // dataType: 'json', 281 // data: { 282 // id: $el.data('id'), 283 // action: 'contact_popup' 284 // }, 285 // success: function(response){ 286 // $el.removeClass('disabled'); 287 // 288 // if(response.error){ 289 // toastr.options.positionClass = 'toast-bottom-right'; 290 // toastr.error(response.message); 291 // } 292 // else{ 293 // $.fancybox.open({ 294 // src : response.message, 295 // type : 'html', 296 // opts : { 297 // width: '600px', 298 // baseClass: '' 299 // } 300 // }); 301 // } 302 // } 303 // }); 304 // }) 305 // } 306 // 307 // $(this).each(function(){ 308 // handle($(this)); 309 // }) 310 // } 311 312 $.fn.vcValues = function(){ 313 const animate_counter = function(start, stop, speed, step, ed, total){ 314 start = Math.min(stop, start + step); 315 total.text(start + ed); 316 if (start < stop) { 317 setTimeout(function() { 318 animate_counter(start, stop, speed, step, ed, total); 319 }, speed); 320 } 321 } 322 323 var handle = function($el){ 324 var scrollPosition = jQuery(window).scrollTop() + jQuery(window).height(); 325 $el.find('.vcValueItem:not(.inited)').each(function(){ 326 var skillsItem = $(this); 327 var scrollSkills = skillsItem.offset().top; 328 329 if (scrollPosition > scrollSkills) { 330 var init_ok = true; 331 var total = skillsItem.find('.skills_total').eq(0); 332 var start = parseFloat(total.data('start')); 333 var stop = parseFloat(total.data('stop')); 334 var maximum = parseInt(total.data('max')); 335 var startPercent = Math.round(start / maximum * 100); 336 var stopPercent = Math.round(stop / maximum * 100); 337 var ed = total.data('ed'); 338 var speed = parseInt(total.data('speed')); 339 var step = start != parseInt(start) || stop != parseInt(stop) ? parseFloat(total.data('step')) : parseInt(total.data('step')); 340 var duration = parseInt(total.data('duration')); 341 if (isNaN(duration)) 342 duration = Math.ceil(maximum / step) * speed; 343 344 animate_counter(start, stop, speed, step, ed, total); 345 346 if (init_ok) 347 skillsItem.addClass('inited'); 348 } 349 }) 350 } 351 352 $(this).each(function () { 353 handle($(this)); 354 }); 355 } 356 357 $.fn.btnDragDrop = function(){ 358 var handle = function($el){ 359 $el.click(function(e){ 360 e.preventDefault(); 361 $el.prev().trigger('click'); 362 }) 363 } 364 365 $(this).each(function(){ 366 handle($(this)); 367 }); 368 } 369 370 $(window).scroll(function(){ 371 var m = $('header').outerHeight(); 372 if($(window).scrollTop() > m){ 373 $('header').addClass('sticky'); 374 } 375 else{ 376 $('header').removeClass('sticky'); 377 } 378 }); 379 380 jQuery(window).resize(function(){ 381 382 }) 383}
383)(jQuery) 384 385var readmoreWidth = (function ($) { 386 function onDefault(){ 387 $('.readMore').each(function(){ 388 var mWdith = $(this).find('span').first().outerWidth(); 389 $(this).find('span.borders').css('width', 'calc(100% - '+mWdith+'px'); 390 }); 391 } 392 393 return onDefault; 394})(jQuery) 395 396// var toggleFooter = (function ($) { 397// function onDefault(){ 398 // if($(window).width() < 768){ 399 // $('footer .widget-title').each(function(){ 400 // $(this).addClass('titleToggle'); 401 // $(this).next().css('display', 'none'); 402 // }); 403 // 404 // $('footer .widget-title.titleToggle').click(function(){ 405 // $(this).next().slideToggle(); 406 // if($(this).hasClass('active')){ 407 // $(this).removeClass('active'); 408 // } 409 // else{ 410 // $(this).addClass('active'); 411 // } 412 // }) 413 // } 414 // else{ 415 // $('footer .widget-title').each(function(){ 416 // $(this).removeClass('titleToggle'); 417 // $(this).next().css('display', ''); 418 // }) 419 // } 420 421 422// return onDefault; 423// })(jQuery) 424// } 425function reinitCF7Turnstile() { 426 console.log('reinitCF7Turnstile'); 427 if (typeof turnstile === 'undefined') return; 428 var container = document.querySelector('.fancybox-container [data-sitekey]'); 429 if (container) { 430 turnstile.render(container); 431 } 432} 433jQuery(document).ready(function($){ 434 if($('.formAjax').length > 0) { 435 $('.formAjax').submitForm(); 436 } 437 var maxHeight = 0; 438 $('#sliderHeader .headerContent').each(function(){ 439 if ($(this).height() > maxHeight) { maxHeight = $(this).height(); } 440 441 }) 442 $('#sliderHeader .headerContent').height(maxHeight); 443 // toggleFooter(); 444 readmoreWidth(); 445 446 $('a.btnMenu, a.btnCloseMenu').click(function(e){ 447 e.preventDefault(); 448 $('#menuMain').toggleClass('active'); 449 }); 450 451 if($(window).width() < 768) { 452 $('.footer-collapse').not('#nav_menu-6').on('click',function(e) { 453 if (!$(this).hasClass('open')) { 454 $(this).addClass('open'); 455 456 var el = $(this).children('div:not(".widget-title")'), 457 curHeight = el.height(), 458 autoHeight = el.css('height', 'auto').height(); 459 el.height(curHeight).animate({height: autoHeight}, 300); 460 } 461 else{ 462 $(this).removeClass('open'); 463 var el = $(this).children('div:not(".widget-title")'), 464 curHeight = el.height(), 465 autoHeight = 0; 466 el.height(curHeight).animate({height: autoHeight}, 300); 467 } 468 }); 469 $(' ul.mainmenu > li').on('click',function(e) { 470 if (!$(this).hasClass('open')) { 471 $(' ul.mainmenu > li').not($(this)).removeClass('open').find('ul').css('height',0); 472 $(this).addClass('open'); 473 474 var el = $(this).children('ul'), 475 curHeight = el.height(), 476 autoHeight = el.css('height', 'auto').height(); 477 el.height(curHeight).animate({height: autoHeight}, 300); 478 } 479 else{ 480 $(this).removeClass('open'); 481 var el = $(this).children('ul'), 482 curHeight = el.height(), 483 autoHeight = 0; 484 el.height(curHeight).animate({height: autoHeight}, 300); 485 } 486 }); 487 } 488 else{ 489 $(document).click(function(e){ 490 if($('#menuMain').hasClass('active')){ 491 if(!$(e.target).is(".btnMenu,.btnMenu *, #menuMain, #menuMain *")) { 492 e.preventDefault(); 493 $('#menuMain').removeClass('active') 494 } 495 } 496 }); 497 } 498 // $(window).resize(function(){ 499 // toggleFooter(); 500 // }); 501 502 503 504 $('.btnPopup').contactPP(); 505 506 507 $('#menuMain ul.mainmenu > li,.sub-menu').hover( 508 function() { 509 $(this).addClass('active'); 510 }, function() { 511 $(this).removeClass('active'); 512 } 513 ); 514 515 // $('.menu-item a').click(function(e){ 516 // if($(this).attr('href') == '#'){ 517 // e.preventDefault(); 518 // $('.sub-menu').removeClass('active'); 519 // $('.sub-menu').parent().removeClass('current-menu-parent'); 520 // $('.sub-menu li').removeClass('current_page_item'); 521 // 522 // $(this).parent().addClass('current-menu-parent'); 523 // $(this).next().toggleClass('active'); 524 // } 525 // }); 526 $('#sliderHeader .owl-carousel').owlCarousel({ 527 margin: 0, 528 loop: true, 529 nav: false, 530 dots: false, 531 autoplay: true, 532 autoplayTimeout: 4500, 533 navText : ['', ''], 534 items: 1 535 }); 536 537 $('#sliderHeader .buttons').click(function(){ 538 $('#sliderHeader .owl-carousel').trigger('to.owl.carousel', [$(this).data('index'), 0, true]); 539 }); 540 541 $('.vcIcons.popup').click(function(){ 542 $.fancybox.close(); 543 $.fancybox.open({ 544 src : $(this).find('.iconContent').html(), 545 type : 'html', 546 opts : { 547 width: '600px', 548 baseClass: 'iconPopup', 549 afterShow : function( instance, current ) { 550 reinitCF7Turnstile(); 551 } 552 } 553 }); 554 }) 555}); 556
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.