345. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2021-05-13 09:09:14 +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.

345.1 Files compared

#LocationFileLast Modified
1/Applications/Ampps/www/Porto 3.2.2/Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/web/jsjquery.infinite-scroller.js2018-06-17 01:47:34 +0000
2/Applications/Ampps/www/Porto v4.0.0/Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/web/jsjquery.infinite-scroller.js2018-06-17 01:47:34 +0000

345.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged1298
Changed00
Inserted00
Removed00

345.3 Comparison options

WhitespaceConsecutive whitespace is treated as a single space
Character caseDifferences in character case are significant
Line endingsDifferences in line endings (CR and LF characters) are ignored
CR/LF charactersNot shown in the comparison detail
Active line-pairing rules

345.4 Active regular expressions

No regular expressions were active.

345.5 Comparison detail

1 define([ 1 define([
2     'jquery' 2     'jquery'
3 ], function ($) { 3 ], function ($) {
4     "use strict"; 4     "use strict";
5     $.widget('smartwave.infiniteScroll', { 5     $.widget('smartwave.infiniteScroll', {
6         options: { 6         options: {
7             productsListSelector: '#layer-product-list', 7             productsListSelector: '#layer-product-list',
8             next_page: '', 8             next_page: '',
9             loading: false, 9             loading: false,
10             infinite_loaded_count: 0, 10             infinite_loaded_count: 0,
11             active: false 11             active: false
12         }, 12         },
13         _create: function () { 13         _create: function () {
14             this.inFinite(); 14             this.inFinite();
15         }, 15         },
16         inFinite: function(){ 16         inFinite: function(){
17             var self = this; 17             var self = this;
18             self.options.next_page = ""; 18             self.options.next_page = "";
19             if($(self.options.productsListSelector +' .infinite-loader').length > 0){ 19             if($(self.options.productsListSelector +' .infinite-loader').length > 0){
20                 self.options.active = true; 20                 self.options.active = true;
21             } 21             }
22             $(".pages-items li > a.next").each(function(){ 22             $(".pages-items li > a.next").each(function(){
23                 self.options.next_page = $(this).attr("href"); 23                 self.options.next_page = $(this).attr("href");
24             }); 24             });
25             $(window).scroll(function(){ 25             $(window).scroll(function(){
26                 if(!self.options.loading && self.options.active && self.options.next_page && $(window).scrollTop() >= $(".infinite-loader").offset().top-$(window).height()+100){ 26                 if(!self.options.loading && self.options.active && self.options.next_page && $(window).scrollTop() >= $(".infinite-loader").offset().top-$(window).height()+100){
27                     if(self.options.infinite_loaded_count < 2){ 27                     if(self.options.infinite_loaded_count < 2){
28                         self.options.loading = true; 28                         self.options.loading = true;
29                         $(".pages-items li > a.next").each(function(){ 29                         $(".pages-items li > a.next").each(function(){
30                             self.options.next_page = $(this).attr("href"); 30                             self.options.next_page = $(this).attr("href");
31                         }); 31                         });
32                         self.ajaxInfinite(self.options.next_page); 32                         self.ajaxInfinite(self.options.next_page);
33                     } 33                     }
34                 } 34                 }
35             }); 35             });
36             $(".infinite-loader .btn-load-more").click(function(){ 36             $(".infinite-loader .btn-load-more").click(function(){
37                 if(!self.options.loading && self.options.next_page && self.options.infinite_loaded_count >= 2){ 37                 if(!self.options.loading && self.options.next_page && self.options.infinite_loaded_count >= 2){
38                     self.options.loading = true; 38                     self.options.loading = true;
39                     self.ajaxInfinite(self.options.next_page); 39                     self.ajaxInfinite(self.options.next_page);
40                 } 40                 }
41             }); 41             });
42         }, 42         },
43         ajaxInfinite: function (submitUrl) { 43         ajaxInfinite: function (submitUrl) {
44             var self = this; 44             var self = this;
45             self.options.infinite_loaded_count++; 45             self.options.infinite_loaded_count++;
46             $('.infinite-loader .btn-load-more').hide(); 46             $('.infinite-loader .btn-load-more').hide();
47             $('.infinite-loader .loading').fadeIn(300); 47             $('.infinite-loader .loading').fadeIn(300);
48             $.ajax({ 48             $.ajax({
49                 type: 'GET', 49                 type: 'GET',
50                 url: submitUrl, 50                 url: submitUrl,
51                 dataType: "html", 51                 dataType: "html",
52                 beforeSend: function () { 52                 beforeSend: function () {
53                     $('.infinite-loader .btn-load-more').hide(); 53                     $('.infinite-loader .btn-load-more').hide();
54                     $('.infinite-loader .loading').fadeIn(300); 54                     $('.infinite-loader .loading').fadeIn(300);
55                 }, 55                 },
56                 success: function (res) { 56                 success: function (res) {
57                     self.options.loading = false; 57                     self.options.loading = false;
58                     var items = $(res).find(self.options.productsListSelector +' .product-items .item'); 58                     var items = $(res).find(self.options.productsListSelector +' .product-items .item');
59                     var b = $('<div/>').html($(res).find(self.options.productsListSelector)); 59                     var b = $('<div/>').html($(res).find(self.options.productsListSelector));
60                     if (items.length > 0) { 60                     if (items.length > 0) {
61                         if($(b).find('div.products-grid')){ 61                         if($(b).find('div.products-grid')){
62                             $(self.options.productsListSelector + ' .products.wrapper').last() 62                             $(self.options.productsListSelector + ' .products.wrapper').last()
63                                 .after($(res).find(self.options.productsListSelector +' div.products-grid.wrapper').detach()) 63                                 .after($(res).find(self.options.productsListSelector +' div.products-grid.wrapper').detach())
64                                 .trigger('contentUpdated'); 64                                 .trigger('contentUpdated');
65                         } 65                         }
66                         if($(b).find('div.products-list')){ 66                         if($(b).find('div.products-list')){
67                             $(self.options.productsListSelector + ' .products.wrapper').last() 67                             $(self.options.productsListSelector + ' .products.wrapper').last()
68                                 .after($(res).find(self.options.productsListSelector +' div.products-list.wrapper').detach()) 68                                 .after($(res).find(self.options.productsListSelector +' div.products-list.wrapper').detach())
69                                 .trigger('contentUpdated'); 69                                 .trigger('contentUpdated');
70                         } 70                         }
71                         if($(b).find('.pages a.next').length>0){ 71                         if($(b).find('.pages a.next').length>0){
72                             $(self.options.productsListSelector + ' .pages a.next').attr('href', $(res).find('.pages a.next').attr('href')); 72                             $(self.options.productsListSelector + ' .pages a.next').attr('href', $(res).find('.pages a.next').attr('href'));
73                         }else{ 73                         }else{
74                             $(self.options.productsListSelector + ' .pages a.next').remove(); 74                             $(self.options.productsListSelector + ' .pages a.next').remove();
75                         } 75                         }
76                         $(b).remove(); 76                         $(b).remove();
77                         $("form[data-role=tocart-form]").catalogAddToCart(); 77                         $("form[data-role=tocart-form]").catalogAddToCart();
78                         $('.main .products.grid .product-items li.product-item:nth-child(2n)').addClass('nth-child-2n'); 78                         $('.main .products.grid .product-items li.product-item:nth-child(2n)').addClass('nth-child-2n');
79                         $('.main .products.grid .product-items li.product-item:nth-child(2n+1)').addClass('nth-child-2np1'); 79                         $('.main .products.grid .product-items li.product-item:nth-child(2n+1)').addClass('nth-child-2np1');
80                         $('.main .products.grid .product-items li.product-item:nth-child(3n)').addClass('nth-child-3n'); 80                         $('.main .products.grid .product-items li.product-item:nth-child(3n)').addClass('nth-child-3n');
81                         $('.main .products.grid .product-items li.product-item:nth-child(3n+1)').addClass('nth-child-3np1'); 81                         $('.main .products.grid .product-items li.product-item:nth-child(3n+1)').addClass('nth-child-3np1');
82                         $('.main .products.grid .product-items li.product-item:nth-child(4n)').addClass('nth-child-4n'); 82                         $('.main .products.grid .product-items li.product-item:nth-child(4n)').addClass('nth-child-4n');
83                         $('.main .products.grid .product-items li.product-item:nth-child(4n+1)').addClass('nth-child-4np1'); 83                         $('.main .products.grid .product-items li.product-item:nth-child(4n+1)').addClass('nth-child-4np1');
84                         $('.main .products.grid .product-items li.product-item:nth-child(5n)').addClass('nth-child-5n'); 84                         $('.main .products.grid .product-items li.product-item:nth-child(5n)').addClass('nth-child-5n');
85                         $('.main .products.grid .product-items li.product-item:nth-child(5n+1)').addClass('nth-child-5np1'); 85                         $('.main .products.grid .product-items li.product-item:nth-child(5n+1)').addClass('nth-child-5np1');
86                         $('.main .products.grid .product-items li.product-item:nth-child(6n)').addClass('nth-child-6n'); 86                         $('.main .products.grid .product-items li.product-item:nth-child(6n)').addClass('nth-child-6n');
87                         $('.main .products.grid .product-items li.product-item:nth-child(6n+1)').addClass('nth-child-6np1'); 87                         $('.main .products.grid .product-items li.product-item:nth-child(6n+1)').addClass('nth-child-6np1');
88                         $('.main .products.grid .product-items li.product-item:nth-child(7n)').addClass('nth-child-7n'); 88                         $('.main .products.grid .product-items li.product-item:nth-child(7n)').addClass('nth-child-7n');
89                         $('.main .products.grid .product-items li.product-item:nth-child(7n+1)').addClass('nth-child-7np1'); 89                         $('.main .products.grid .product-items li.product-item:nth-child(7n+1)').addClass('nth-child-7np1');
90                         $('.main .products.grid .product-items li.product-item:nth-child(8n)').addClass('nth-child-8n'); 90                         $('.main .products.grid .product-items li.product-item:nth-child(8n)').addClass('nth-child-8n');
91                         $('.main .products.grid .product-items li.product-item:nth-child(8n+1)').addClass('nth-child-8np1'); 91                         $('.main .products.grid .product-items li.product-item:nth-child(8n+1)').addClass('nth-child-8np1');
92                         var hist = submitUrl; 92                         var hist = submitUrl;
93                         if(submitUrl.indexOf("p=") > -1){ 93                         if(submitUrl.indexOf("p=") > -1){
94                             var len = submitUrl.length-submitUrl.indexOf("p="); 94                             var len = submitUrl.length-submitUrl.indexOf("p=");
95                             var str_temp = submitUrl.substr(submitUrl.indexOf("p="),len); 95                             var str_temp = submitUrl.substr(submitUrl.indexOf("p="),len);
96                             var page_param = ""; 96                             var page_param = "";
97                             if(str_temp.indexOf("&") == -1){ 97                             if(str_temp.indexOf("&") == -1){
98                                 page_param = str_temp; 98                                 page_param = str_temp;
99                             } else { 99                             } else {
100                                 page_param = str_temp.substr(0,str_temp.indexOf("&")); 100                                 page_param = str_temp.substr(0,str_temp.indexOf("&"));
101                             } 101                             }
102                             hist = submitUrl.replace(page_param, ""); 102                             hist = submitUrl.replace(page_param, "");
103                         } 103                         }
104                         if (typeof window.history.pushState === 'function') { 104                         if (typeof window.history.pushState === 'function') {
105                             window.history.pushState({url: hist}, '', hist); 105                             window.history.pushState({url: hist}, '', hist);
106                         } 106                         }
107                         if(typeof enable_quickview != 'undefined' && enable_quickview == true) { 107                         if(typeof enable_quickview != 'undefined' && enable_quickview == true) {
108                             requirejs(['jquery', 'weltpixel_quickview' ], 108                             requirejs(['jquery', 'weltpixel_quickview' ],
109                                 function($, quickview) { 109                                 function($, quickview) {
110                                     $('.weltpixel-quickview').off('click').on('click', function() { 110                                     $('.weltpixel-quickview').off('click').on('click', function() {
111                                         var prodUrl = $(this).attr('data-quickview-url'); 111                                         var prodUrl = $(this).attr('data-quickview-url');
112                                         if (prodUrl.length) { 112                                         if (prodUrl.length) {
113                                             quickview.displayContent(prodUrl); 113                                             quickview.displayContent(prodUrl);
114                                         } 114                                         }
115                                     }); 115                                     });
116                                 }); 116                                 });
117                         } 117                         }
118                         $(".products-grid .weltpixel-quickview").each(function(){ 118                         $(".products-grid .weltpixel-quickview").each(function(){
119                             $(this).appendTo($(this).parent().parent().children(".product-item-photo")); 119                             $(this).appendTo($(this).parent().parent().children(".product-item-photo"));
120                         }); 120                         });
121                         self.options.next_page = ""; 121                         self.options.next_page = "";
122                         $(".pages-items li > a.next").each(function(){ 122                         $(".pages-items li > a.next").each(function(){
123                             self.options.next_page = $(this).attr("href"); 123                             self.options.next_page = $(this).attr("href");
124                         }); 124                         });
125                         if(self.options.infinite_loaded_count >= 2){ 125                         if(self.options.infinite_loaded_count >= 2){
126                             $('.infinite-loader .loading').hide(); 126                             $('.infinite-loader .loading').hide();
127                             if(self.options.next_page){ 127                             if(self.options.next_page){
128                                 $('.infinite-loader .btn-load-more').show(); 128                                 $('.infinite-loader .btn-load-more').show();
129                                 $(".infinite-loader .btn-load-more").unbind("click").click(function(){ 129                                 $(".infinite-loader .btn-load-more").unbind("click").click(function(){
130                                     if(!self.options.loading && self.options.next_page && self.options.infinite_loaded_count >= 2){ 130                                     if(!self.options.loading && self.options.next_page && self.options.infinite_loaded_count >= 2){
131                                         self.options.loading = true; 131                                         self.options.loading = true;
132                                         self.ajaxInfinite(self.options.next_page); 132                                         self.ajaxInfinite(self.options.next_page);
133                                     } 133                                     }
134                                 }); 134                                 });
135                             } 135                             }
136                         } else { 136                         } else {
137                             $('.infinite-loader .loading').fadeOut(300); 137                             $('.infinite-loader .loading').fadeOut(300);
138                         } 138                         }
139                     } 139                     }
140  140 
141                 }, 141                 },
142                 error: function () { 142                 error: function () {
143                     window.location.reload(); 143                     window.location.reload();
144                 } 144                 }
145             }); 145             });
146         } 146         }
147     }); 147     });
148     return $.smartwave.infiniteScroll; 148     return $.smartwave.infiniteScroll;
149 }); 149 });