Part Details
Registration
Sign In
Forgot your password?
{{/each}}
Select Your Fat Guys Store
").replaceAll("</li><li>", "
").replace("</li></ul>", "
'; else maincatinterDiv = '
'; var currentColItemCount = itemsPerCol; if (itemsAdded + itemsPerCol > data.length) currentColItemCount = data.length - itemsAdded; for (var k = 0; k < currentColItemCount; k++) { itemsAdded++; maincatinterDiv += GetLinkHTML(data[(j * itemsPerCol) + k]); } maincatinterDiv += '
'; mainCatsDivString += maincatinterDiv; } // } $(".whi-vc-maincat").html(mainCatsDivString); $(".whi-vc-maincat .whi-vc-lnk-maincat").on("click", function () { CatalogManager.CatalogCriteria.MainCategoryCode = $(this).attr("datacode"); CatalogManager.CatalogCriteria.MainCategoryText = $(this).attr("datatext"); CatalogManager.SetCatalogCriteria({ success: function (data) { window.location.href = Utilities.CreateCategoryURL(CatalogManager.CatalogCriteria.MainCategoryText, "0"); } }); return false; }); }, error: function () { Utilities.ShowMessage("A technical error occurred while trying to get the data from the server. Please try again later.", "danger"); }, }); } function DisplayCurrentVehicleInHeader() { var nbsp = ""; var seperatorHTML = ''; if (CatalogManager.CurrentVehicle == undefined) $(".spn-vc-current-vehicle").html("Select A Vehicle"); else { var tempHTML; var submodelHTML; if (CatalogManager.CurrentVehicle.SubmodelCode != undefined && CatalogManager.CurrentVehicle.SubmodelCode != 0 && CatalogManager.CurrentVehicle.SubmodelText.toLowerCase() != "base") submodelHTML = nbsp + CatalogManager.CurrentVehicle.SubmodelText; else submodelHTML = ""; if (Passport.DefaultCatalogProvider == "SMTP") { tempHTML = CatalogManager.CurrentVehicle.YearText + nbsp + seperatorHTML + nbsp + CatalogManager.CurrentVehicle.MakeText + nbsp + seperatorHTML + nbsp + CatalogManager.CurrentVehicle.ModelText } else if (Passport.DefaultCatalogProvider.toLowerCase() == "whi") { if (DeviceInfo.GetScreenSize() == "XS") { tempHTML = CatalogManager.CurrentVehicle.YearText + nbsp + CatalogManager.CurrentVehicle.MakeText + nbsp + CatalogManager.CurrentVehicle.ModelText; } else { tempHTML = CatalogManager.CurrentVehicle.YearText + nbsp + seperatorHTML + nbsp + CatalogManager.CurrentVehicle.MakeText + nbsp + seperatorHTML + nbsp + CatalogManager.CurrentVehicle.ModelText + submodelHTML + "
" + CatalogManager.CurrentVehicle.EngineText; } } else if (CatalogManager.CurrentVehicle.EngineText != undefined && CatalogManager.CurrentVehicle.EngineText != null && $.trim(CatalogManager.CurrentVehicle.EngineText) != "") tempHTML = CatalogManager.CurrentVehicle.YearText + nbsp + seperatorHTML + nbsp + CatalogManager.CurrentVehicle.MakeText + nbsp + seperatorHTML + nbsp + CatalogManager.CurrentVehicle.ModelText + submodelHTML + nbsp + seperatorHTML + nbsp + CatalogManager.CurrentVehicle.EngineText; else tempHTML = CatalogManager.CurrentVehicle.MakeText + nbsp + seperatorHTML + nbsp + CatalogManager.CurrentVehicle.YearText + nbsp + seperatorHTML + nbsp + CatalogManager.CurrentVehicle.ModelText + submodelHTML; $(".spn-vc-current-vehicle").html(tempHTML); $(".li-remembered-vehicles").removeClass("open").flash(); } } function Confirmclose(event) { if (CatalogManager.RememberedVehicles.Get().length == 0 && (window.location.pathname.indexOf("/explore/catalog") != -1)) { bootbox.dialog({ message: "You don't have any vehicle selected, are you sure to close the vehicle selection window?", buttons: { success: { label: "Close", className: "btn-default", callback: function () { if (CatalogManager.RememberedVehicles.Get().length == 0) { $(".dv-options-list-box").html('
You do not have any vehicle selected, please select a vehicle.
'); } $("#modalRememberedVehicles").modal("hide"); //event.preventDefault(); } } } }) } else { if (CatalogManager.RememberedVehicles.Get().length == 0) { $(".dv-options-list-box").html('
You do not have any vehicle selected, please select a vehicle.
'); } $("#modalRememberedVehicles").modal("hide"); } } function FilterRows() { var filter = $(".input-vc-filter").val(); if (filter != undefined) filter = filter.toLowerCase(); else filter = ""; var keywords = filter.split(' '); var visibleRowCount = 0; var records = $(".a-vc-remembered-vehicle"); for (var i = 0; i < records.length; i++) { var elem = records.eq(i); if (elem.data("vehicle") == undefined) continue; var filename = elem.data("vehicle").toLowerCase(); //elem.find(".lbl-filename").removeHighlight(); var found = false; for (var j = 0; j < keywords.length; j++) { if (filename.indexOf(keywords[j]) > -1) { found = true; break; //elem.find(".lbl-filename").highlight(keywords[i]); } } if (!found) { elem.hide(); } else { elem.show(); visibleRowCount++; } } if (visibleRowCount == 0) { if ($(".dv-vc-record").length == 0) $(".dv-vc-no-records-in-db").show(); else $(".dv-vc-no-records").show(); } else $(".dv-vc-no-records").hide(); } function ViewCartXS() { GoogleAnalytics.MarkViewCartClick(); window.location.href = Pages.CART_URL; } function ElShowMoreResults() { $('#txtSearchString').prop("disabled", true); $('#wrap').append( '
Loading Results
' ); SearchButtonClick(); } function SearchButtonClick() { //if ($("input[id$='hfElasticSearch']").val() == "true") { // var elasticSearchString = $("#hdnElasticSearch").val().replaceAll("@@", "=").replaceAll("%@", ";") // $("#txtSearchString").val(elasticSearchString); // $("#txtSearchStringXs").val(elasticSearchString); //} Core.HeaderSearch(); //return false; } function GetLinkHTML(dataItem) { if (dataItem.Code == '0') { return '' + dataItem.Text + ''; } else { return '' + dataItem.Text + ''; } }