PATH:
home
/
lab2454c
/
vaultchip.com
/
platform
/
plugins
/
ecommerce
/
public
/
js
$(document).ready((function(){$(document).on("click",".list-search-data .selectable-item",(function(e){e.preventDefault();var t=$(e.currentTarget),a=t.closest(".form-group").find("input[type=hidden]"),r=[];if($.each(a.val().split(","),(function(e,t){t&&""!==t&&(r[e]=parseInt(t))})),$.inArray(t.data("id"),r)<0){a.val()?a.val(a.val()+","+t.data("id")):a.val(t.data("id"));var o=$(document).find("#selected_product_list_template").html().replace(/__name__/gi,t.data("name")).replace(/__id__/gi,t.data("id")).replace(/__index__/gi,r.length).replace(/__url__/gi,t.data("url")).replace(/__image__/gi,t.data("image")).replace(/__attributes__/gi,t.find("a span").text());t.closest(".form-group").find(".list-selected-products").removeClass("hidden"),t.closest(".form-group").find(".list-selected-products table tbody").append(o)}t.closest(".panel").addClass("hidden")})),$(document).on("click",".textbox-advancesearch",(function(e){var t=$(e.currentTarget),a=t.closest(".box-search-advance").find(".panel");a.removeClass("hidden"),a.addClass("active"),0===a.find(".panel-body").length&&(Botble.blockUI({target:a,iconOnly:!0,overlayColor:"none"}),$.ajax({url:t.data("target"),type:"GET",success:function(e){e.error?Botble.showError(e.message):(a.html(e.data),Botble.unblockUI(a))},error:function(e){Botble.handleError(e),Botble.unblockUI(a)}}))})),$(document).on("keyup",".textbox-advancesearch",(function(e){var t=$(e.currentTarget),a=t.closest(".box-search-advance").find(".panel");setTimeout((function(){Botble.blockUI({target:a,iconOnly:!0,overlayColor:"none"}),$.ajax({url:t.data("target")+"?keyword="+t.val(),type:"GET",success:function(e){e.error?Botble.showError(e.message):(a.html(e.data),Botble.unblockUI(a))},error:function(e){Botble.handleError(e),Botble.unblockUI(a)}})}),500)})),$(document).on("click",".box-search-advance .page-link",(function(e){e.preventDefault();var t=$(e.currentTarget);if(!t.closest(".page-item").hasClass("disabled")&&t.prop("href")){var a=t.closest(".box-search-advance").find(".panel");Botble.blockUI({target:a,iconOnly:!0,overlayColor:"none"}),$.ajax({url:t.prop("href")+"&keyword="+t.val(),type:"GET",success:function(e){e.error?Botble.showError(e.message):(a.html(e.data),Botble.unblockUI(a))},error:function(e){Botble.handleError(e),Botble.unblockUI(a)}})}})),$(document).on("click","body",(function(e){var t=$(".box-search-advance");t.is(e.target)||0!==t.has(e.target).length||t.find(".panel").addClass("hidden")})),$(document).on("click",".btn-trigger-remove-selected-product",(function(e){e.preventDefault();var t=$(e.currentTarget).closest(".form-group").find("input[type=hidden]"),a=t.val().split(",");$.each(a,(function(e,t){t=t.trim(),_.isEmpty(t)||(a[e]=parseInt(t))}));var r=a.indexOf($(e.currentTarget).data("id"));r>-1&&delete a[r],t.val(a.join(",")),$(e.currentTarget).closest("tbody").find("tr").length<2&&$(e.currentTarget).closest(".list-selected-products").addClass("hidden"),$(e.currentTarget).closest("tbody").find("tr[data-product-id="+$(e.currentTarget).data("id")+"]").remove()}))}));
[-] customer.js
[edit]
[-] checkout.js
[edit]
[-] bulk-import.js
[edit]
[-] order-create.js
[edit]
[-] ecommerce-product-attributes.js
[edit]
[+]
..
[-] discount.js
[edit]
[-] order-incomplete.js
[edit]
[-] utilities.js
[edit]
[-] shipment.js
[edit]
[-] product-category.js
[edit]
[-] avatar.js
[edit]
[-] review.js
[edit]
[-] setting.js
[edit]
[-] change-product-swatches.js
[edit]
[-] dashboard-widgets.js
[edit]
[-] order.js
[edit]
[-] edit-product.js
[edit]
[-] flash-sale.js
[edit]
[-] currencies.js
[edit]
[-] payment-method.js
[edit]
[-] store-locator.js
[edit]
[-] shipping.js
[edit]
[-] report-filter.js
[edit]
[-] report.js
[edit]