PATH:
home
/
lab2454c
/
costbloc.com
/
public
/
dist
/
js
/
custom
"use strict";function readURL(t){t.files&&t.files[0]&&(new FileReader).readAsDataURL(t.files[0])}function goToErrorMessage(){$([document.documentElement,document.body]).animate({scrollTop:$(".error").offset().top-50},500)}function searchCurrency(){$(".select-currency").select2({ajax:{url:SITE_URL+"/find-currency-in-ajax",dataType:"json",delay:250,data:function(t){return{q:t.term,page:t.page}},processResults:function(t,e){return{results:t.data}},cache:!0},placeholder:jsLang("Search for currency"),minimumInputLength:1})}if($(".main-body .page-wrapper").find("#company-settings-container").length&&($(".js-example-basic-single").select2(),$("#dflt_lang").on("change",(function(){var t=$("#dflt_lang option:selected").attr("data-rel");$.ajax({url:SITE_URL+"/languages/translation/"+t,type:"get",data:{_token:token,type:"company_setting"}})})),$("#company_name").on("blur",(function(){if(""==$(this).val())$("#site_short_name").val("");else{var t=$(this).val().split(" ");1==t.length?$("#site_short_name").val(t[0][0].toUpperCase()+t[0][1].toUpperCase()):2==t.length?$("#site_short_name").val(t[0][0].toUpperCase()+t[1][0].toUpperCase()):$("#site_short_name").val(t[0][0].toUpperCase()+t[1][0].toUpperCase()+t[2][0].toUpperCase())}}))),$(".main-body .page-wrapper").find("#sms-settings-container").length&&$(".select").select2(),$(".main-body .page-wrapper").find("#language-settings-container").length&&($(document).on("init.dt",(function(){$(".dataTables_length").remove(),$("#dataTableBuilder").removeAttr("style")})),dataTable("#dataTableBuilder",[2,3,4]),$(document).on("click",".edit_language",(function(){var t=$(this).attr("id");$.ajax({url:SITE_URL+"/languages/edit",data:{id:t,_token:token},type:"POST",dataType:"JSON",success:function(t){$("#edit_language_name").val(t.language_name),$("#edit_short_name").val(t.short_name),$("#edit_status").val(t.status).trigger("change"),$("#edit_direction").val(t.direction).trigger("change"),$("#language_id").val(t.id),$("#editImg").attr("src",t.flag),1==t.is_default?$("#edit_default").prop("checked",!0):$("#edit_default").prop("checked",!1),$("#edit_language").modal()}})})),$("#edit_default").on("change",(function(){$(this)[0].checked&&$("#edit_status").val("Active").trigger("change")})),$("#default").on("change",(function(){$(this)[0].checked&&$("#status").val("Active").trigger("change")})),$("#add-language").on("show.bs.modal",(function(t){$(this).find(".error").hide()})),$("#add-language").on("hidden.bs.modal",(function(t){$(this).find("select").val("").trigger("change"),$("#default").prop("checked",!1)})),$("#blah_add").hide(),$("#confirmDelete").on("show.bs.modal",(function(t){var e=$(t.relatedTarget),a=$(this);$("#confirmDeleteSubmitBtn").attr("data-task","").removeClass("delete-task-btn"),"Delete"==e.data("label")&&(a.find("#confirmDeleteSubmitBtn").addClass("delete-task-btn").attr("data-task",e.data("id")).text(jsLang("Yes, Confirm")).show(),a.find("#confirmDeleteLabel").text(e.data("title")),a.find(".modal-body").text(e.data("message"))),$("#confirmDeleteSubmitBtn").on("click",(function(){$("#delete-language-"+$(this).data("task")).trigger("submit")}))})),$(document).on("click","#tablereload",(function(t){t.preventDefault(),$("#dataTableBuilder").DataTable().ajax.reload()})),$(".js-example-basic-single-1").select2({dropdownParent:$("#edit_language")}),$(".js-example-basic-single-2").select2({dropdownParent:$("#add-language")})),$(".main-body .page-wrapper").find("#translation-settings-container").length&&dataTable("#dataTableBuilder",1),$(".main-body .page-wrapper").find("#currency-converter-settings-container").length&&$("input:radio[name=customRadio]").click((function(){"customRadio2"==$(this).attr("id")?($("#exchange_rate_api").val("Active"),$("#currency_converter_api").val("Inactive")):"customRadio1"==$(this).attr("id")&&($("#exchange_rate_api").val("Inactive"),$("#currency_converter_api").val("Active"))})),$(".main-body .page-wrapper").find("#sso-settings-container").length&&$(".removeSpace").keyup((function(t){let e=$(this).val();e=e.replace(/\s/g,""),$(this).val(e)})),$(document).on("click",".custom-file",(function(){$(this).closest("#iconTop").length&&$(".btn-file-add").attr("dataFavicon","icon")})),$(document).on("click",".custom-file",(function(){$(this).closest("#logo").length&&$(".btn-file-add").attr("dataFavicon","logo")})),$(document).on("click","#btnSubmits",(function(){setTimeout(goToErrorMessage,0)})),$(".main-body .page-wrapper").find("#translation-settings-container").length&&$(document).on("blur","input",(function(){let t=$(this).val(),e=$(this).data("name");$("#language_from").find(`input[name="${e}"]`).length>0?$("#language_from").find(`input[name="${e}"]`).val(t):$("#language_from").append(`<input type="hidden" name="${e}" value="${t}">`)})),$(document).on("file-attached",".custom-file",(function(t,e){let a=e.data;a&&$(this).closest(".preview-parent").find(".custom-file-input").val(a[0].id)})),$("#customer_signup, #vendor_signup").on("change",(function(){"0"==$(this).val()?$(this).attr("value","1"):$(this).attr("value","0")})),$(".main-body .page-wrapper").find("#company-settings-container").length){searchCurrency(),$(".select-currency").html(`<option selected value="${currencyId}">${currencyName}</option>`);let t=`<option value="">${jsLang("Loading")}...</option>`,e=`<option value="">${jsLang("Select City")}</option>`,a=`<option value="">${jsLang("Select State")}</option>`,n=jsLang(":x is not available.");function o(o){o?($("#company_state").html(""),"null"==oldCity&&$("#company_city").html(e),$.ajax({url:url+"/geo-locale/countries/"+o+"/states",type:"GET",dataType:"json",beforeSend:function(){$("#company_state").attr("disabled","true"),$("#company_state").html(t)},success:function(t){$("#company_state").html(a),$.each(t.data,(function(t,e){$("#company_state").append(`'<option ${e.code==oldState?"Selected":""} data-state="${e.code}" value="${e.code}">${e.name}</option>'`)})),$("#company_state").removeAttr("disabled"),t.length<=0&&t.data.length<=0&&(n=n.replace(":x","State"),$("#company_state").html(`<option value="">${n}</option>`))}})):($("#company_state").html(a),$("#company_city").html(e))}function i(a,o){a&&o?($("#company_city").html(""),$.ajax({url:url+"/geo-locale/countries/"+o+"/states/"+a+"/cities",type:"GET",dataType:"json",beforeSend:function(){$("#company_city").html(t),$("#company_city").attr("disabled","true")},success:function(t){$("#company_city").html(e),$.each(t.data,(function(t,e){$("#company_city").append(`<option ${e.name==oldCity?"Selected":""} value="${e.name}">${e.name}</option>`)})),$("#company_city").removeAttr("disabled"),t.length<=0&&t.data.length<=0&&(n=n.replace(":x","City"),$("#company_city").html(`<option value="">${n}</option>`))}})):$("#company_city").html(e)}$(".addressSelect").select2(),$.ajax({url:url+"/geo-locale/countries",type:"GET",dataType:"json",beforeSend:function(){$("#company_country").html(t),$("#company_country").attr("disabled","true")},success:function(t){$("#company_country").html('<option value="">'+jsLang("Select Country")+"</option>"),$.each(t,(function(t,e){$("#company_country").append(`'<option ${e.code==oldCountry?"Selected":""} data-country="${e.code}" value="${e.code}">${e.name}</option>'`)})),$("#company_country").removeAttr("disabled")}}),"null"!=oldState&&o(oldCountry),"null"!=oldCity&&i(oldState,oldCountry),$("#company_country").on("change",(function(){oldCity="null",o($("#company_country").find(":selected").attr("data-country"))})),$("#company_state").on("change",(function(){i($("#company_state").find(":selected").attr("data-state"),$("#company_country").find(":selected").attr("data-country"))}))}
[-] 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]