1;(function(w, $) { 2 var jList = function(node, params) { 3 this.node = node; 4 this.parent = null; 5 this.params = params; 6 this.nextBtn = null; 7 this.holded = false; 8 9 this.init(); 10 } 11 jList.prototype.init = function() { 12 var node, _load, p, r, that = this, d = 40, 13 lazy = this.params.lazyLoad || false; 14 15 node = jUtil.Find('item', 'data-role', null, this.node); 16 if(!node.length) return; 17 this.parent = node[0].parentNode; 18 19 $(this.node).bind('load', function(e, d) { 20 that.load(d, true); 21 }) 22 23 node = jUtil.Find('next-page', 'data-role', null, this.node); 24 if(!node.length) return; 25 this.nextBtn = node[0]; 26 27 _load = function(e) { 28 if(!that.nextBtn) { 29 $(window).unbind('scroll', _load); 30 return; 31 } 32 if(that.holded) return; 33 34 p = $.sigma.getPosition(that.node); 35 r = $.sigma.getClientSize(); 36 if(r.height+$.sigma.getBodyScrollTop()<p.top+p.height-d) 37 return; 38 39 that.load(); 40 }; 41 42 if(lazy) { 43 $(window).unbind('scroll', _load).bind('scroll', _load); 44 _load.call(); 45 } 46 47 this.nextBtn.onclick = function(e) { 48 that.load(); 49 return false; 50 } 51 } 52 jList.prototype.onload = function(html, bNew, fn) { 53 var div, i, node; 54 div = document.body.appendChild(document.createElement('div')) 55 div.style.display = 'none'; 56 div.innerHTML = html; 57 $(document).trigger('bx.ready', div); 58 59 node = jUtil.Find('next-page', 'data-role', null, div); 60 if(node.length) { 61 this.nextBtn.style.display = ''; 62 this.nextBtn.getElementsByTagName('a')[0].href = 63 node[0].getElementsByTagName('a')[0].href; 64 } 65 else if(this.nextBtn) { 66 this.nextBtn.style.display = 'none'; 67 //this.nextBtn.parentNode.removeChild(this.nextBtn); 68 //this.nextBtn = null; 69 } 70 71 if(bNew) { 72 node = jUtil.Find('item', 'data-role', null, this.parent); 73 for(i = 0; i < node.length; i++) 74 node[i].parentNode.removeChild(node[i]); 75 } 76 77 this.preloadImages(div, function() { 78 node = jUtil.Find('item', 'data-role', null, div); 79 for(i = 0; i < node.length; i++) { 80 this.parent.appendChild( 81 node[i].parentNode.removeChild(node[i]) 82 ); 83 } 84 document.body.removeChild(div); 85 $(document).trigger('bx.load', this.node); 86 87 if(typeof fn == 'function') 88 fn.apply(this); 89 }); 90 } 91 jList.prototype.preloadImages = function(div, callback) { 92 var child = div.getElementsByTagName('img'), 93 i, n = child.length, img, nLoaded = 0, that = this, 94 _onload = function() { 95 nLoaded++; 96 if(nLoaded == n) 97 if(typeof callback == 'function') 98 callback.apply(that); 99 }; 100 if(n == 0) { 101 if(typeof callback == 'function') 102 callback.apply(this); 103 return; 104 } 105 else { 106 for(i = 0; i < n; i++) { 107 img = new Image(); 108 img.onload = _onload; 109 img.onerror = _onload; 110 img.src = child[i].src; 111 } 112 } 113 } 114 jList.prototype.load = function(url, bNew) { 115 var that = this, ly; 116 //if(!this.nextBtn) return; 117 if(this.holded) return; 118 bNew = bNew || false; 119 url = url || this.nextBtn.getElementsByTagName('a')[0].href; 120 ly = bNew ? this.node : this.nextBtn; 121 122 this.holded = true; 123 url = url+((url.indexOf('?')<0)?'?':'&')+'USE_AJAX=Y'; 124 Loading(ly).show(); 125 126 $.ajax({ 127 url:url, 128 type: "GET", 129 success: function(html) { 130 that.onload(html, bNew, function() { 131 Loading(ly).hide(); 132 }); 133 that.holded = false; 134 } 135 }) 136 } 137 138 window.jList = jList; 139}(window, jQuery)); 140 141/* 142 143jAjax 144jAjax = { 145 146 get: 147} 148 149Ôóíêöèè JS äëÿ êàòàëîãà 150/local/js/common.js 151 - àÿêñ (ready, ajax_call_id, to, popup) 152 - ïîäãðóçêà ýëåìåíòîâ (àâòî, ïî íàæàòèþ íà êíîïêó) 153 - òåëåôîí 154 155 156var jPhone = function(id, params) { 157 params = { 158 'ru': 7, 159 'by': 375, 160 'kz': 7, 161 'ua': 380 162 } 163} 164jPhone { 165 166} 167 168 - äàòà 169/local/js/list.js 170/local/js/list.js 171/local/js/shop.js 172 173îñíîâàíà íà role="element" 174role="buy-button" 175 176var jElement = function(id) { 177 178} 179var jCatalog = function(id) { 180 181} 182 183 1841. Ïîêëàäêà òîâàðîâ â êîðçèíó 1852. Ôèëüòð òîâàðîâ 1863. Ïîäãðóçêà òîâàðîâ 187 188*/
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.