1function filtersOpen(){ 2 3$('aside#products-left').slideToggle(300); 4 5} 6 7function removeVariableFromURL(url_string, variable_name) { 8 9 var URL = String(url_string); 10 var regex = new RegExp( "\\?" + variable_name + "=[^&]*&?", "gi"); 11 URL = URL.replace(regex,'?'); 12 regex = new RegExp( "\\&" + variable_name + "=[^&]*&?", "gi"); 13 URL = URL.replace(regex,'&'); 14 URL = URL.replace(/(\?|&)$/,''); 15 regex = null; 16 return URL; 17 18 19 } 20 21// form_tc() 22function form_tc(Text) { 23 return Text.toLowerCase().replace(/[^\w ]+/g, '').replace(/ +/g, '-'); 24} 25 26 27function sorting(val , catid , ListType , lang, q){ 28 29$('div#sortingloading').fadeIn(400); 30 31$.ajax({ 32 33type:'GET', 34url:'../../controller/ProductsController.php?action=sorting&sorting='+val+'&catid='+catid+'&listtype='+ListType+'&lang='+lang+'&q='+q, 35success : function(rtrn){ 36 37$('#filtersresult').html(rtrn); 38$('div#sortingloading').fadeOut(400); 39$('#filtersresult').fadeIn(1000); 40//$("html,body").stop().animate({ scrollTop: "170" }, 500); 41$('div#products-left_').fadeIn(400); 42 43MobileListingClose_V4(lang); 44 45url_ = removeVariableFromURL(top.location.href , 'sorting' ); 46url_ = removeVariableFromURL(url_ , 'pages' ); 47pushStateUrl_ = url_+'&sorting='+val; 48pushStateUrl = pushStateUrl_.replace('&&' , '&'); 49pushStateUrl = pushStateUrl.replace('?gclid=' , '&gclid='); 50history.pushState('' , '' , pushStateUrl); 51 52window.top.location.href=location.href; 53 54} 55 56}); 57 58} 59 60function sortingStok(val , catid , ListType , lang , q){ 61 62$('div#sortingloading').fadeIn(400); 63 64$.ajax({ 65 66type:'GET', 67url:'../../controller/ProductsController.php?action=sortingstok&sortingstok='+val+'&catid='+catid+'&listtype='+ListType+'&lang='+lang+'&q='+q, 68success : function(rtrn){ 69 70$('#filtersresult').html(rtrn); 71$('div#sortingloading').fadeOut(400); 72$('#filtersresult').fadeIn(1000); 73//$("html,body").stop().animate({ scrollTop: "170" }, 500); 74$('div#products-left_').fadeIn(400); 75 76MobileListingClose_V4(lang); 77 78url_ = removeVariableFromURL(top.location.href , 'sortingstok'); 79url_ = removeVariableFromURL(url_ , 'pages' ); 80pushStateUrl_ = url_+'&sortingstok='+val; 81pushStateUrl = pushStateUrl_.replace('&&' , '&'); 82pushStateUrl = pushStateUrl.replace('?gclid=' , '&gclid='); 83history.pushState('' , '' , pushStateUrl); 84 85window.top.location.href=location.href; 86 87} 88 89}); 90 91} 92 93function SortingModel(val , id , modelid , catid , ListType , lang , q){ 94 95$('div#sortingloading').fadeIn(400); 96 97$.ajax({ 98 99type:'GET', 100url:'../../controller/ProductsController.php?action=sortingmodel&sortingmodel='+encodeURIComponent(val)+'&sortingid='+modelid+'&id='+id+'&catid='+catid+'&listtype='+ListType+'&lang='+lang+'&q='+q, 101success : function(rtrn){ 102 103$('#filtersresult').html(rtrn); 104$('div#sortingloading').fadeOut(400); 105$('#filtersresult').fadeIn(1000); 106//$("html,body").stop().animate({ scrollTop: "170" }, 500); 107$('div#products-left_').fadeIn(400); 108 109MobileListingClose_V4(lang); 110 111//url_ = removeVariableFromURL(top.location.href , 'sortingmodel'); 112 113/* 114var s = top.location.href.search("sortingmodel="+val); 115 116if(s==-1){ 117pushStateUrl_ = top.location.href+'&sortingmodel='+val; 118}else{ 119pushStateUrl_ = top.location.href.replace('&sortingmodel='+val , ''); 120} 121*/ 122 123var s = decodeURIComponent(top.location.href).search("sortingmodel="+val+'&sortingid='+modelid); 124 125if(s==-1){ 126pushStateUrl_ = top.location.href+'&sortingmodel='+val+'&sortingid='+modelid; 127}else{ 128pushStateUrl_ = decodeURIComponent(top.location.href).replace('&sortingmodel='+ val +'&sortingid='+modelid , ''); 129} 130 131pushStateUrl = pushStateUrl_.replace('&&' , '&'); 132pushStateUrl = pushStateUrl.replace('?gclid=' , '&gclid='); 133history.pushState('' , '' , pushStateUrl); 134 135window.top.location.href=location.href; 136 137 138} 139 140}); 141 142} 143 144function SortingAttribute(val , id , catid , ListType , lang , q){ 145 146$('div#sortingloading').fadeIn(400); 147 148$.ajax({ 149 150type:'GET', 151url:'../../controller/ProductsController.php?action=sortingattribute&sortingattribute='+encodeURIComponent(val)+'&id='+id+'&catid='+catid+'&listtype='+ListType+'&lang='+lang+'&q='+q, 152success : function(rtrn){ 153 154$('#filtersresult').html(rtrn); 155$('div#sortingloading').fadeOut(400); 156$('#filtersresult').fadeIn(1000); 157$('div#products-left_').fadeIn(400); 158 159MobileListingClose_V4(lang); 160 161var s = top.location.href.search("sortingattribute="+id+'-'+encodeURIComponent(val)); 162 163if(s==-1){ 164pushStateUrl_ = top.location.href+'&sortingattribute='+id+'-'+encodeURIComponent(val); 165}else{ 166pushStateUrl_ = top.location.href.replace('&sortingattribute='+id+'-'+ encodeURIComponent(val) , ''); 167} 168 169pushStateUrl = pushStateUrl_.replace('&&' , '&'); 170pushStateUrl = pushStateUrl.replace('?gclid=' , '&gclid='); 171history.pushState('' , '' , pushStateUrl); 172 173window.top.location.href=location.href; 174 175} 176 177}); 178 179} 180 181 182function SortingColor(val , catid , ListType , lang , q){ 183 184$('div#sortingloading').fadeIn(400); 185 186$.ajax({
187 188type:'GET', 189url:'../../controller/ProductsController.php?action=sortingcolor&sortingcolor='+val+'&catid='+catid+'&listtype='+ListType+'&lang='+lang+'&q='+q, 190success : function(rtrn){ 191 192$('#filtersresult').html(rtrn); 193$('div#sortingloading').fadeOut(400); 194$('#filtersresult').fadeIn(1000); 195//$("html,body").stop().animate({ scrollTop: "170" }, 500); 196$('div#products-left_').fadeIn(400); 197 198MobileListingClose_V4(lang); 199 200//url_ = removeVariableFromURL(top.location.href , 'sortingcolor'); 201 202var c = decodeURIComponent(top.location.href).search("sortingcolor="+val); 203 204if(c==-1){ 205pushStateUrl_ = decodeURIComponent(top.location.href)+'&sortingcolor='+val; 206}else{ 207pushStateUrl_ = decodeURIComponent(top.location.href).replace('&sortingcolor='+val , ''); 208} 209 210pushStateUrl = pushStateUrl_.replace('&&' , '&'); 211pushStateUrl = pushStateUrl.replace('?gclid=' , '&gclid='); 212history.pushState('' , '' , pushStateUrl); 213 214window.top.location.href=location.href; 215 216} 217 218}); 219 220} 221 222function SortingBrand(val , brandid , catid , ListType , lang , q){ 223 224$('div#sortingloading').fadeIn(400); 225 226$.ajax({ 227 228type:'GET', 229url:'../../controller/ProductsController.php?action=sortingbrand&sortingbrand='+val+'&brandid='+brandid+'&catid='+catid+'&listtype='+ListType+'&lang='+lang+'&q='+q, 230success : function(rtrn){ 231 232$('#filtersresult').html(rtrn); 233$('div#sortingloading').fadeOut(400); 234$('#filtersresult').fadeIn(1000); 235//$("html,body").stop().animate({ scrollTop: "170" }, 500); 236$('div#products-left_').fadeIn(400); 237 238MobileListingClose_V4(lang); 239 240//url_ = removeVariableFromURL(top.location.href , 'sortingbrand'); 241 242var b = decodeURIComponent(top.location.href).search("sortingbrand="+val); 243 244if(b==-1){ 245pushStateUrl_ = top.location.href+'&sortingbrand='+val; 246}else{ 247pushStateUrl_ = decodeURIComponent(top.location.href).replace('&sortingbrand='+val , ''); 248} 249 250pushStateUrl = pushStateUrl_.replace('&&' , '&'); 251pushStateUrl = pushStateUrl.replace('?gclid=' , '&gclid='); 252history.pushState('' , '' , pushStateUrl); 253 254window.top.location.href=location.href; 255 256} 257 258}); 259 260} 261 262function SortingPriceBetween(catid , ListType , lang , q){ 263 264$('div#sortingloading').fadeIn(400); 265 266$.ajax({ 267 268type:'POST', 269url:'../../controller/ProductsController.php?action=sortingpricebetween&catid='+catid+'&listtype='+ListType+'&lang='+lang+'&q='+q, 270data:$('#sortingpriceform').serialize(), 271success : function(rtrn){ 272 273$('#filtersresult').html(rtrn); 274$('div#sortingloading').fadeOut(400); 275$('#filtersresult').fadeIn(1000); 276//$("html,body").stop().animate({ scrollTop: "170" }, 500); 277$('div#products-left_').fadeIn(400); 278 279MobileListingClose_V4(lang); 280 281url_ = removeVariableFromURL(top.location.href , 'sortingprice1'); 282url_ = removeVariableFromURL(url_ , 'sortingprice2'); 283 284pushStateUrl_ = url_+'&'+$('#sortingpriceform').serialize(); 285pushStateUrl = pushStateUrl_.replace('&&' , '&'); 286pushStateUrl = pushStateUrl.replace('?gclid=' , '&gclid='); 287history.pushState('' , '' , pushStateUrl); 288 289window.top.location.href=location.href; 290 291} 292 293}); 294 295} 296 297function ClearFilters(){ 298 299$('div#sortingloading').fadeIn(400); 300 301$.ajax({ 302 303type:'GET', 304url:'../../controller/ProductsController.php?action=clearfilters', 305success : function(rtrn){ 306 307if(rtrn=='ok'){ 308 309url_1 = removeVariableFromURL(top.location.href , 'listtype'); 310url_2 = removeVariableFromURL(url_1 , 'sorting'); 311url_3 = removeVariableFromURL(url_2 , 'sortingmodel'); 312url_4 = removeVariableFromURL(url_3 , 'sortingcolor'); 313url_5 = removeVariableFromURL(url_4 , 'sortingstok'); 314url_6 = removeVariableFromURL(url_5 , 'sortingbrand'); 315url_7 = removeVariableFromURL(url_6 , 'sortingprice1'); 316url_ = removeVariableFromURL(url_7 , 'sortingprice2'); 317 318window.top.location.href=url_; 319 320} 321} 322 323}); 324 325} 326 327function searchFilterModels(val, selectFilter, leftModelsAssociateJson , lang, groupId , catid, pagename){ 328 329 $.ajax({ 330 type:'GET', 331 url:'../../controller/ProductsController.php?action=searchFilterModels&val='+val+'&selectFilter='+selectFilter+'&data='+leftModelsAssociateJson+'&lang='+lang+'&groupId='+groupId+'&catid='+catid+'&pagename='+pagename, 332 success : function(rtrn){ 333 $('#'+selectFilter+groupId).html(rtrn); 334 $('#'+selectFilter+groupId).fadeIn(100); 335 } 336 }); 337} 338 339function newFilterOpenClose(id, iconActive, iconPasive, statu){ 340 341 if(statu=='active'){ 342 $('div#'+id).fadeIn(100); 343 $('i#'+iconActive).fadeIn(100); 344 $('i#'+iconPasive).fadeOut(100); 345 } 346 347 if(statu=='pasive'){ 348 $('div#'+id).fadeOut(100); 349 $('i#'+iconActive).fadeOut(100); 350 $('i#'+iconPasive).fadeIn(100); 351 } 352 353 354} 355
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.