Westinghouse Light Fixture Accessories

if spec1.Value.length

$spec3.Nameif spec3.Name.length

$spec4.Nameif spec4.Name.length

); $(dvSelectedItems).html($(dvSelectedItems).html() +

$spec2.Nameif spec2.Name.length

0) myint = myint – 1; else myint = myint + 1; UpdatePage(myint); return false; ); //show results $(FacetedResults).show(); //remove the image popup tags $(thumbPopup).remove(); //add image rollover effects for fans and light fixtures $(img[src*=-sm.jpg]).thumbPopup( imgSmallFlag: -sm, imgLargeFlag: -md ); ); function SearchOptions(fieldId, selectedValues, searchType, searchField, section) this.fieldId = fieldId; this.selectedValues = selectedValues; this.searchType = searchType; this.searchField = searchField; this.section = section; function yourSelection() ($(div.facetSearchItems input:checked).length

/if if spec3.Value.length

); , error: function () //alert(error); , complete: function (o, a) firstload = false; //remove entire facet categories that have no items //hide entire facet categories that have all items hidden $(div.facetSearchItemContainer).each(function () if ($(this).find(input[show=true]).length == 0) $(this).hide(); ); //Update state of Show More specs UpdateShowMore(); //window.scrollTo(0, 0); //Search through selected items, if any of them are on the current loaded results, change the button to being added $(dvCatalogSelectedItems div span).each(function () $(itemid + $(this).parent().attr(item-id)).removeClass(addActive).addClass(addDeactive).text(Remove); ); //functions to add to the results section $(.search-page a).click(function () UpdatePage($(this).text()); return false; ); $(.search-page-back a).click(function () var myint = parseInt($(search-pager .search-pages a:first).text()); UpdatePage(myint – 1); return false; ); $(.search-page-forward a).click(function () var myint = parseInt($(search-pager .search-pages a:last).text()); UpdatePage(myint + 1); return false; ); $(.search-page-arrow a).click(function () //get current page var myint = parseInt($(search-pager .search-page-selected a).text()); //determine desired page if ($(this).text().indexOf(Previous)

/if if spec4.Value.length

Item :$ItemNumberif MOA != nullif MOA != FalseMOA Item/if/if

Westinghouse Light Fixture Accessories

0) //overwrite $(dvCatalogSelectedItems).html(

if PrimaryMediumImage.length

); //add this item to the session catalog var userid = ; var catid = AddItem(, objectid); if (catid != -1) //set working available and cat ID hidden fields $([id$=hdnWorkingCatID]).val(catid); $([id$=hdnWorkingIsAvailable]).val(1); ); $(div.addDeactive).live(click, function () $(this).removeClass(addDeactive); $(this).addClass(addActive); $(this).text(Add); RemoveProduct(, $(this).attr(data-id)); ); $(btnClear).click(function () //Hide results $(FacetedResults).hide(); //hide clear button $(btnCatalogClear).hide(); $(.facetSearchItems input).each(function () $( + $(this).attr(id)).attr(checked, false); $( + $(this).attr(id)).removeAttr(disabled); $( + $(this).attr(id) + -text).removeClass(search-cb-disabled); ); $(dvSelectedItems div).each(function () $(dvSelectedItems).html(); yourSelection(); UpdatePage(1); ); ); ); function getQueryString() var result = , queryString = location.search.substring(1), re = /([^&=]+)=([^ while (m = re.exec(queryString)) result[decodeURIComponent(m[1])] = decodeURIComponent(m[2]); return result; function UpdatePage(DesiredPage) //Hide results $(FacetedResults).hide(); //clear selection box $(dvSelectedItems).html(); //declare variables var counter = 0; var strValue = ; var searchType = ; var searchField = ; var strFieldId = ; var mySearchOptions = new Array(); var myTotals = new Array(); var currentHeader = ; var SelectedItems = ; $(div.facetSearchItems input).each(function () // strFieldId = $.trim($(this).attr(id)); searchField = $.trim($(this).attr(item-fieldcomparid)); strValue = $.trim($(this).attr(itemvalue)); searchType = $.trim($(this).attr(itemtype)); section = $.trim($(this).attr(section)); if (searchField != ) if ($(this).is(:checked)) if (currentHeader != $(this).attr(item-header)) currentHeader = $(this).attr(item-header); $(dvSelectedItems).html($(dvSelectedItems).html() +

/if if spec2.Value.length

0) ? $(div.faceSearchSelectionContainer).show() : $(div.faceSearchSelectionContainer).hide(); function UpdateShowMore() if ($(aShowMore).text() == Show Details) $(.search-specs).hide(); else $(.search-specs).show(); function getclass() if (isaltclass) isaltclass = false; return search-item-alt else isaltclass = true; return search-item

); else //append this item to the right side bar Working Catalog $(dvCatalogSelectedItems).html($(dvCatalogSelectedItems).html() +

0) $.each($(myTotals), function (key, value) //alert(value[key].selectedValues); $( + value.fieldId + -count).html( ( + value.selectedValues + )); if (value.selectedValues == 0) if (firstload) //alert(firstload + value.searchField); //delete control // $( + value.fieldId).remove(); // $( + value.fieldId + -text).remove(); // $( + value.fieldId + -count).remove(); $( + value.fieldId).hide(); $( + value.fieldId + -text).hide(); $( + value.fieldId + -count).hide(); else //disable control $( + value.fieldId).attr(disabled, true); $( + value.fieldId + -text).addClass(search-cb-disabled); //uncheck if checked $( + value.fieldId).attr(checked, false); //$( + value.fieldId).click(); else //enable control $( + value.fieldId).removeAttr(disabled).attr(show, true); $( + value.fieldId + -text).removeClass(search-cb-disabled); $( + value.fieldId).show(); $( + value.fieldId + -text).show(); $( + value.fieldId + -count).show(); ); // if ($.cookie(facetSelections) != null) // //Need to check off anything that was selected. // var Myitems = $.cookie(facetSelections); // var substr = Myitems.split(,); // for (var i = 0; i

Westinghouse Light Fixture Accessories

); //set variable values with selected item data //Only add if we have something //(searchType != ) && – Took out searchType because default is blank for equal to value if ((strValue != ) && (searchField != )) mySearchOptions.push(new SearchOptions(strFieldId, strValue, searchType, fldField + searchField, section)); SelectedItems += $(this).attr(id) + ,; // //alert(adding total for Id: + strFieldId); myTotals.push(new SearchOptions(strFieldId, strValue, searchType, fldField + searchField, section)); ); $.cookie(facetSelections, SelectedItems, expires: 7, path:/); /* if ($.cookie(facetSelections) == null) $.cookie(facetSelections, SelectedItems)); else $.cookie(facetSelections, $.cookie(facetSelections) + , + $(this).attr(id)); */ GetProducts(mySearchOptions, myTotals, DesiredPage) yourSelection(); function GetProducts(mySearchOptions, myTotals, DesiredPage) //Get value of number of items per page var ResultsPerPage = $(ddlResultsPerPage).val(); var AllItems = $(ddlAllItems).val(); $.ajax( beforeSend: function () $(loader).show(); , type: POST, url: /includes/Webservices/GetProducts.asmx/GetProductPackage, contentType: application/json; charset=utf-8, data: SiteObjectId: + siteobjectid + , mySearchOptions: + JSON.stringify(mySearchOptions) + , myTotals: + JSON.stringify(myTotals) + , ResultsPerPage: + ResultsPerPage + , DesiredPage: + DesiredPage + , AllItems: + AllItems + , success: function (msg) //alert(success); $(FacetedResults).empty(); //Clear Product List var products = msg.d.ProductList; var count = msg.d.TotalResults; var myTotals = msg.d.mySearchOptions; var isAuthenticated = msg.d.IsAuthenticated; var Pager = msg.d.Pager; //alert(count); //alert(products[0].ItemNumber); $(search-pager).html(Pager); $(search-pager2).html(Pager); if (myTotals.length

Leave a Reply