AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 3.149.253.95
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/bitrix/www/bitrix/components/aspro/catalog.delivery.max/templates/.default/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/bitrix/www/bitrix/components/aspro/catalog.delivery.max/templates/.default/script.min.js
void 0===window.JCCatalogDelivery&&(window.JCCatalogDelivery=function(rand,arParams,arResult){if(this.rand=rand,this.timerPlusMinus=!1,this.params={},this.result={},this.$popup=!1,this.$block=!1,this.$form=!1,this.$error=!1,this.$baseFields=!1,"object"==typeof arResult&&(this.result=arResult,this.result.PRODUCT_ID)){let minValue=$(".counter_block[data-item="+this.result.PRODUCT_ID+"] .minus").data("min");minValue&&(this.result.MIN_QUANTITY=minValue)}"object"==typeof arParams&&(this.params=arParams,this.init())},window.JCCatalogDelivery.prototype={init:function(){if(this.jsSolutionOptions="object"==typeof window.arMaxOptions&&window.arMaxOptions,this.ratio=this.result.PRODUCT.RATIO,this.ratio_is_float=this.result.PRODUCT.RATIO_IS_FLOAT,this.ratio=this.ratio_is_float?parseFloat(this.ratio):parseInt(this.ratio,10),this.ratio_is_float&&"object"==typeof this.jsSolutionOptions&&(this.ratio=Math.round(this.ratio*arMaxOptions.JS_ITEM_CLICK.precisionFactor)/arMaxOptions.JS_ITEM_CLICK.precisionFactor),this.$block=$("#catalog-delivery-"+this.rand),this.$block.length){this.$popup=this.$block.closest(".popup"),this.bPopup=this.$popup.length>0,this.$form=this.$block.find("form[name=catalog-delivery]"),this.$error=this.$block.find(".catalog-delivery-error-text"),this.$baseFields=this.$block.find(".catalog-delivery-fields-base"),this.$baseFields.length&&(this.maxBaseFieldsHeight=100);var that=this,waitInterval=setInterval((function(){that.$block.height()&&(clearInterval(waitInterval),"function"==typeof CheckPopupTop&&CheckPopupTop(),that.onResizeHandler())}),100)}this.bindEvents()},sendForm:function(bCalculate){var url=this.result.AJAX_URL;if(url){bCalculate&&this.$form.append('<input type="hidden" name="CALCULATE" value="Y" />');var data=this.$form.serialize(),that=this;that.timerPlusMinus&&(clearTimeout(that.timerPlusMinus),that.timerPlusMinus=!1);var bLocationChanged="Y"===this.$form.find("input[name=LOCATION_CHANGED]").val(),locationCode=this.$form.find("input[name=LOCATION]").val();bCalculate?$.ajax({url:url,type:"POST",data:data,beforeSend:function(){that.$block.addClass("sending")},success:function(response){that.$block.wrap("<div></div>");var $wrap=that.$block.parent();$wrap.html(response),that.$block=$wrap.find(".catalog-delivery"),$wrap.find(">div").unwrap("<div></div>"),bLocationChanged&&BX.onCustomEvent("onCatalogDeliveryChangeLocation",[{code:locationCode}])},error:function(xhr,ajaxOptions,thrownError){that.$block.addClass("haserror"),that.$error.text(BX.message.CD_T_ERROR_REQUEST+" "+thrownError+" ("+xhr.status+")")},complete:function(){that.$form.find("input[name=CALCULATE]").remove(),that.$block.removeClass("sending")}}):$.ajax({url:url,type:"POST",data:data})}},bindEvents:function(){var that=this;if(this.$block.length){if(-1!==$.inArray("LOCATION",this.params.CHANGEABLE_FIELDS)&&(this.$block.find(".catalog-delivery-title-city").click((function(e){that.$block.addClass("search")})),this.$block.find("input[name=LOCATION_SEARCH]").change((function(e){var $this=$(this),value=$this.val();if(value.length){var city=$this.closest(".bx-ui-sls-input-block").find(".bx-ui-sls-fake").val(),oldValue=that.$form.find("input[name=LOCATION]").val();that.$block.find(".catalog-delivery-title-city>span").eq(0).html(city),that.$block.removeClass("search"),oldValue!=value&&(that.$form.find("input[name=LOCATION_CHANGED]").val("Y"),that.$form.find("input[name=LOCATION]").val(value).change())}}))),this.$block.find(".hasdropdown .catalog-delivery-field-box-value").click((function(){var bOpen=$(this).closest(".catalog-delivery-field-box.open").length;$(".catalog-delivery-field-box.open").removeClass("open"),bOpen||$(this).closest(".catalog-delivery-field-box").addClass("open")})),this.$block.find(".catalog-delivery-field-box-dropdown-item").click((function(){var value=$(this).attr("data-value"),$box=$(this).closest(".catalog-delivery-field-box");if($box.length){var $select=$box.find("select"),oldValue;if($select.length)$box.find(".catalog-delivery-field-box-value span").text($(this).text()),$box.removeClass("open"),$select.val()!=value&&$select.val(value).change()}})),this.$block.find(".catalog-delivery-item-head").click((function(e){var $item=$(this).closest(".catalog-delivery-item");$item.length&&($item.toggleClass("open"),$item.find(".catalog-delivery-item-more").slideToggle(),e.stopPropagation()),that.$form.find("input[name^=DELIVERY]").remove();var cnt=that.$block.find(".catalog-delivery-item.open").length;if(cnt)for(var i=0;i<cnt;++i)that.$form.append('<input type="hidden" name="DELIVERY['+i+']" value="'+that.$block.find(".catalog-delivery-item.open").eq(i).data("id")+'" />');else that.$form.append('<input type="hidden" name="DELIVERY[]" value="" />');"Y"===that.params.SAVE_IN_SESSION&&that.sendForm(!1)})),-1!==$.inArray("QUANTITY",this.params.CHANGEABLE_FIELDS)){var $input=this.$block.find(".catalog-delivery-field_quantity .catalog-delivery-field-box-value input[type=text]");$input.length&&(this.$block.find(".catalog-delivery-field_quantity .catalog-delivery-field-box-value .plus").click((function(e){that.timerPlusMinus&&(clearTimeout(that.timerPlusMinus),that.timerPlusMinus=!1);var value=$input.val();value=that.ratio_is_float?parseFloat(value):parseInt(value,10),value+=that.ratio,"string"==typeof that.result.PRODUCT.MAX_QUANTITY_BUY&&value>that.result.PRODUCT.MAX_QUANTITY_BUY&&(value=that.result.PRODUCT.MAX_QUANTITY_BUY),value<that.ratio&&(value=that.ratio),that.ratio_is_float&&"object"==typeof that.jsSolutionOptions&&(value=Math.round(value*that.jsSolutionOptions.JS_ITEM_CLICK.precisionFactor)/that.jsSolutionOptions.JS_ITEM_CLICK.precisionFactor),$input.val(value),that.result.PRODUCT_QUANTITY!=value&&(that.timerPlusMinus=setTimeout((function(){$input.change()}),1e3))})),this.$block.find(".catalog-delivery-field_quantity .catalog-delivery-field-box-value .minus").click((function(e){that.timerPlusMinus&&(clearTimeout(that.timerPlusMinus),that.timerPlusMinus=!1);var value=$input.val();value=that.ratio_is_float?parseFloat(value):parseInt(value,10),value-=that.ratio,"string"==typeof that.result.PRODUCT.MAX_QUANTITY_BUY&&value>that.result.PRODUCT.MAX_QUANTITY_BUY&&(value=that.result.PRODUCT.MAX_QUANTITY_BUY),value<that.ratio&&(value=that.ratio),that.ratio_is_float&&"object"==typeof that.jsSolutionOptions&&(value=Math.round(value*that.jsSolutionOptions.JS_ITEM_CLICK.precisionFactor)/that.jsSolutionOptions.JS_ITEM_CLICK.precisionFactor),that.result.MIN_QUANTITY&&value<that.result.MIN_QUANTITY&&(value=that.result.MIN_QUANTITY),$input.val(value),that.result.PRODUCT_QUANTITY!=value&&(that.timerPlusMinus=setTimeout((function(){$input.change()}),1e3))})),$input.change((function(e){var value=$(this).val();"string"==typeof that.result.PRODUCT.MAX_QUANTITY_BUY&&value>that.result.PRODUCT.MAX_QUANTITY_BUY&&(value=that.result.PRODUCT.MAX_QUANTITY_BUY),(value=that.ratio_is_float?parseFloat(value):parseInt(value,10))>that.ratio?(diff=value%that.ratio,diff>0&&(value-=diff)):value=that.ratio,that.ratio_is_float&&"object"==typeof that.jsSolutionOptions&&(value=Math.round(value*that.jsSolutionOptions.JS_ITEM_CLICK.precisionFactor)/that.jsSolutionOptions.JS_ITEM_CLICK.precisionFactor),that.result.MIN_QUANTITY&&value<that.result.MIN_QUANTITY&&(value=that.result.MIN_QUANTITY),$(this).val(value)})),"function"==typeof $.fn.numeric&&$input.numeric(this.ratio_is_float?{allow:"."}:{}))}this.$form.length&&(this.$form.submit((function(e){e.preventDefault()})),this.$form.find("input, select").change((function(){var $this=$(this);"Y"===$(this).data("send")&&that.sendForm(!0)}))),this.$baseFields.length&&this.$block.find(".catalog-delivery-fields-opener").click((function(e){$(this).closest(".catalog-delivery-fields").toggleClass("open"),that.onResizeHandler()})),(this.$baseFields.length||this.bPopup)&&$(window).resize((function(){that.onResizeHandler()}))}},onResizeHandler:function(){if(this.$baseFields.length){var height=this.$baseFields.height();this.$block.hasClass("shortfields")?height<=this.maxBaseFieldsHeight&&(this.$block.removeClass("shortfields"),"function"==typeof CheckPopupTop&&CheckPopupTop()):height>this.maxBaseFieldsHeight&&(this.$block.addClass("shortfields"),"function"==typeof CheckPopupTop&&CheckPopupTop())}this.bPopup&&window.matchMedia("(max-width:767px)").matches}},$(document).on("click",(function(e){$(e.target).closest(".catalog-delivery-field-box.open").length||$(".catalog-delivery-field-box.open").removeClass("open")})));
//# sourceMappingURL=script.min.js.map

Anon7 - 2022
AnonSec Team