%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 3.128.198.49
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64
User : www-root ( 1010)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/dev.artlot24.ru/bitrix/components/bitrix/catalog.top/templates/.default/banner/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/components/bitrix/catalog.top/templates/.default/banner//script.min.js
(function(t){if(!!t.JCCatalogTopBanner)return;var i=function(t){i.superclass.constructor.apply(this,arguments);this.nameNode=BX.create("span",{props:{className:"bx_bt_button big",id:this.id},style:{position:"static",top:"0",right:"0",marginTop:"0"},text:t.text});this.buttonNode=BX.create("span",{attrs:{className:t.ownerClass},style:{marginTop:"0",overflow:"",paddingTop:"0",position:"static"},children:[this.nameNode],events:this.contextEvents});if(BX.browser.IsIE()){this.buttonNode.setAttribute("hideFocus","hidefocus")}};BX.extend(i,BX.PopupWindowButton);t.JCCatalogTopBanner=function(t){this.productType=0;this.showQuantity=true;this.showAbsent=true;this.secondPict=false;this.showOldPrice=false;this.showPercent=false;this.showSkuProps=false;this.visual={ID:"",PICT_ID:"",SECOND_PICT_ID:"",QUANTITY_ID:"",QUANTITY_UP_ID:"",QUANTITY_DOWN_ID:"",PRICE_ID:"",DSC_PERC:"",SECOND_DSC_PERC:"",DISPLAY_PROP_DIV:""};this.product={checkQuantity:false,maxQuantity:0,stepQuantity:1,isDblQuantity:false,canBuy:true,canSubscription:true,name:"",pict:{},id:0,addUrl:"",buyUrl:""};this.basketData={useProps:false,emptyProps:false,quantity:"quantity",props:"prop",basketUrl:""};this.defaultPict={pict:null,secondPict:null};this.checkQuantity=false;this.maxQuantity=0;this.stepQuantity=1;this.isDblQuantity=false;this.canBuy=true;this.canSubscription=true;this.precision=6;this.precisionFactor=Math.pow(10,this.precision);this.offers=[];this.offerNum=0;this.treeProps=[];this.obTreeRows=[];this.showCount=[];this.showStart=[];this.selectedValues={};this.obProduct=null;this.obQuantity=null;this.obQuantityUp=null;this.obQuantityDown=null;this.obPict=null;this.obSecondPict=null;this.obPrice=null;this.obTree=null;this.obBuyBtn=null;this.obDscPerc=null;this.obSecondDscPerc=null;this.obSkuProps=null;this.obMeasure=null;this.errorCode=0;if("object"===typeof t){this.productType=parseInt(t.PRODUCT_TYPE);this.showQuantity=t.SHOW_QUANTITY;this.showAbsent=t.SHOW_ABSENT;if(!!t.SECOND_PICT)this.secondPict=true;if(!!t.SHOW_OLD_PRICE)this.showOldPrice=true;if(!!t.SHOW_DISCOUNT_PERCENT)this.showPercent=true;if(!!t.SHOW_SKU_PROPS)this.showSkuProps=true;this.visual=t.VISUAL;switch(this.productType){case 1:case 2:if(!!t.PRODUCT&&"object"==typeof t.PRODUCT){if(this.showQuantity){this.product.checkQuantity=t.PRODUCT.CHECK_QUANTITY;this.product.isDblQuantity=t.PRODUCT.QUANTITY_FLOAT;if(this.product.checkQuantity)this.product.maxQuantity=this.product.isDblQuantity?parseFloat(t.PRODUCT.MAX_QUANTITY):parseInt(t.PRODUCT.MAX_QUANTITY);this.product.stepQuantity=this.product.isDblQuantity?parseFloat(t.PRODUCT.STEP_QUANTITY):parseInt(t.PRODUCT.STEP_QUANTITY);this.checkQuantity=this.product.checkQuantity;this.isDblQuantity=this.product.isDblQuantity;this.maxQuantity=this.product.maxQuantity;this.stepQuantity=this.product.stepQuantity;if(this.isDblQuantity){this.stepQuantity=Math.round(this.stepQuantity*this.precisionFactor)/this.precisionFactor}}this.product.canBuy=t.PRODUCT.CAN_BUY;this.product.canSubscription=t.PRODUCT.SUBSCRIPTION;this.canBuy=this.product.canBuy;this.canSubscription=this.product.canSubscription;this.product.name=t.PRODUCT.NAME;this.product.pict=t.PRODUCT.PICT;this.product.id=t.PRODUCT.ID;if(!!t.PRODUCT.ADD_URL)this.product.addUrl=t.PRODUCT.ADD_URL;if(!!t.PRODUCT.BUY_URL)this.product.buyUrl=t.PRODUCT.BUY_URL;if(!!t.BASKET&&"object"===typeof t.BASKET){this.basketData.useProps=!!t.BASKET.ADD_PROPS;this.basketData.emptyProps=!!t.BASKET.EMPTY_PROPS}}else{this.errorCode=-1}break;case 3:if(!!t.OFFERS&&BX.type.isArray(t.OFFERS)){this.product.name=t.PRODUCT.NAME;this.product.id=t.PRODUCT.ID;this.offers=t.OFFERS;this.offerNum=0;if(!!t.OFFER_SELECTED)this.offerNum=parseInt(t.OFFER_SELECTED);if(isNaN(this.offerNum))this.offerNum=0;if(!!t.TREE_PROPS)this.treeProps=t.TREE_PROPS;if(!!t.DEFAULT_PICTURE){this.defaultPict.pict=t.DEFAULT_PICTURE.PICTURE;this.defaultPict.secondPict=t.DEFAULT_PICTURE.PICTURE_SECOND}}else{this.errorCode=-1}break;default:this.errorCode=-1}if(!!t.BASKET&&"object"==typeof t.BASKET){if(!!t.BASKET.QUANTITY)this.basketData.quantity=t.BASKET.QUANTITY;if(!!t.BASKET.PROPS)this.basketData.props=t.BASKET.PROPS;if(!!t.BASKET.BASKET_URL){this.basketData.basketUrl=t.BASKET.BASKET_URL}}}if(0===this.errorCode){BX.ready(BX.delegate(this.Init,this))}};t.JCCatalogTopBanner.prototype.Init=function(){var t=0;this.obProduct=BX(this.visual.ID);if(!this.obProduct)this.errorCode=-1;this.obPict=BX(this.visual.PICT_ID);if(!this.obPict)this.errorCode=-2;if(this.secondPict&&!!this.visual.SECOND_PICT_ID){this.obSecondPict=BX(this.visual.SECOND_PICT_ID)}this.obPrice=BX(this.visual.PRICE_ID);if(!this.obPrice)this.errorCode=-16;if(this.showQuantity&&!!this.visual.QUANTITY_ID){this.obQuantity=BX(this.visual.QUANTITY_ID);if(!!this.visual.QUANTITY_UP_ID){this.obQuantityUp=BX(this.visual.QUANTITY_UP_ID)}if(!!this.visual.QUANTITY_DOWN_ID){this.obQuantityDown=BX(this.visual.QUANTITY_DOWN_ID)}}if(3===this.productType){if(!!this.visual.TREE_ID){this.obTree=BX(this.visual.TREE_ID);if(!this.obTree)this.errorCode=-256;var i=this.visual.TREE_ITEM_ID;for(t=0;t<this.treeProps.length;t++){this.obTreeRows[t]={LEFT:BX(i+this.treeProps[t].ID+"_left"),RIGHT:BX(i+this.treeProps[t].ID+"_right"),LIST:BX(i+this.treeProps[t].ID+"_list"),CONT:BX(i+this.treeProps[t].ID+"_cont")};if(!this.obTreeRows[t].LEFT||!this.obTreeRows[t].RIGHT||!this.obTreeRows[t].LIST||!this.obTreeRows[t].CONT){this.errorCode=-512;break}}}if(!!this.visual.QUANTITY_MEASURE){this.obMeasure=BX(this.visual.QUANTITY_MEASURE)}}if(!!this.visual.BUY_ID){this.obBuyBtn=BX(this.visual.BUY_ID)}if(this.showPercent){if(!!this.visual.DSC_PERC){this.obDscPerc=BX(this.visual.DSC_PERC)}if(this.secondPict&&!!this.visual.SECOND_DSC_PERC){this.obSecondDscPerc=BX(this.visual.SECOND_DSC_PERC)}}if(this.showSkuProps){if(!!this.visual.DISPLAY_PROP_DIV){this.obSkuProps=BX(this.visual.DISPLAY_PROP_DIV)}}if(0===this.errorCode){if(this.showQuantity){if(!!this.obQuantityUp){BX.bind(this.obQuantityUp,"click",BX.delegate(this.QuantityUp,this))}if(!!this.obQuantityDown){BX.bind(this.obQuantityDown,"click",BX.delegate(this.QuantityDown,this))}if(!!this.obQuantity){BX.bind(this.obQuantity,"change",BX.delegate(this.QuantityChange,this))}}switch(this.productType){case 1:break;case 3:var s=BX.findChildren(this.obTree,{tagName:"li"},true);if(!!s&&0<s.length){for(t=0;t<s.length;t++){BX.bind(s[t],"click",BX.delegate(this.SelectOfferProp,this))}}for(t=0;t<this.obTreeRows.length;t++){BX.bind(this.obTreeRows[t].LEFT,"click",BX.delegate(this.RowLeft,this));BX.bind(this.obTreeRows[t].RIGHT,"click",BX.delegate(this.RowRight,this))}this.SetCurrent();break}if(!!this.obBuyBtn){BX.bind(this.obBuyBtn,"click",BX.delegate(this.Basket,this))}}};t.JCCatalogTopBanner.prototype.QuantityUp=function(){var t=0;var i=true;if(0===this.errorCode&&this.showQuantity){t=this.isDblQuantity?parseFloat(this.obQuantity.value):parseInt(this.obQuantity.value);if(!isNaN(t)){t+=this.stepQuantity;if(this.checkQuantity){if(t>this.maxQuantity)i=false}if(i){if(this.isDblQuantity){t=Math.round(t*this.precisionFactor)/this.precisionFactor}this.obQuantity.value=t}}}};t.JCCatalogTopBanner.prototype.QuantityDown=function(){var t=0;var i=true;if(0===this.errorCode&&this.showQuantity){t=this.isDblQuantity?parseFloat(this.obQuantity.value):parseInt(this.obQuantity.value);if(!isNaN(t)){t-=this.stepQuantity;if(t<this.stepQuantity)i=false;if(i){if(this.isDblQuantity){t=Math.round(t*this.precisionFactor)/this.precisionFactor}this.obQuantity.value=t}}}};t.JCCatalogTopBanner.prototype.QuantityChange=function(){var t=0;var i=true;if(0===this.errorCode&&this.showQuantity){t=this.isDblQuantity?parseFloat(this.obQuantity.value):parseInt(this.obQuantity.value);if(!isNaN(t)){if(this.checkQuantity){if(t>this.maxQuantity){i=false;t=this.maxQuantity}else if(t<this.stepQuantity){i=false;t=this.stepQuantity}}if(!i){this.obQuantity.value=t}}else{this.obQuantity.value=this.stepQuantity}}};t.JCCatalogTopBanner.prototype.QuantitySet=function(t){if(0===this.errorCode){this.canBuy=this.offers[t].CAN_BUY;if(this.showQuantity){this.isDblQuantity=this.offers[t].QUANTITY_FLOAT;this.checkQuantity=this.offers[t].CHECK_QUANTITY;this.maxQuantity=this.isDblQuantity?parseFloat(this.offers[t].MAX_QUANTITY):parseInt(this.offers[t].MAX_QUANTITY);this.stepQuantity=this.isDblQuantity?parseFloat(this.offers[t].STEP_QUANTITY):parseInt(this.offers[t].STEP_QUANTITY);if(this.isDblQuantity){this.stepQuantity=Math.round(this.stepQuantity*this.precisionFactor)/this.precisionFactor}this.obQuantity.value=this.stepQuantity;if(!!this.obMeasure){if(!!this.offers[t].MEASURE){BX.adjust(this.obMeasure,{html:this.offers[t].MEASURE})}else{BX.adjust(this.obMeasure,{html:""})}}}}};t.JCCatalogTopBanner.prototype.SelectOfferProp=function(){var t=0;var i="";var s=BX.proxy_context;if(!!s&&s.hasAttribute("data-treevalue")){var e=s.getAttribute("data-treevalue");var a=e.split("_");if(this.SearchOfferPropIndex(a[0],a[1])){var r=BX.findChildren(s.parentNode,{tagName:"li"},false);if(!!r&&0<r.length){for(t=0;t<r.length;t++){i=r[t].getAttribute("data-onevalue");if(i==a[1])BX.addClass(r[t],"bx_active");else BX.removeClass(r[t],"bx_active")}}}}};t.JCCatalogTopBanner.prototype.SearchOfferPropIndex=function(t,i){var s="";var e=null;var a=[];var r=-1;for(var o=0;o<this.treeProps.length;o++){if(this.treeProps[o].ID==t){r=o;break}}if(-1<r){var h={};for(o=0;o<r;o++){s="PROP_"+this.treeProps[o].ID;h[s]=this.selectedValues[s]}s="PROP_"+this.treeProps[r].ID;e=this.GetRowValues(h,s);if(!e)return false;if(!BX.util.in_array(i,e))return false;h[s]=i;for(o=r+1;o<this.treeProps.length;o++){s="PROP_"+this.treeProps[o].ID;e=this.GetRowValues(h,s);if(!e)return false;if(this.showAbsent){a=[];var n=[];n=BX.clone(h,true);for(var l=0;l<e.length;l++){n[s]=e[l];if(this.GetCanBuy(n))a[a.length]=e[l]}}else{a=e}if(!!this.selectedValues[s]&&BX.util.in_array(this.selectedValues[s],a))h[s]=this.selectedValues[s];else h[s]=a[0];this.UpdateRow(o,h[s],e,a)}this.selectedValues=h;this.ChangeInfo()}return true};t.JCCatalogTopBanner.prototype.RowLeft=function(){var t=BX.proxy_context;if(!!t&&t.hasAttribute("data-treevalue")){var i=t.getAttribute("data-treevalue");var s=-1;for(var e=0;e<this.treeProps.length;e++){if(this.treeProps[e].ID==i){s=e;break}}if(-1<s&&5<this.showCount[s]){if(0>this.showStart[s]){this.showStart[s]++;BX.adjust(this.obTreeRows[s].LIST,{style:{marginLeft:this.showStart[s]*20+"%"}})}}}};t.JCCatalogTopBanner.prototype.RowRight=function(){var t=BX.proxy_context;if(!!t&&t.hasAttribute("data-treevalue")){var i=t.getAttribute("data-treevalue");var s=-1;for(var e=0;e<this.treeProps.length;e++){if(this.treeProps[e].ID==i){s=e;break}}if(-1<s&&5<this.showCount[s]){if(5-this.showStart[s]<this.showCount[s]){this.showStart[s]--;BX.adjust(this.obTreeRows[s].LIST,{style:{marginLeft:this.showStart[s]*20+"%"}})}}}};t.JCCatalogTopBanner.prototype.UpdateRow=function(t,i,s,e){var a=0;var r;var o=0;var h="";if(-1<t&&t<this.obTreeRows.length){var n=BX.findChildren(this.obTreeRows[t].LIST,{tagName:"li"},false);if(!!n&&0<n.length){o=s.length;h=5<o?100/o+"%":"20%";var l={props:{className:""},style:{width:h}};if("PICT"==this.treeProps[t].SHOW_MODE)l.style.paddingTop=h;for(a=0;a<n.length;a++){r=n[a].getAttribute("data-onevalue");if(BX.util.in_array(r,e)){if(r==i)l.props.className="bx_active";else l.props.className=""}else{if(r==i)l.props.className="bx_active bx_missing";else l.props.className="bx_missing"}if(BX.util.in_array(r,s))l.style.display="";else l.style.display="none";BX.adjust(n[a],l)}l={style:{width:(5<o?20*o:100)+"%",marginLeft:"0%"}};BX.adjust(this.obTreeRows[t].LIST,l);if("PICT"==this.treeProps[t].SHOW_MODE)BX.adjust(this.obTreeRows[t].CONT,{props:{className:5<o?"bx_item_detail_scu full":"bx_item_detail_scu"}});else BX.adjust(this.obTreeRows[t].CONT,{props:{className:5<o?"bx_item_detail_size full":"bx_item_detail_size"}});if(5<o){BX.adjust(this.obTreeRows[t].LEFT,{style:{display:""}});BX.adjust(this.obTreeRows[t].RIGHT,{style:{display:""}})}else{BX.adjust(this.obTreeRows[t].LEFT,{style:{display:"none"}});BX.adjust(this.obTreeRows[t].RIGHT,{style:{display:"none"}})}this.showCount[t]=o;this.showStart[t]=0}}};t.JCCatalogTopBanner.prototype.GetRowValues=function(t,i){var s=[];var e=false;var a=0;if(0===t.length){for(a=0;a<this.offers.length;a++){if(!BX.util.in_array(this.offers[a].TREE[i],s))s[s.length]=this.offers[a].TREE[i]}e=true}else{for(a=0;a<this.offers.length;a++){var r=true;for(var o in t){if(t[o]!=this.offers[a].TREE[o]){r=false;break}}if(r){if(!BX.util.in_array(this.offers[a].TREE[i],s))s[s.length]=this.offers[a].TREE[i];e=true}}}return e?s:false};t.JCCatalogTopBanner.prototype.GetCanBuy=function(t){var i=false;for(var s=0;s<this.offers.length;s++){var e=true;for(var a in t){if(t[a]!=this.offers[s].TREE[a]){e=false;break}}if(e){if(this.offers[s].CAN_BUY){i=true;break}}}return i};t.JCCatalogTopBanner.prototype.SetCurrent=function(){var t={};var i=[];var s=this.offers[this.offerNum].TREE;for(var e=0;e<this.treeProps.length;e++){var a="PROP_"+this.treeProps[e].ID;var r=this.GetRowValues(t,a);if(!r)break;if(BX.util.in_array(s[a],r)){t[a]=s[a]}else{t[a]=r[0];this.offerNum=0}if(this.showAbsent){i=[];var o=[];o=BX.clone(t,true);for(var h=0;h<r.length;h++){o[a]=r[h];if(this.GetCanBuy(o))i[i.length]=r[h]}}else{i=r}this.UpdateRow(e,t[a],r,i)}this.selectedValues=t;this.ChangeInfo()};t.JCCatalogTopBanner.prototype.ChangeInfo=function(){var t=-1;for(var i=0;i<this.offers.length;i++){var s=true;for(var e in this.selectedValues){if(this.selectedValues[e]!=this.offers[i].TREE[e]){s=false;break}}if(s){t=i;break}}if(-1<t){if(!!this.obPict){if(!!this.offers[t].PREVIEW_PICTURE)BX.adjust(this.obPict,{style:{backgroundImage:"url("+this.offers[t].PREVIEW_PICTURE.SRC+")"}});else BX.adjust(this.obPict,{style:{backgroundImage:"url("+this.defaultPict.pict.SRC+")"}})}if(this.secondPict&&!!this.obSecondPict){if(!!this.offers[t].PREVIEW_PICTURE_SECOND)BX.adjust(this.obSecondPict,{style:{backgroundImage:"url("+this.offers[t].PREVIEW_PICTURE_SECOND.SRC+")"}});else if(!!this.offers[t].PREVIEW_PICTURE.SRC)BX.adjust(this.obSecondPict,{style:{backgroundImage:"url("+this.offers[t].PREVIEW_PICTURE.SRC+")"}});else if(!!this.defaultPict.secondPict)BX.adjust(this.obSecondPict,{style:{backgroundImage:"url("+this.defaultPict.secondPict.SRC+")"}});else BX.adjust(this.obSecondPict,{style:{backgroundImage:"url("+this.defaultPict.pict.SRC+")"}})}if(this.showSkuProps&&!!this.obSkuProps){if(0===this.offers[t].DISPLAY_PROPERTIES.length){BX.adjust(this.obSkuProps,{style:{display:"none"},html:""})}else{BX.adjust(this.obSkuProps,{style:{display:""},html:this.offers[t].DISPLAY_PROPERTIES})}}if(!!this.obPrice){var a=this.offers[t].PRICE.PRINT_DISCOUNT_VALUE;if(this.showOldPrice&&this.offers[t].PRICE.DISCOUNT_VALUE!=this.offers[t].PRICE.VALUE)a+=" <span>"+this.offers[t].PRICE.PRINT_VALUE+"</span>";BX.adjust(this.obPrice,{html:a});if(this.showPercent){var r={};if(this.offers[t].PRICE.DISCOUNT_VALUE!=this.offers[t].PRICE.VALUE){r={style:{display:""},html:this.offers[t].PRICE.DISCOUNT_DIFF_PERCENT}}else{r={style:{display:"none"},html:""}}if(!!this.obDscPerc)BX.adjust(this.obDscPerc,r);if(!!this.obSecondDscPerc)BX.adjust(this.obSecondDscPerc,r)}}this.offerNum=t;if(this.showQuantity){this.QuantitySet(this.offerNum)}}};t.JCCatalogTopBanner.prototype.InitBasketUrl=function(){switch(this.productType){case 1:case 2:this.basketUrl=this.product.addUrl;break;case 3:this.basketUrl=this.offers[this.offerNum].ADD_URL;break}this.basketParams={ajax_basket:"Y"};if(this.showQuantity){this.basketParams[this.basketData.quantity]=this.obQuantity.value}};t.JCCatalogTopBanner.prototype.FillBasketProps=function(){if(!this.visual.BASKET_PROP_DIV){return}var t=0,i=null,s=false,e=null;if(this.basketData.useProps&&!this.basketData.emptyProps){if(!!this.obPopupWin&&!!this.obPopupWin.contentContainer){e=this.obPopupWin.contentContainer}}else{e=BX(this.visual.BASKET_PROP_DIV)}if(!e){return}i=e.getElementsByTagName("select");if(!!i&&!!i.length){for(t=0;t<i.length;t++){if(!i[t].disabled){switch(i[t].type.toLowerCase()){case"select-one":this.basketParams[i[t].name]=i[t].value;s=true;break;default:break}}}}i=e.getElementsByTagName("input");if(!!i&&!!i.length){for(t=0;t<i.length;t++){if(!i[t].disabled){switch(i[t].type.toLowerCase()){case"hidden":this.basketParams[i[t].name]=i[t].value;s=true;break;case"radio":if(i[t].checked){this.basketParams[i[t].name]=i[t].value;s=true}break;default:break}}}}if(!s){this.basketParams[this.basketData.props]=[];this.basketParams[this.basketData.props][0]=0}};t.JCCatalogTopBanner.prototype.SendToBasket=function(){if(!this.canBuy){return}this.InitBasketUrl();this.FillBasketProps();BX.ajax.loadJSON(this.basketUrl,this.basketParams,BX.delegate(this.BasketResult,this))};t.JCCatalogTopBanner.prototype.Basket=function(){var t="";if(!this.canBuy){return}switch(this.productType){case 1:case 2:if(this.basketData.useProps&&!this.basketData.emptyProps){this.InitPopupWindow();this.obPopupWin.setTitleBar(BX.message("TITLE_BASKET_PROPS"));if(BX(this.visual.BASKET_PROP_DIV)){t=BX(this.visual.BASKET_PROP_DIV).innerHTML}this.obPopupWin.setContent(t);this.obPopupWin.setButtons([new i({ownerClass:this.obProduct.parentNode.parentNode.className,text:BX.message("BTN_MESSAGE_SEND_PROPS"),events:{click:BX.delegate(this.SendToBasket,this)}})]);this.obPopupWin.show()}else{this.SendToBasket()}break;case 3:this.SendToBasket();break}};t.JCCatalogTopBanner.prototype.BasketResult=function(t){var s="",e="",a="",r,o=[];if(!!this.obPopupWin)this.obPopupWin.close();if(!BX.type.isPlainObject(t))return;r="OK"===t.STATUS;if(r){BX.onCustomEvent("OnBasketChange");e=this.product.name;switch(this.productType){case 1:case 2:a=this.product.pict.SRC;break;case 3:a=!!this.offers[this.offerNum].PREVIEW_PICTURE?this.offers[this.offerNum].PREVIEW_PICTURE.SRC:this.defaultPict.pict.SRC;break}s='<div style="width: 100%; margin: 0; text-align: center;"><img src="'+a+'" height="130"><p>'+e+"</p></div>";o=[new i({ownerClass:this.obProduct.parentNode.parentNode.className,text:BX.message("BTN_MESSAGE_BASKET_REDIRECT"),events:{click:BX.delegate(function(){location.href=!!this.basketData.basketUrl?this.basketData.basketUrl:BX.message("BASKET_URL")},this)}})]}else{s=!!t.MESSAGE?t.MESSAGE:BX.message("BASKET_UNKNOWN_ERROR");o=[new i({ownerClass:this.obProduct.parentNode.parentNode.className,text:BX.message("BTN_MESSAGE_CLOSE"),events:{click:BX.delegate(this.obPopupWin.close,this.obPopupWin)}})]}this.InitPopupWindow();this.obPopupWin.setTitleBar(r?BX.message("TITLE_SUCCESSFUL"):BX.message("TITLE_ERROR"));this.obPopupWin.setContent(s);this.obPopupWin.setButtons(o);this.obPopupWin.show()};t.JCCatalogTopBanner.prototype.InitPopupWindow=function(){if(!!this.obPopupWin)return;this.obPopupWin=BX.PopupWindowManager.create("CatalogSectionBasket_"+this.visual.ID,null,{autoHide:false,offsetLeft:0,offsetTop:0,overlay:true,closeByEsc:true,titleBar:true,closeIcon:true,contentColor:"white"})};if(!!t.JCCatalogTopBannerList)return;t.JCCatalogTopBannerList=function(t){this.params=null;this.prevIndex=-1;this.currentIndex=0;this.size=0;this.rotate=false;this.rotateTimer=3e4;this.rotatePause=false;this.showPages=false;this.errorCode=0;this.slider={cont:null,row:null,items:null,arrows:null,left:null,right:null,pagination:null,pages:null};if(!t||"object"!=typeof t){this.errorCode=-1}if(0===this.errorCode){this.params=t}if(!!this.params.rotate)this.rotate=this.params.rotate;if(!!this.params.rotateTimer){this.params.rotateTimer=parseInt(this.params.rotateTimer);if(!isNaN(this.params.rotateTimer)&&0<=this.params.rotateTimer)this.rotateTimer=this.params.rotateTimer}if(0===this.errorCode){BX.ready(BX.delegate(this.Init,this))}};t.JCCatalogTopBannerList.prototype.Init=function(){if(0>this.errorCode)return;var t=0;if(!!this.params.cont){this.slider.cont=BX(this.params.cont)}if(!!this.params.items&&BX.type.isArray(this.params.items)){this.slider.items=[];for(t=0;t<this.params.items.length;t++){this.slider.items[this.slider.items.length]=BX(this.params.items[t]);this.slider.items[this.slider.items.length-1].style.opacity=0;if(!this.slider.row)this.slider.row=this.slider.items[this.slider.items.length-1].parentNode}this.slider.items[0].style.opacity=1;this.size=this.slider.items.length}if(!!this.params.arrows){if(BX.type.isDomNode(this.params.arrows))this.slider.arrows=this.params.arrows;else if("object"==typeof this.params.arrows)this.slider.arrows=this.slider.cont.appendChild(BX.create("DIV",{props:{id:this.params.arrows.id,className:this.params.arrows.className}}));else if(BX.type.isNotEmptyString(this.params.arrows))this.slider.arrows=BX(this.params.arrows)}if(!this.slider.arrows){this.slider.arrows=this.slider.cont}if(!!this.params.left){if(BX.type.isDomNode(this.params.left))this.slider.left=this.params.left;else if("object"==typeof this.params.left)this.slider.left=this.slider.arrows.appendChild(BX.create("DIV",{props:{id:this.params.left.id,className:this.params.left.className}}));else if(BX.type.isNotEmptyString(this.params.left))this.slider.left=BX(this.params.left)}if(!!this.params.right){if(BX.type.isDomNode(this.params.right))this.slider.right=this.params.right;else if("object"==typeof this.params.right)this.slider.right=this.slider.arrows.appendChild(BX.create("DIV",{props:{id:this.params.right.id,className:this.params.right.className}}));else if(BX.type.isNotEmptyString(this.params.right))this.slider.right=BX(this.params.right)}if(!!this.params.pagination){if(BX.type.isDomNode(this.params.pagination))this.slider.pagination=this.params.pagination;else if("object"==typeof this.params.pagination)this.slider.pagination=this.slider.cont.appendChild(BX.create("UL",{props:{id:this.params.pagination.id,className:this.params.pagination.className}}));else if(BX.type.isNotEmptyString(this.params.pagination))this.slider.pagination=BX(this.params.pagination)}if(!!this.slider.pagination){this.showPages=true;this.slider.pages=[];for(t=0;t<this.slider.items.length;t++){this.slider.pages[this.slider.pages.length]=this.slider.pagination.appendChild(BX.create("LI",{props:{className:0===t?"active":""},attrs:{"data-pagevalue":t.toString()},events:{click:BX.delegate(this.RowMove,this)},html:"<span></span>"}))}}if(0===this.errorCode){if(this.rotate&&!!this.slider.cont&&0<this.rotateTimer){BX.bind(this.slider.cont,"mouseover",BX.delegate(this.RotateStop,this));BX.bind(this.slider.cont,"mouseout",BX.delegate(this.RotateStart,this));setTimeout(BX.delegate(this.RowRotate,this),this.rotateTimer)}if(!!this.slider.left){BX.bind(this.slider.left,"click",BX.delegate(this.RowLeft,this))}if(!!this.slider.right){BX.bind(this.slider.right,"click",BX.delegate(this.RowRight,this))}}};t.JCCatalogTopBannerList.prototype.RowStart=function(){if(0>this.errorCode)return;BX.removeClass(this.slider.items[this.prevIndex],"active");if(this.showPages){BX.removeClass(this.slider.pages[this.prevIndex],"active")}};t.JCCatalogTopBannerList.prototype.RowAnimate=function(t){if(0>this.errorCode)return;this.slider.items[this.prevIndex].style.opacity=(100-t.opacity)/100;this.slider.items[this.currentIndex].style.opacity=t.opacity/100};t.JCCatalogTopBannerList.prototype.RowComplete=function(){if(0>this.errorCode)return;BX.addClass(this.slider.items[this.currentIndex],"active");if(this.showPages){BX.addClass(this.slider.pages[this.currentIndex],"active")}};t.JCCatalogTopBannerList.prototype.RowLeft=function(){if(0>this.errorCode)return;this.prevIndex=this.currentIndex;this.currentIndex=(0===this.currentIndex?this.size:this.currentIndex)-1;new BX.easing({duration:800,start:{left:-this.prevIndex*100},finish:{left:-this.currentIndex*100},transition:BX.easing.transitions.quart,step:BX.delegate(function(t){this.slider.row.style.left=t.left+"%"},this)}).animate();this.RowStart();new BX.easing({duration:1200,start:{opacity:0},finish:{opacity:100},transition:BX.easing.transitions.quart,step:BX.delegate(function(t){this.RowAnimate(t)},this),complete:BX.delegate(this.RowComplete,this)}).animate()};t.JCCatalogTopBannerList.prototype.RowRight=function(){if(0>this.errorCode)return;this.prevIndex=this.currentIndex;this.currentIndex++;if(this.currentIndex==this.size)this.currentIndex=0;new BX.easing({duration:800,start:{left:-this.prevIndex*100},finish:{left:-this.currentIndex*100},transition:BX.easing.transitions.quart,step:BX.delegate(function(t){this.slider.row.style.left=t.left+"%"},this)}).animate();this.RowStart();new BX.easing({duration:1200,start:{opacity:0},finish:{opacity:100},transition:BX.easing.transitions.quart,step:BX.delegate(function(t){this.RowAnimate(t)},this),complete:BX.delegate(this.RowComplete,this)}).animate()};t.JCCatalogTopBannerList.prototype.RowMove=function(){if(0>this.errorCode)return;var t=BX.proxy_context;if(!!t&&t.hasAttribute("data-pagevalue")){var i=parseInt(t.getAttribute("data-pagevalue"));if(!isNaN(i)&&i<this.size){this.prevIndex=this.currentIndex;this.currentIndex=i;this.slider.row.style.left=-this.currentIndex*100+"%";this.slider.items[this.prevIndex].style.opacity=0;this.RowStart();new BX.easing({duration:800,start:{opacity:0},finish:{opacity:100},transition:BX.easing.transitions.quart,step:BX.delegate(function(t){this.RowAnimate(t)},this),complete:BX.delegate(this.RowComplete,this)}).animate()}}};t.JCCatalogTopBannerList.prototype.RowRotate=function(){if(0>this.errorCode)return;if(!this.rotatePause){this.RowRight()}setTimeout(BX.delegate(this.RowRotate,this),this.rotateTimer)};t.JCCatalogTopBannerList.prototype.RotateStart=function(){if(0>this.errorCode)return;this.rotatePause=false};t.JCCatalogTopBannerList.prototype.RotateStop=function(){if(0>this.errorCode)return;this.rotatePause=true}})(window);
//# sourceMappingURL=script.map.js

Youez - 2016 - github.com/yon3zu
LinuXploit