Produced by Araxis Merge on 2023-03-13 03:01:06 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | Porto v4.0.4/Porto Theme/app/design/frontend/Smartwave/porto/Magento_Theme/web/js | theme.js | 2021-05-01 08:24:10 +0000 |
| 2 | Porto v4.0.5/Porto Theme/app/design/frontend/Smartwave/porto/Magento_Theme/web/js | theme.js | 2023-03-10 04:03:35 +0000 |
| Description | Between Files 1 and 2 | |
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 4 | 402 |
| Changed | 3 | 6 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | Consecutive whitespace is treated as a single space |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
| Active line-pairing rules |
No regular expressions were active.
| 1 | /** | 1 | /** | |||
| 2 | * Copyright © 2015 Magento. All rights reserved. | 2 | * Copyright © 2015 Magento. All rights reserved. | |||
| 3 | * See COPYING.txt for license details. | 3 | * See COPYING.txt for license details. | |||
| 4 | */ | 4 | */ | |||
| 5 | require([ | 5 | require([ | |||
| 6 | 'jquery', | 6 | 'jquery', | |||
| 7 | 'mage/smart-keyboard-handler', | 7 | 'mage/smart-keyboard-handler', | |||
| 8 | 'mage/mage', | 8 | 'mage/mage', | |||
| 9 | 'mage/ie-class-fixer', | 9 | 'mage/ie-class-fixer', | |||
| 10 | 'domReady!' | 10 | 'domReady!' | |||
| 11 | ], function ($, keyboardHandler) { | 11 | ], function ($, keyboardHandler) { | |||
| 12 | 'use strict'; | 12 | 'use strict'; | |||
| 13 | $(document).ready(function(){ | 13 | $(document).ready(function(){ | |||
| 14 | $('.cart-summary').mage('sticky', { | 14 | $('.cart-summary').mage('sticky', { | |||
| 15 | container: '#maincontent' | 15 | container: '#maincontent' | |||
| 16 | }); | 16 | }); | |||
| 17 | 17 | |||||
| 18 | $('.panel.header .header.links').clone().appendTo('#store\\.links'); | 18 | $('.panel.header .header.links').clone().appendTo('#store\\.links'); | |||
| 19 | }); | 19 | }); | |||
| 20 | keyboardHandler.apply(); | 20 | keyboardHandler.apply(); | |||
| 21 | }); | 21 | }); | |||
| 22 | require([ | 22 | require([ | |||
| 23 | 'jquery' | 23 | 'jquery' | |||
| 24 | ], function ($) { | 24 | ], function ($) { | |||
| 25 | (function() { | 25 | (function() { | |||
| 26 | var ev = new $.Event('classadded'), | 26 | var ev = new $.Event('classadded'), | |||
| 27 | orig = $.fn.addClass; | 27 | orig = $.fn.addClass; | |||
| 28 | $.fn.addClass = function() { | 28 | $.fn.addClass = function() { | |||
| 29 | $(this).trigger(ev, arguments); | 29 | $(this).trigger(ev, arguments); | |||
| 30 | return orig.apply(this, arguments); | 30 | return orig.apply(this, arguments); | |||
| 31 | } | 31 | } | |||
| 32 | })(); | 32 | })(); | |||
| 33 | $.fn.extend({ | 33 | $.fn.extend({ | |||
| 34 | scrollToMe: function(){ | 34 | scrollToMe: function(){ | |||
| 35 | if($(this).length){ | 35 | if($(this).length){ | |||
| 36 | var top = $(this).offset().top - 100; | 36 | var top = $(this).offset().top - 100; | |||
| 37 | $('html,body').animate({scrollTop: top}, 300); | 37 | $('html,body').animate({scrollTop: top}, 300); | |||
| 38 | } | 38 | } | |||
| 39 | }, | 39 | }, | |||
| 40 | scrollToJustMe: function(){ | 40 | scrollToJustMe: function(){ | |||
| 41 | if($(this).length){ | 41 | if($(this).length){ | |||
| 42 | var top = jQuery(this).offset().top; | 42 | var top = jQuery(this).offset().top; | |||
| 43 | $('html,body').animate({scrollTop: top}, 300); | 43 | $('html,body').animate({scrollTop: top}, 300); | |||
| 44 | } | 44 | } | |||
| 45 | } | 45 | } | |||
| 46 | }); | 46 | }); | |||
| 47 | $(document).ready(function(){ | 47 | $(document).ready(function(){ | |||
| 48 | var windowScroll_t; | 48 | var windowScroll_t; | |||
| 49 | $(window).scroll(function(){ | 49 | $(window).scroll(function(){ | |||
| 50 | clearTimeout(windowScroll_t); | 50 | clearTimeout(windowScroll_t); | |||
| 51 | windowScroll_t = setTimeout(function(){ | 51 | windowScroll_t = setTimeout(function(){ | |||
| 52 | if(jQuery(this).scrollTop() > 100){ | 52 | if(jQuery(this).scrollTop() > 100){ | |||
| 53 | $('#totop').fadeIn(); | 53 | $('#totop').fadeIn(); | |||
| 54 | }else{ | 54 | }else{ | |||
| 55 | $('#totop').fadeOut(); | 55 | $('#totop').fadeOut(); | |||
| 56 | } | 56 | } | |||
| 57 | }, 500); | 57 | }, 500); | |||
| 58 | }); | 58 | }); | |||
| 59 | $('#totop').off("click").on("click",function(){ | 59 | $('#totop').off("click").on("click",function(){ | |||
| 60 | $('html, body').animate({scrollTop: 0}, 600); | 60 | $('html, body').animate({scrollTop: 0}, 600); | |||
| 61 | }); | 61 | }); | |||
| 62 | if ($('body').hasClass('checkout-cart-index')) { | 62 | if ($('body').hasClass('checkout-cart-index')) { | |||
| 63 | if ($('#co-shipping-method-form .fieldset.rates').length > 0 && $('#co-shipping-method-form .fieldset.rates :checked').length === 0) { | 63 | if ($('#co-shipping-method-form .fieldset.rates').length > 0 && $('#co-shipping-method-form .fieldset.rates :checked').length === 0) { | |||
| 64 | $('#block-shipping').on('collapsiblecreate', function () { | 64 | $('#block-shipping').on('collapsiblecreate', function () { | |||
| 65 | $('#block-shipping').collapsible('forceActivate'); | 65 | $('#block-shipping').collapsible('forceActivate'); | |||
| 66 | }); | 66 | }); | |||
| 67 | } | 67 | } | |||
| 68 | } | 68 | } | |||
| 69 | $(".products-grid .weltpixel-quickview").each(function(){ | 69 | $(".products-grid .weltpixel-quickview").each(function(){ | |||
| 70 | $(this).appendTo($(this).parent().parent().children(".product-item-photo")); | 70 | $(this).appendTo($(this).parent().parent().children(".product-item-photo")); | |||
| 71 | }); | 71 | }); | |||
| 72 | $(".word-rotate").each(function() { | 72 | $(".word-rotate").each(function() { | |||
| 73 | 73 | |||||
| 74 | var $this = $(this), | 74 | var $this = $(this), | |||
| 75 | itemsWrapper = $(this).find(".word-rotate-items"), | 75 | itemsWrapper = $(this).find(".word-rotate-items"), | |||
| 76 | items = itemsWrapper.find("> span"), | 76 | items = itemsWrapper.find("> span"), | |||
| 77 | firstItem = items.eq(0), | 77 | firstItem = items.eq(0), | |||
| 78 | firstItemClone = firstItem.clone(), | 78 | firstItemClone = firstItem.clone(), | |||
| 79 | itemHeight = 0, | 79 | itemHeight = 0, | |||
| 80 | currentItem = 1, | 80 | currentItem = 1, | |||
| 81 | currentTop = 0; | 81 | currentTop = 0; | |||
| 82 | 82 | |||||
| 83 | itemHeight = firstItem.height(); | 83 | itemHeight = firstItem.height(); | |||
| 84 | 84 | |||||
| 85 | itemsWrapper.append(firstItemClone); | 85 | itemsWrapper.append(firstItemClone); | |||
| 86 | 86 | |||||
| 87 | $this | 87 | $this | |||
| 88 | .height(itemHeight) | 88 | .height(itemHeight) | |||
| 89 | .addClass("active"); | 89 | .addClass("active"); | |||
| 90 | 90 | |||||
| 91 | setInterval(function() { | 91 | setInterval(function() { | |||
| 92 | currentTop = (currentItem * itemHeight); | 92 | currentTop = (currentItem * itemHeight); | |||
| 93 | 93 | |||||
| 94 | itemsWrapper.animate({ | 94 | itemsWrapper.animate({ | |||
| 95 | top: -(currentTop) + "px" | 95 | top: -(currentTop) + "px" | |||
| 96 | }, 300, function() { | 96 | }, 300, function() { | |||
| 97 | currentItem++; | 97 | currentItem++; | |||
| 98 | if(currentItem > items.length) { | 98 | if(currentItem > items.length) { | |||
| 99 | itemsWrapper.css("top", 0); | 99 | itemsWrapper.css("top", 0); | |||
| 100 | currentItem = 1; | 100 | currentItem = 1; | |||
| 101 | } | 101 | } | |||
| 102 | }); | 102 | }); | |||
| 103 | 103 | |||||
| 104 | }, 2000); | 104 | }, 2000); | |||
| 105 | 105 | |||||
| 106 | }); | 106 | }); | |||
| 107 | $(".top-links-icon").off("click").on("click", function(e){ | 107 | $(".top-links-icon").off("click").on("click", function(e){ | |||
| 108 | if($(this).parent().children("ul.links").hasClass("show")) { | 108 | if($(this).parent().children("ul.links").hasClass("show")) { | |||
| 109 | $(this).parent().children("ul.links").removeClass("show"); | 109 | $(this).parent().children("ul.links").removeClass("show"); | |||
| 110 | } else { | 110 | } else { | |||
| 111 | $(this).parent().children("ul.links").addClass("show"); | 111 | $(this).parent().children("ul.links").addClass("show"); | |||
| 112 | } | 112 | } | |||
| 113 | e.stopPropagation(); | 113 | e.stopPropagation(); | |||
| 114 | }); | 114 | }); | |||
| 115 | $(".top-links-icon").parent().click(function(e){ | 115 | $(".top-links-icon").parent().click(function(e){ | |||
| 116 | e.stopPropagation(); | 116 | e.stopPropagation(); | |||
| 117 | }); | 117 | }); | |||
| 118 | $(".search-toggle-icon").click(function(e){ | 118 | $(".search-toggle-icon").click(function(e){ | |||
| 119 | if($(this).parent().children(".block-search").hasClass("show")) { | 119 | if($(this).parent().children(".block-search").hasClass("show")) { | |||
| 120 | $(this).parent().children(".block-search").removeClass("show"); | 120 | $(this).parent().children(".block-search").removeClass("show"); | |||
| 121 | $(this).removeClass('open'); | 121 | $(this).removeClass('open'); | |||
| 122 | } else { | 122 | } else { | |||
| 123 | $(this).parent().children(".block-search").addClass("show"); | 123 | $(this).parent().children(".block-search").addClass("show"); | |||
| 124 | $(this).addClass('open'); | 124 | $(this).addClass('open'); | |||
| 125 | } | 125 | } | |||
| 126 | e.stopPropagation(); | 126 | e.stopPropagation(); | |||
| 127 | }); | 127 | }); | |||
| 128 | $(".search-toggle-icon").parent().click(function(e){ | 128 | $(".search-toggle-icon").parent().click(function(e){ | |||
| 129 | e.stopPropagation(); | 129 | e.stopPropagation(); | |||
| 130 | }); | 130 | }); | |||
| 131 | $("html,body").click(function(){ | 131 | $("html,body").click(function(){ | |||
| 132 | $(".search-toggle-icon").parent().children(".block-search").removeClass("show"); | 132 | $(".search-toggle-icon").parent().children(".block-search").removeClass("show"); | |||
| 133 | $('.autocomplete-suggestions').hide(); | 133 | $('.autocomplete-suggestions').hide(); | |||
| 134 | $(".search-toggle-icon").removeClass('open'); | 134 | $(".search-toggle-icon").removeClass('open'); | |||
| 135 | $(".top-links-icon").parent().children("ul.links").removeClass("show"); | 135 | $(".top-links-icon").parent().children("ul.links").removeClass("show"); | |||
| 136 | }); | 136 | }); | |||
| 137 | 137 | |||||
| 138 | /********************* Qty Holder **************************/ | 138 | /********************* Qty Holder **************************/ | |||
| 139 | $(document).on("click", ".qtyplus", function(e) { | 139 | $(document).on("click", ".qtyplus", function(e) { | |||
| 140 | // Stop acting like a button | 140 | // Stop acting like a button | |||
| 141 | e.preventDefault(); | 141 | e.preventDefault(); | |||
| 142 | // Get its current value | 142 | // Get its current value | |||
| 143 | var currentVal = parseInt($(this).parents('form').find('input[name="qty"]').val()); | 143 | var currentVal = parseInt($(this).parents('form').find('input[name="qty"]').val()); | |||
| 144 | // If is not undefined | 144 | // If is not undefined | |||
| 145 | if (!isNaN(currentVal)) { | 145 | if (!isNaN(currentVal)) { | |||
| 146 | // Increment | 146 | // Increment | |||
| 147 | $(this).parents('form').find('input[name="qty"]').val(currentVal + 1); | 147 | $(this).parents('form').find('input[name="qty"]').val(currentVal + 1); | |||
| 148 | } else { | 148 | } else { | |||
| 149 | // Otherwise put a 0 there | 149 | // Otherwise put a 0 there | |||
| 150 | $(this).parents('form').find('input[name="qty"]').val(0); | 150 | $(this).parents('form').find('input[name="qty"]').val(0); | |||
| 151 | } | 151 | } | |||
| 152 | }); | 152 | }); | |||
| 153 | // This button will decrement the value till 0 | 153 | // This button will decrement the value till 0 | |||
| 154 | $(document).on("click", ".qtyminus", function(e) { | 154 | $(document).on("click", ".qtyminus", function(e) { | |||
| 155 | // Stop acting like a button | 155 | // Stop acting like a button | |||
| 156 | e.preventDefault(); | 156 | e.preventDefault(); | |||
| 157 | // Get the field name | 157 | // Get the field name | |||
| 158 | fieldName = $(this).attr('field'); | 158 | fieldName = $(this).attr('field'); | |||
| 159 | // Get its current value | 159 | // Get its current value | |||
| 160 | var currentVal = parseInt($(this).parents('form').find('input[name="qty"]').val()); | 160 | var currentVal = parseInt($(this).parents('form').find('input[name="qty"]').val()); | |||
| 161 | // If it isn't undefined or its greater than 0 | 161 | // If it isn't undefined or its greater than 0 | |||
| 162 | if (!isNaN(currentVal) && currentVal > 0) { | 162 | if (!isNaN(currentVal) && currentVal > 0) { | |||
| 163 | // Decrement one | 163 | // Decrement one | |||
| 164 | $(this).parents('form').find('input[name="qty"]').val(currentVal - 1); | 164 | $(this).parents('form').find('input[name="qty"]').val(currentVal - 1); | |||
| 165 | } else { | 165 | } else { | |||
| 166 | // Otherwise put a 0 there | 166 | // Otherwise put a 0 there | |||
| 167 | $(this).parents('form').find('input[name="qty"]').val(0); | 167 | $(this).parents('form').find('input[name="qty"]').val(0); | |||
| 168 | } | 168 | } | |||
| 169 | }); | 169 | }); | |||
| 170 | $(".qty-inc").unbind('click').click(function(){ | 170 | $(".qty-inc").unbind('click').click(function(){ | |||
| 171 | if($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").is(':enabled')){ | 171 | if($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").is(':enabled')){ | |||
| 172 | $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val((+$(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val() + 1) || 0); | 172 | $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val((+$(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val() + 1) || 0); | |||
| 173 | $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").trigger('change'); | 173 | $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").trigger('change'); | |||
| 174 | $(this).focus(); | 174 | $(this).focus(); | |||
| 175 | } | 175 | } | |||
| 176 | }); | 176 | }); | |||
| 177 | $(".qty-dec").unbind('click').click(function(){ | 177 | $(".qty-dec").unbind('click').click(function(){ | |||
| 178 | if($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").is(':enabled')){ | 178 | if($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").is(':enabled')){ | |||
| 179 | $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val(($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val() - 1 > 0) ? ($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val() - 1) : 0); | 179 | $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val(($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val() - 1 > 0) ? ($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val() - 1) : 0); | |||
| 180 | $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").trigger('change'); | 180 | $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").trigger('change'); | |||
| 181 | $(this).focus(); | 181 | $(this).focus(); | |||
| 182 | } | 182 | } | |||
| 183 | }); | 183 | }); | |||
| 184 | }); | 184 | }); | |||
| 185 | }); | 185 | }); | |||
| 186 | require([ | 186 | require([ | |||
| 187 | 'jquery', | 187 | 'jquery', | |||
| 188 | 'js/jquery.lazyload' | 188 | 'js/jquery.lazyload' | |||
| 189 | ], function ($) { | 189 | ], function ($) { | |||
| 190 | $(document).ready(function(){ | 190 | $(document).ready(function(){ | |||
| 191 | $("img.porto-lazyload:not(.porto-lazyload-loaded)").lazyload({effect:"fadeIn" | 191 | $("img.porto-lazyload:not(.porto-lazyload-loaded)").lazyload({effect:"fadeIn", effect_speed: 400 }); | |||
| 192 | if ($('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').length) { | 192 | if ($('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').length) { | |||
| 193 | $('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').on('changed.owl.carousel', function() { | 193 | $('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').on('initialized.owl.carousel', function() { | |||
| 194 | $(this).find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear'); | 194 | $(this).find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear'); | |||
| 195 | }); | 195 | }); | |||
| 196 | $('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').on('initialized.owl.carousel', function() { | 196 | $('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').on('changed.owl.carousel', function() { | |||
| 197 | $(this).find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear'); | 197 | $(this).find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear'); | |||
| 198 | }); | 198 | }); | |||
| 199 | } | 199 | } | |||
| 200 | window.setTimeout(function(){ | 200 | window.setTimeout(function(){ | |||
| 201 | $('.sidebar-filterproducts').find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear'); | 201 | $('.sidebar-filterproducts').find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear'); | |||
| 202 | },500); | 202 | },500); | |||
| 203 | }); | 203 | }); | |||
| 204 | }); | 204 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993–2019 Araxis Ltd (www.araxis.com). All rights reserved.