1/* 2Template: ProX - Responsive Bootstrap 4 Admin Dashboard Template 3Author: iqonicthemes.in 4Design and Developed by: iqonicthemes.in 5NOTE: This file contains the styling for responsive Template. 6*/ 7 8/*---------------------------------------------- 9Index Of Script 10------------------------------------------------ 11 12:: Tooltip 13:: Fixed Nav 14:: Magnific Popup 15:: Ripple Effect 16:: Sidebar Widget 17:: FullScreen 18:: Page Loader 19:: Counter 20:: Progress Bar 21:: Page Menu 22:: Close navbar Toggle 23:: Mailbox 24:: chatuser 25:: chatuser main 26:: Chat start 27:: todo Page 28:: user toggle 29:: Data tables 30:: Form Validation 31:: Active Class for Pricing Table 32:: Flatpicker 33:: Scrollbar 34:: checkout 35:: Datatables 36:: image-upload 37:: video 38:: Button 39:: Pricing tab 40 41------------------------------------------------ 42Index Of Script 43----------------------------------------------*/ 44 45(function(jQuery) { 46 47 48 49 "use strict"; 50 51 jQuery(document).ready(function() { 52 53 /*--------------------------------------------------------------------- 54 Tooltip 55 -----------------------------------------------------------------------*/ 56 jQuery('[data-toggle="popover"]').popover(); 57 jQuery('[data-toggle="tooltip"]').tooltip(); 58 59 /*--------------------------------------------------------------------- 60 Fixed Nav 61 -----------------------------------------------------------------------*/ 62 63 $(window).on('scroll', function () { 64 if ($(window).scrollTop() > 0) { 65 $('.iq-top-navbar').addClass('fixed'); 66 } else { 67 $('.iq-top-navbar').removeClass('fixed'); 68 } 69 }); 70 71 $(window).on('scroll', function () { 72 if ($(window).scrollTop() > 0) { 73 $('.white-bg-menu').addClass('sticky-menu'); 74 } else { 75 $('.white-bg-menu').removeClass('sticky-menu'); 76 } 77 }); 78 79 80 /*--------------------------------------------------------------------- 81 Magnific Popup 82 -----------------------------------------------------------------------*/ 83 if(typeof $.fn.magnificPopup !== typeof undefined){ 84 jQuery('.popup-gallery').magnificPopup({ 85 delegate: 'a.popup-img', 86 type: 'image', 87 tLoading: 'Loading image #%curr%...', 88 mainClass: 'mfp-img-mobile', 89 gallery: { 90 enabled: true, 91 navigateByImgClick: true, 92 preload: [0, 1] // Will preload 0 - before current, and 1 after the current image 93 }, 94 image: { 95 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.', 96 titleSrc: function(item) { 97 return item.el.attr('title') + '<small>by Marsel Van Oosten</small>'; 98 } 99 } 100 }); 101 jQuery('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({ 102 disableOn: 700, 103 type: 'iframe', 104 mainClass: 'mfp-fade', 105 removalDelay: 160, 106 preloader: false, 107 fixedContentPos: false 108 }); 109 } 110 111 112 /*--------------------------------------------------------------------- 113 Ripple Effect 114 -----------------------------------------------------------------------*/ 115 jQuery(document).on('click', ".iq-waves-effect", function(e) { 116 // Remove any old one 117 jQuery('.ripple').remove(); 118 // Setup 119 let posX = jQuery(this).offset().left, 120 posY = jQuery(this).offset().top, 121 buttonWidth = jQuery(this).width(), 122 buttonHeight = jQuery(this).height(); 123 124 // Add the element 125 jQuery(this).prepend("<span class='ripple'></span>"); 126 127 128 // Make it round! 129 if (buttonWidth >= buttonHeight) { 130 buttonHeight = buttonWidth; 131 } else { 132 buttonWidth = buttonHeight; 133 } 134 135 // Get the center of the element 136 let x = e.pageX - posX - buttonWidth / 2; 137 let y = e.pageY - posY - buttonHeight / 2; 138 139 140 // Add the ripples CSS and start the animation 141 jQuery(".ripple").css({ 142 width: buttonWidth, 143 height: buttonHeight, 144 top: y + 'px', 145 left: x + 'px' 146 }).addClass("rippleEffect"); 147 }); 148 149 /*--------------------------------------------------------------------- 150 Sidebar Widget 151 -----------------------------------------------------------------------*/ 152 153 jQuery(document).on("click", '.iq-menu > li > a', function() { 154 jQuery('.iq-menu > li > a').parent().removeClass('active'); 155 jQuery(this).parent().addClass('active'); 156 }); 157 158 // Active menu 159 var parents = jQuery('li.active').parents('.iq-submenu.collapse'); 160 161 parents.addClass('show'); 162 163 164 parents.parents('li').addClass('active'); 165 jQuery('li.active > a[aria-expanded="false"]').attr('aria-expanded', 'true'); 166 167 /*--------------------------------------------------------------------- 168 FullScreen 169 -----------------------------------------------------------------------*/ 170 jQuery(document).on('click', '.iq-full-screen', function() { 171 let elem = jQuery(this); 172 if (!document.fullscreenElement && 173 !document.mozFullScreenElement && // Mozilla 174 !document.webkitFullscreenElement && // Webkit-Browser 175 !document.msFullscreenElement) { // MS IE ab version 11 176 177 if (document.documentElement.requestFullscreen) { 178 document.documentElement.requestFullscreen(); 179 } else if (document.documentElement.mozRequestFullScreen) { 180 document.documentElement.mozRequestFullScreen(); 181 } else if (document.documentElement.webkitRequestFullscreen) { 182 document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); 183 } else if (document.documentElement.msRequestFullscreen) { 184 document.documentElement.msRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); 185 } 186 } else { 187 if (document.cancelFullScreen) { 188 document.cancelFullScreen(); 189 } else if (document.mozCancelFullScreen) { 190 document.mozCancelFullScreen(); 191 } else if (document.webkitCancelFullScreen) { 192 document.webkitCancelFullScreen(); 193 } else if (document.msExitFullscreen) { 194 document.msExitFullscreen(); 195 } 196 } 197 elem.find('i').toggleClass('ri-fullscreen-line').toggleClass('ri-fullscreen-exit-line'); 198 }); 199 200 201 /*--------------------------------------------------------------------- 202 Page Loader 203 -----------------------------------------------------------------------*/ 204 jQuery("#load").fadeOut(); 205 jQuery("#loading").delay().fadeOut(""); 206 207 208 /*--------------------------------------------------------------------- 209 Counter 210 -----------------------------------------------------------------------*/ 211 if (window.counterUp !== undefined) { 212 const counterUp = window.counterUp["default"] 213 const $counters = $(".counter"); 214 $counters.each(function (ignore, counter) { 215 var waypoint = new Waypoint( { 216 element: $(this), 217 handler: function() { 218 counterUp(counter, { 219 duration: 1000, 220 delay: 10 221 }); 222 this.destroy(); 223 }, 224 offset: 'bottom-in-view', 225 } ); 226 }); 227 } 228 229 230 /*--------------------------------------------------------------------- 231 Progress Bar 232 -----------------------------------------------------------------------*/ 233 jQuery('.iq-progress-bar > span').each(function() { 234 let progressBar = jQuery(this); 235 let width = jQuery(this).data('percent'); 236 progressBar.css({ 237 'transition': 'width 2s' 238 }); 239 240 setTimeout(function() { 241 progressBar.appear(function() { 242 progressBar.css('width', width + '%'); 243 }); 244 }, 100); 245 }); 246 247 jQuery('.progress-bar-vertical > span').each(function () { 248 let progressBar = jQuery(this); 249 let height = jQuery(this).data('percent'); 250 progressBar.css({ 251 'transition': 'height 2s'
252 }); 253 setTimeout(function () { 254 progressBar.appear(function () { 255 progressBar.css('height', height + '%'); 256 }); 257 }, 100); 258 }); 259 260 261 262 /*--------------------------------------------------------------------- 263 Page Menu 264 -----------------------------------------------------------------------*/ 265 jQuery(document).on('click', '.wrapper-menu', function() { 266 jQuery(this).toggleClass('open'); 267 }); 268 269 jQuery(document).on('click', ".wrapper-menu", function() { 270 jQuery("body").toggleClass("sidebar-main"); 271 }); 272 273 274 /*--------------------------------------------------------------------- 275 Close navbar Toggle 276 -----------------------------------------------------------------------*/ 277 278 jQuery('.close-toggle').on('click', function () { 279 jQuery('.h-collapse.navbar-collapse').collapse('hide'); 280 }); 281 282 283 /*--------------------------------------------------------------------- 284 Mailbox 285 -----------------------------------------------------------------------*/ 286 jQuery(document).on('click', 'ul.iq-email-sender-list li', function () { 287 jQuery(this).next().addClass('show'); 288 // jQuery('.mail-box-detail').css('filter','blur(4px)'); 289 }); 290 291 jQuery(document).on('click', '.email-app-details li h4', function () { 292 jQuery('.email-app-details').removeClass('show'); 293 }); 294 295 /*--------------------------------------------------------------------- 296 chatuser 297 -----------------------------------------------------------------------*/ 298 jQuery(document).on('click', '.chat-head .chat-user-profile', function () { 299 jQuery(this).parent().next().toggleClass('show'); 300 }); 301 jQuery(document).on('click', '.user-profile .close-popup', function () { 302 jQuery(this).parent().parent().removeClass('show'); 303 }); 304 305 /*--------------------------------------------------------------------- 306 chatuser main 307 -----------------------------------------------------------------------*/ 308 jQuery(document).on('click', '.chat-search .chat-profile', function () { 309 jQuery(this).parent().next().toggleClass('show'); 310 }); 311 jQuery(document).on('click', '.user-profile .close-popup', function () { 312 jQuery(this).parent().parent().removeClass('show'); 313 }); 314 315 /*--------------------------------------------------------------------- 316 Chat start 317 -----------------------------------------------------------------------*/ 318 jQuery(document).on('click', '#chat-start', function () { 319 jQuery('.chat-data-left').toggleClass('show'); 320 }); 321 jQuery(document).on('click', '.close-btn-res', function () { 322 jQuery('.chat-data-left').removeClass('show'); 323 }); 324 jQuery(document).on('click', '.iq-chat-ui li', function () { 325 jQuery('.chat-data-left').removeClass('show'); 326 }); 327 jQuery(document).on('click', '.sidebar-toggle', function () { 328 jQuery('.chat-data-left').addClass('show'); 329 }); 330 331 /*--------------------------------------------------------------------- 332 todo Page 333 -----------------------------------------------------------------------*/ 334 jQuery(document).on('click', '.todo-task-list > li > a', function () { 335 jQuery('.todo-task-list li').removeClass('active'); 336 jQuery('.todo-task-list .sub-task').removeClass('show'); 337 jQuery(this).parent().toggleClass('active'); 338 jQuery(this).next().toggleClass('show'); 339 }); 340 jQuery(document).on('click', '.todo-task-list > li li > a', function () { 341 jQuery('.todo-task-list li li').removeClass('active'); 342 jQuery(this).parent().toggleClass('active'); 343 }); 344 345 /*--------------------------------------------------------------------- 346 user toggle 347 -----------------------------------------------------------------------*/ 348 jQuery(document).on('click', '.iq-user-toggle', function() { 349 jQuery(this).parent().addClass('show-data'); 350 }); 351 352 jQuery(document).on('click', ".close-data", function() { 353 jQuery('.iq-user-toggle').parent().removeClass('show-data'); 354 }); 355 jQuery(document).on("click", function(event){ 356 var $trigger = jQuery(".iq-user-toggle"); 357 if($trigger !== event.target && !$trigger.has(event.target).length){ 358 jQuery(".iq-user-toggle").parent().removeClass('show-data'); 359 } 360 }); 361 /*-------hide profile when scrolling--------*/ 362 jQuery(window).scroll(function () { 363 let scroll = jQuery(window).scrollTop(); 364 if (scroll >= 10 && jQuery(".iq-user-toggle").parent().hasClass("show-data")) { 365 jQuery(".iq-user-toggle").parent().removeClass("show-data"); 366 } 367 }); 368 let Scrollbar = window.Scrollbar; 369 if (jQuery('.data-scrollbar').length) { 370 371 Scrollbar.init(document.querySelector('.data-scrollbar'), { continuousScrolling: false }); 372 } 373 374 375 /*--------------------------------------------------------------------- 376 Data tables 377 -----------------------------------------------------------------------*/ 378 if($.fn.DataTable){ 379 $('.data-table').DataTable(); 380 } 381 382 383 384 385 /*--------------------------------------------------------------------- 386 Form Validation 387 -----------------------------------------------------------------------*/ 388 389 // Example starter JavaScript for disabling form submissions if there are invalid fields 390 window.addEventListener('load', function() { 391 // Fetch all the forms we want to apply custom Bootstrap validation styles to 392 var forms = document.getElementsByClassName('needs-validation'); 393 // Loop over them and prevent submission
394 var validation = Array.prototype.filter.call(forms, function(form) { 395 form.addEventListener('submit', function(event) { 396 if (form.checkValidity() === false) { 397 event.preventDefault(); 398 event.stopPropagation(); 399 } 400 form.classList.add('was-validated'); 401 }, false); 402 }); 403 }, false); 404 405 /*--------------------------------------------------------------------- 406 Active Class for Pricing Table 407 -----------------------------------------------------------------------*/ 408 jQuery("#my-table tr th").click(function () { 409 jQuery('#my-table tr th').children().removeClass('active'); 410 jQuery(this).children().addClass('active'); 411 jQuery("#my-table td").each(function () { 412 if (jQuery(this).hasClass('active')) { 413 jQuery(this).removeClass('active') 414 } 415 }); 416 var col = jQuery(this).index(); 417 jQuery("#my-table tr td:nth-child(" + parseInt(col + 1) + ")").addClass('active'); 418 }); 419 420 /*------------------------------------------------------------------ 421 Flatpicker 422 * -----------------------------------------------------------------*/ 423 if (jQuery('.date-input').hasClass('basicFlatpickr')) { 424 jQuery('.basicFlatpickr').flatpickr(); 425 jQuery('#inputTime').flatpickr({ 426 enableTime: true, 427 noCalendar: true, 428 dateFormat: "H:i", 429 }); 430 jQuery('#inputDatetime').flatpickr({ 431 enableTime: true 432 }); 433 jQuery('#inputWeek').flatpickr({ 434 weekNumbers: true 435 }); 436 jQuery("#inline-date").flatpickr({ 437 inline: true 438 }); 439 jQuery("#inline-date1").flatpickr({ 440 inline: true 441 }); 442 } 443 444 /*--------------------------------------------------------------------- 445 Scrollbar 446 -----------------------------------------------------------------------*/ 447 448 jQuery(window).on("resize", function () { 449 if (jQuery(this).width() <= 1299) { 450 jQuery('#salon-scrollbar').addClass('data-scrollbar'); 451 } else { 452 jQuery('#salon-scrollbar').removeClass('data-scrollbar'); 453 } 454 }).trigger('resize'); 455 456 jQuery('.data-scrollbar').each(function () { 457 var attr = $(this).attr('data-scroll'); 458 if (typeof attr !== typeof undefined && attr !== false){ 459 let Scrollbar = window.Scrollbar; 460 var a = jQuery(this).data('scroll'); 461 Scrollbar.init(document.querySelector('div[data-scroll= "' + a + '"]')); 462 } 463 }); 464 465 466 /*--------------------------------------------------------------------- 467 Datatables 468 -----------------------------------------------------------------------*/ 469 if(jQuery('.data-tables').length) 470 { 471 $('.data-tables').DataTable(); 472 } 473 474 475 /*--------------------------------------------------------------------- 476 image-upload 477 -----------------------------------------------------------------------*/ 478 479 $('.form_gallery-upload').on('change', function() { 480 var length = $(this).get(0).files.length; 481 var galleryLabel = $(this).attr('data-name'); 482 483 if( length > 1 ){ 484 $(galleryLabel).text(length + " files selected"); 485 } else { 486 $(galleryLabel).text($(this)[0].files[0].name); 487 } 488 }); 489 490 /*--------------------------------------------------------------------- 491 video 492 -----------------------------------------------------------------------*/ 493 $(document).ready(function(){ 494 $('.form_video-upload input').change(function () { 495 $('.form_video-upload p').text(this.files.length + " file(s) selected"); 496 }); 497 }); 498 499 500 /*--------------------------------------------------------------------- 501 Button 502 -----------------------------------------------------------------------*/ 503 504 jQuery('.qty-btn').on('click',function(){ 505 var id = jQuery(this).attr('id'); 506
507 var val = parseInt(jQuery('#quantity').val()); 508 509 if(id == 'btn-minus') 510 { 511 if(val != 0) 512 { 513 jQuery('#quantity').val(val-1); 514 } 515 else 516 { 517 jQuery('#quantity').val(0); 518 } 519 520 } 521 else 522 { 523 jQuery('#quantity').val(val+1); 524 } 525 }); 526 if ($.fn.select2 !== undefined) { 527 $("#single").select2({ 528 placeholder: "Select a Option", 529 allowClear: true 530 }); 531 $("#multiple").select2({ 532 placeholder: "Select a Multiple Option", 533 allowClear: true 534 }); 535 $("#multiple2").select2({ 536 placeholder: "Select a Multiple Option", 537 allowClear: true 538 }); 539 } 540 541 /*--------------------------------------------------------------------- 542 Pricing tab 543 -----------------------------------------------------------------------*/ 544 jQuery(window).on('scroll', function (e) { 545 546 // Pricing Pill Tab 547 var nav = jQuery('#pricing-pills-tab'); 548 if (nav.length) { 549 var contentNav = nav.offset().top - window.outerHeight; 550 if (jQuery(window).scrollTop() >= (contentNav)) { 551 e.preventDefault(); 552 jQuery('#pricing-pills-tab li a').removeClass('active'); 553 jQuery('#pricing-pills-tab li a[aria-selected=true]').addClass('active'); 554 } 555 } 556 }); 557 558 }); 559 560})(jQuery);
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.