PATH:
home
/
lab2454c
/
costbloc.com
/
public
/
dist
/
js
/
custom
"use strict";var clickedOnce=0,currentSection="",lastCatgeoryId=$("#category_id").val(),currentSectionClick=!1,buttonIsDisable=!0,preParentCategory=[],preTextCurrentSection="",isButtonClear=!1,tempActiveForSection="",prebuttonIsDisable=!1,hasSubMenuActiveFirstClick=0;function removeSubmenuActive(){hasSubMenuActiveFirstClick=1,$(".-active").each((function(){$(this).hasClass("-hasSubmenu")&&($(this).removeClass("-active"),$(this).closest("ul").removeClass("-animating"),$(this).closest("ul").removeClass("-visible"))}))}function removeActive(){clickedOnce=0,$(".-active").each((function(){$(this).hasClass("-hasSubmenu")||$(this).removeClass("-active")}))}function removeAllActive(){$(".-active").each((function(){$(this).removeClass("-active"),$(this).closest("ul").removeClass("-animating"),$(this).closest("ul").removeClass("-visible")}))}function removeMultipleActive(){let ct=0;$(".categorySearchDiv-0").each((function(){$(this).hasClass("-active")&&(ct++,2==ct&&hideAllSubMenu())}))}function hideAllSubMenu(){$(".-hasSubmenu").each((function(){if($(this).hasClass("-active")){var menu=this,ul=$("ul",this)[0];if(!ul||!ul.classList.contains("-visible"))return;this.classList.remove("-active"),ul.classList.add("-animating"),setTimeout((function(){ul.classList.remove("-visible"),ul.classList.remove("-animating")}),300)}}))}function categoryReset(){$(".category-search").each((function(){let categorySearchId=$(this).attr("data-seId"),seValue="",liSelector;$(this).val(""),$("#categorySearchDiv-"+categorySearchId+" .categorySearchDiv-"+categorySearchId).show().filter((function(){return-1==$(this).text().toLowerCase().trim().indexOf("")})).hide()}))}function pathSelect(reWrite=!0){if($(".breadcrumb-item").remove(),reWrite){preParentCategory=[],currentSection="";let text="",avoidFirst=0,countCatgeory=0;$(".category-list").each((function(i,v){let classList;if(-1!=$(this).attr("class").indexOf("-active")){let catId=$(this).attr("data-catid");text+=`<li class="breadcrumb-item" data-catId = ${catId}><a class="custom-a" href="javascript:void(0)">${$(this).attr("data-name")}</a></li>`,preParentCategory[countCatgeory++]=catId,1==avoidFirst?currentSection+=" / ":avoidFirst=1,currentSection+=$(this).attr("data-name"),lastCatgeoryId=$(this).attr("data-catId")}})),preTextCurrentSection=text,$(".current-section ol span").after(text),loadListProduct()}}function changeCategory(){currentSectionClick=!1,$("#custom-show").val(currentSection),$("#category_id").val(lastCatgeoryId),$("#category_id").trigger("change"),parentCategoryId=preParentCategory,confirmTextCurrentSection=preTextCurrentSection,buttonIsDisable=prebuttonIsDisable,selectedParentCategory()}function loadListProduct(isPathCall=!0){for(var elements=document.getElementsByClassName("breadcrumb-item"),myFunction=function(){currentSectionClick=!0;let currId=$(this).attr("data-catid");$(".-hasSubmenu").each((function(){let subCatId=$(this).attr("data-catid");if(currId==subCatId){let liId=$(this).attr("id");$("#"+liId+" .-active").removeClass("-active"),$("#"+liId+" .-visible").removeClass("-visible"),hideCurrMenu(this),1==isPathCall&&pathSelect(),$(this).removeClass("-active"),$(this).hasClass("-hasSubmenu")&&($(this).addClass("-active"),tempActiveForSection=subCatId,prebuttonIsDisable=!0,$("#categorySubmit").prop("disabled",!0))}}))},k=0;k<elements.length;k++)elements[k].addEventListener("click",myFunction,!1)}function hideCurrMenu(menu){var menu=menu,ul=$("ul",menu)[0];ul&&ul.classList.contains("-visible")&&(menu.classList.remove("-active"),ul.classList.add("-animating"),setTimeout((function(){ul.classList.remove("-visible"),ul.classList.remove("-animating")}),300))}function selectedParentCategory(action=!0){currentSectionClick=!0;let firstFlag=0;$.each(parentCategoryId,(function(i,v){$(".category-list").each((function(){let dataCatId;$(this).attr("data-catid")==v&&($(this).addClass("-active"),$(this).closest("ul").addClass("-animating"),$(this).closest("ul").addClass("-visible"))}))})),$(".breadcrumb-item").remove(),$(".current-section ol span").after(confirmTextCurrentSection),loadListProduct(),0==buttonIsDisable&&$("#categorySubmit").prop("disabled",!1),setTimeout((function(){if(currentSectionClick=!1,1==action){var x=document.getElementById("myDIV");"block"===x.style.display&&setTimeout((function(){x.style.display="none",firstFlag=0,removeAllActive(),pathSelect(!1)}),500)}}),300)}!function(){let firstFlag=0;function $(selector,context){return(context=context||document).querySelectorAll(selector)}function forEach(collection,iterator){for(var key in Object.keys(collection))iterator(collection[key])}function showMenu(menu){var menu,ul=$("ul",menu=this)[0];let selectedList=$("li>a",menu)[0];ul&&!ul.classList.contains("-visible")&&(menu.classList.add("-active"),ul.classList.add("-animating"),ul.classList.add("-visible"),setTimeout((function(){ul.classList.remove("-animating")}),25))}function hideMenu(menu){var menu,ul=$("ul",menu=this)[0];ul&&ul.classList.contains("-visible")&&(menu.classList.remove("-active"),ul.classList.add("-animating"),setTimeout((function(){ul.classList.remove("-visible"),ul.classList.remove("-animating")}),300))}function hideAllInactiveMenus(menu){var menu;0==currentSectionClick&&forEach($("li.-hasSubmenu.-active:not(:hover)",this.parent),(function(e){e.hideMenu&&e.hideMenu()}));let list=document.querySelectorAll(".-hasSubmenu.-active"),listSelection=document.querySelectorAll(".breadcrumb-item"),selectedInput=document.querySelector("input:focus");var listTag=document.getElementsByTagName("li");if(firstFlag&&0===list.length&&!selectedInput){var x=document.getElementById("myDIV");setTimeout((function(){x.style.display="none",firstFlag=0,removeAllActive(),pathSelect(!1)}),500)}else firstFlag=1}window.addEventListener("load",(function(){forEach($(".Menu li.-hasSubmenu"),(function(e){e.showMenu=showMenu,e.hideMenu=hideMenu})),forEach($(".Menu > div > li.-hasSubmenu"),(function(e){e.addEventListener("click",showMenu)})),forEach($(".Menu > div> li.-hasSubmenu li"),(function(e){e.addEventListener("click",hideAllInactiveMenus)})),forEach($(".Menu > div> li.-hasSubmenu li.-hasSubmenu"),(function(e){e.addEventListener("click",showMenu)})),document.addEventListener("click",hideAllInactiveMenus)})),document.getElementById("custom-show").addEventListener("click",(function(){var x=document.getElementById("myDIV");"none"===x.style.display||""===x.style.display?(x.style.display="block",document.getElementById("categorySubmit").disabled=!0,""!=confirmTextCurrentSection&&(buttonIsDisable=!1),0==isButtonClear&&selectedParentCategory(!1),isButtonClear=!1):x.style.display="none"}))}(),$(document).ready((function(){var link=$("#navbar-scroll a.dot");function scrNav(){var sTop=$(window).scrollTop();$(".section").each((function(){var id=$(this).attr("id"),offset=$(this).offset().top-1,height=$(this).height();sTop>=offset&&sTop<offset+height&&(link.removeClass("custom-active"),$("#navbar-scroll").find('[data-scroll="'+id+'"]').addClass("custom-active"))}))}link.on("click",(function(e){var target=$($(this).attr("href"));$("html, body").animate({scrollTop:target.offset().top},600),$(this).addClass("custom-active"),e.preventDefault()})),$(window).on("scroll",(function(){scrNav()})),scrNav()})),$(document).on("keyup",".category-search",(function(e){let categorySearchId=$(this).attr("data-seId"),seValue=this.value.toLowerCase().trim(),liSelector;$("#categorySearchDiv-"+categorySearchId+" .categorySearchDiv-"+categorySearchId).show().filter((function(){return-1==$(this).text().toLowerCase().trim().indexOf(seValue)})).hide()})),$(".category-list").click((function(e){0==hasSubMenuActiveFirstClick&&removeSubmenuActive(),currentSectionClick=!1,$(this).hasClass("-hasSubmenu")?(removeActive(),prebuttonIsDisable=!0,$("#categorySubmit").prop("disabled",!0)):0==clickedOnce?(removeActive(),$(this).addClass("-active"),removeMultipleActive(),$("#categorySubmit").prop("disabled",!1),prebuttonIsDisable=!1):(prebuttonIsDisable=!0,$("#categorySubmit").prop("disabled",!0)),""!=tempActiveForSection&&$(".category-list").each((function(){let dataCatId;$(this).attr("data-catid")==tempActiveForSection&&($(this).removeClass("-active"),tempActiveForSection="")})),setTimeout((function(){pathSelect()}),500),$(this).hasClass("-hasSubmenu")||$(this)&&e.stopPropagation()})),$("#categoryCancel").click((function(e){e.preventDefault();var x=document.getElementById("myDIV");setTimeout((function(){x.style.display="none"}),500)})),$("#categoryClear").click((function(e){$(".ajax-loader").css("visibility","visible"),e.preventDefault(),clickedOnce=1,isButtonClear=!0,categoryReset(),$("#categorySearchDiv-0 li .clicked").trigger("click"),setTimeout((function(){$("#custom-show").trigger("click"),pathSelect(!1),removeActive(),$(".category-list[data-catid=1]").trigger("click"),$("#custom-show").prop("value",$(".category-list[data-catid=1]").data("name")),$(".ajax-loader").css("visibility","hidden")}),700)})),$("#categorySubmit").click((function(e){changeCategory()})),$("#custom-show").keydown((function(){return!1})),$("#categoryWarning").on("hidden.bs.modal",(function(){currentSectionClick=!1}));
[-] create-product.min.js
[edit]
[-] refund.js
[edit]
[-] shops.js
[edit]
[-] commission.min.js
[edit]
[-] user.min.js
[edit]
[-] installer.js
[edit]
[-] category.min.js
[edit]
[+]
site
[-] jquery.blockUI.js
[edit]
[-] category.js
[edit]
[-] create-product.js
[edit]
[-] refund.min.js
[edit]
[+]
..
[-] shipping.min.js
[edit]
[-] user.js
[edit]
[-] jquery.blockUI.min.js
[edit]
[-] option.min.js
[edit]
[-] users-activity-list.js
[edit]
[-] attribute.min.js
[edit]
[-] email-configuration.min.js
[edit]
[-] dashboard.js
[edit]
[-] order.min.js
[edit]
[-] delete-modal.js
[edit]
[-] withdrawal.js
[edit]
[-] product-setting.js
[edit]
[-] validation.js
[edit]
[-] vendors.min.js
[edit]
[-] shops.min.js
[edit]
[-] roles.js
[edit]
[-] review.js
[edit]
[-] common.min.js
[edit]
[-] geolocale-suggestion.min.js
[edit]
[-] custom-category.js
[edit]
[-] product.js
[edit]
[-] order-invoice.min.js
[edit]
[-] common.js
[edit]
[-] product_list.js
[edit]
[-] settings.js
[edit]
[-] permission.min.js
[edit]
[-] coupon.js
[edit]
[-] export.js
[edit]
[-] yajra-custom.min.js
[edit]
[-] users-activity-list.min.js
[edit]
[-] finance.min.js
[edit]
[-] geolocale-suggestion.js
[edit]
[-] option.js
[edit]
[-] newsletter.min.js
[edit]
[-] order.js
[edit]
[-] role-permission.js
[edit]
[-] brand.min.js
[edit]
[-] transaction.js
[edit]
[-] popup.min.js
[edit]
[-] validation.min.js
[edit]
[-] templates.min.js
[edit]
[-] attribute.js
[edit]
[-] brand.js
[edit]
[-] app-layout.js
[edit]
[-] preference.js
[edit]
[-] invoice.js
[edit]
[-] order-invoice.js
[edit]
[-] yajra-export.js
[edit]
[-] product-setting.min.js
[edit]
[-] yajra-custom.js
[edit]
[-] installer.min.js
[edit]
[-] invoice.min.js
[edit]
[-] product_list.min.js
[edit]
[-] email-configuration.js
[edit]
[-] custom-category.min.js
[edit]
[-] settings.min.js
[edit]
[-] yajra-export.min.js
[edit]
[-] withdrawal.min.js
[edit]
[-] payment.js
[edit]
[-] preference.min.js
[edit]
[-] roles.min.js
[edit]
[-] finance.js
[edit]
[-] app-layout.min.js
[edit]
[-] permission.js
[edit]
[-] transaction.min.js
[edit]
[-] popup.js
[edit]
[-] order_status.min.js
[edit]
[-] commission.js
[edit]
[-] coupon.min.js
[edit]
[-] shipping.js
[edit]
[-] review.min.js
[edit]
[-] templates.js
[edit]
[-] delete-modal.min.js
[edit]
[-] vendors.js
[edit]
[-] order_status.js
[edit]
[-] dashboard.min.js
[edit]
[-] newsletter.js
[edit]
[-] product.min.js
[edit]
[-] export.min.js
[edit]