%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 18.221.188.161
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/modules/sale/install/components/bitrix/sale.location.selector.system/templates/.default/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/sale/install/components/bitrix/sale.location.selector.system/templates/.default/script.min.js
BX.namespace("BX.Sale.component.location.selector");if(typeof BX.Sale.component.location.selector.system=="undefined"&&typeof BX.ui!="undefined"&&typeof BX.ui.widget!="undefined"){BX.Sale.component.location.selector.system=function(e,t){this.parentConstruct(BX.Sale.component.location.selector.system,e);BX.merge(this,{opts:{editUrl:"",pageSize:10,hugeTailLen:30,selectOnBlur:false,selectOnEnter:false,autoSelectIfOneVariant:false,selectByClick:false,closePopupOnOuterClick:false,chooseUsingArrows:false,usePagingOnScroll:true,paginatedRequest:true,callback:BX.DoNothing},vars:{cache:{nodes:{},grp:{},path:{}},selected:{nodes:[],grp:[]},selectedNodesShowOffset:0,selectedParentNode:false,selectedParentType:false,expectChooseAll:false,spMutex:false,parent:null,child:null},sys:{code:"slss"}});this.handleInitStack(t,BX.Sale.component.location.selector.system,e)};BX.extend(BX.Sale.component.location.selector.system,BX.ui.autoComplete);BX.merge(BX.Sale.component.location.selector.system.prototype,{init:function(){var e=this.ctrls,t=this.opts,s=this.vars,o=this;if(typeof t.connected=="object"){for(var n in t.connected.id.l){if(t.connected.id.l.hasOwnProperty(n)){s.selected.nodes.push({id:t.connected.id.l[n],view:null})}}for(var n in t.connected.id.g){if(t.connected.id.g.hasOwnProperty(n)){s.selected.grp.push({id:t.connected.id.g[n],view:null})}}s.cache.nodes=t.connected.data.l;s.cache.grp=t.connected.data.g;s.cache.path=t.connected.data.p}delete t.connected;s.parent=this;s.child=this;s.cache.nodes=this.refineItems(s.parent.vars.cache.nodes);s.cache.grp=s.parent.vars.cache.grp;s.cache.path=s.parent.vars.cache.path;s.selected=BX.clone(s.parent.vars.selected);e.selectedNodes=this.getControl("selected-locations");e.selectedGroups=this.getControl("selected-groups");e.selectedGroupsSeparator=this.getControl("selected-separator");e.selectedNothing=this.getControl("nothing-selected");e.grpSelContainer=this.getControl("selector-groups");e.locTreeSelContainer=this.getControl("selector-locations-tree");e.locSelContainer=this.getControl("selector-locations");e.selectPrompt=this.getControl("select-prompt");e.typeSelector=this.getControl("type");e.chooseAll=this.getControl("choose-all");e.chooseAllSelected=this.getControl("choose-all-selected");e.selectedNodesCntr=this.getControl("selected-node-counter");e.selectedGroupsCntr=this.getControl("selected-group-counter",true);e.inputPool=this.getControl("input-pool");s.tree=new BX.Sale.component.location.selector.system.tree({scope:o.getControl("selector-locations-tree"),source:t.source,langId:typeof this.opts.query.BEHAVIOUR.LANGUAGE_ID!="undefined"?this.opts.query.BEHAVIOUR.LANGUAGE_ID:false});this.pushFuncStack("buildUpDOM",BX.Sale.component.location.selector.system);this.pushFuncStack("bindEvents",BX.Sale.component.location.selector.system)},buildUpDOM:function(){var e=this.ctrls,t=this.opts,s=this.vars,o=this;e.container.style.width="100%";e.inputs.fake.style.width="100%";this.displaySelectedForm()},bindEvents:function(){var e=this.ctrls,t=this.opts,s=this.vars,o=this;BX.bindDelegate(e.grpSelContainer,"click",{tagName:"a"},function(t){var n=BX.data(this,"item-id");if(typeof n!="undefined"){o.resetVariables();o.toggleCheckBoxes(e.vars,false);e.chooseAll.checked=false;BX.hide(o.ctrls.nothingFound);s.selectedParentNode=n;s.selectedParentType="grp";e.typeSelector.value="";o.blockingCall();o.displayPage({GROUP_ID:n})}BX.PreventDefault(t)});BX.bind(e.typeSelector,"change",function(){if(typeof o.vars.lastQuery!="undefined"&&o.vars.lastQuery!=null&&typeof o.vars.lastQuery.QUERY!="undefined")o.displayPage(o.vars.lastQuery)});BX.bind(this.getControl("select"),"click",function(){o.selectChecked()});BX.bind(this.getControl("deselect"),"click",function(){o.deSelectChecked()});BX.bind(e.chooseAll,"click",function(){o.toggleCheckBoxes(e.vars,this.checked)});BX.bind(e.chooseAllSelected,"click",function(){o.toggleCheckBoxes(e.selectedNodes,this.checked);o.toggleCheckBoxes(e.selectedGroups,this.checked)});BX.bind(this.getControl("selected-act-clean"),"click",function(){if(confirm(t.messages.sureCleanSelected))o.clearChoosen()});this.bindEvent("nothing-found",function(){BX.hide(e.selectPrompt)});this.bindEvent("after-clear-selection",function(){BX.show(e.selectPrompt);e.typeSelector.value="";e.chooseAll.checked=false});this.bindEvent("before-input-value-modify",function(){s.selectedParentNode=false});this.bindEvent("after-item-append",function(t){t.querySelector('input[type="checkbox"]').checked=e.chooseAll.checked});BX.bindDelegate(e.locTreeSelContainer,"click",{className:"bx-ui-slss-selector-show-bundle"},function(){var t=0;var n=BX.data(this,"node-id");if(typeof n!="undefined")t=parseInt(n);o.resetVariables();BX.hide(o.ctrls.nothingFound);e.typeSelector.value="";o.blockingCall();o.displayPage({PARENT_ID:t});s.selectedParentNode=t;s.selectedParentType="nodes";s.expectChooseAll=true});var n=this.getControl("selected-pane");e.scrollControllerSelected=new BX.ui.scrollPaneNative({scope:n,controls:{container:n}});s.addPageSelected=BX.debounce(function(){o.showSelectedNodePage()},10);e.scrollControllerSelected.bindEvent("scroll-to-end",s.addPageSelected);e.scrollControllerSelected.bindEvent("has-free-space",s.addPageSelected);BX.show(e.clear);this.showSelectedGroups();s.addPageSelected();this.toggleSelectionAuxCtrls()},whenRenderError:function(e){return this.createNodesByTemplate("error",{message:e},true)[0]},whenDropdownToggle:function(e){if(e){BX.hide(this.ctrls.selectPrompt);BX.show(this.ctrls.pane)}else{this.hideNothingFound();BX.cleanNode(this.ctrls.vars);BX.show(this.ctrls.selectPrompt)}},whenClearToggle:function(){BX.show(this.ctrls.clear)},refineQuery:function(e){var t=this.ctrls.typeSelector.value;if(t!="")e["TYPE_ID"]=t;else delete e["TYPE_ID"];return e},refineRequest:function(e){var t={};var s={1:"PATH"};if(typeof e["QUERY"]!="undefined")t["=PHRASE"]=e.QUERY;if(typeof e["TYPE_ID"]!="undefined")t["=TYPE_ID"]=e.TYPE_ID;if(typeof e["PARENT_ID"]!="undefined"){t["=PARENT_ID"]=e.PARENT_ID;s["2"]="PARENT_ITEM"}if(typeof e["GROUP_ID"]!="undefined")t["=GROUPLOCATION.LOCATION_GROUP_ID"]=e.GROUP_ID;if(typeof this.opts.query.BEHAVIOUR.LANGUAGE_ID!="undefined")t["=NAME.LANGUAGE_ID"]=this.opts.query.BEHAVIOUR.LANGUAGE_ID;return{select:{VALUE:"ID",DISPLAY:"NAME.NAME",1:"CODE",2:"TYPE_ID"},additionals:s,filter:t}},refineResponce:function(e,t){if(typeof e.ETC.PATH_ITEMS!="undefined"){for(var s in e.ETC.PATH_ITEMS){if(e.ETC.PATH_ITEMS.hasOwnProperty(s))if(BX.type.isNotEmptyString(e.ETC.PATH_ITEMS[s].DISPLAY))this.vars.cache.path[s]=e.ETC.PATH_ITEMS[s].DISPLAY}}if(typeof e.ETC.PARENT_ITEM!="undefined"){var o=this.refineItems([e.ETC.PARENT_ITEM]);this.vars.cache.nodes[o[0].VALUE]=o[0];BX.merge(this.vars.cache.path,e.ETC.PATH_NAMES)}return this.refineItems(e.ITEMS)},refineItems:function(e){return e},refineItemDataForTemplate:function(e){e["random_value"]=this.getRandom();if(typeof e["PATH"]=="object"&&e["PATH"].length>0){var t=[];for(var s=0;s<e["PATH"].length;s++)t.push(this.vars.cache.path[e["PATH"][s]]);e["PATH"]=t.join(", ")}else e["PATH"]="";e["TYPE"]=typeof e.TYPE_ID!="undefined"?this.opts.types[parseInt(e.TYPE_ID)]["NAME"].toLowerCase():"";return e},selectChecked:function(){var e=this.vars,t=this.ctrls;var s={nodes:[],grp:[]};var o=t.chooseAll.checked;var n=e.cache.search[this.getCacheKeyForQuery(e.lastQuery)];var r=this.readCheckboxItems(this.ctrls.locSelContainer);if(o){if(r.off.length>0){for(var l=0;l<n.length;l++){if(!BX.util.in_array(+n[l],r.off))s.nodes.push(n[l])}}else{if(e.selectedParentNode!==false&&parseInt(e.selectedParentNode)!=0)s[e.selectedParentType].push(e.selectedParentNode);else s.nodes=n}}else{s.nodes=r.on}s.grp=BX.util.array_merge(s.grp,this.readCheckboxItems(this.ctrls.grpSelContainer).on);t.chooseAll.checked=false;this.selectItems(s)},readCheckboxItems:function(e){var t={on:[],off:[]};checkboxes=e.querySelectorAll('input[type="checkbox"]');for(var s=0;s<checkboxes.length;s++){t[checkboxes[s].checked?"on":"off"].push(+checkboxes[s].value);checkboxes[s].checked=false}return t},deSelectChecked:function(){var e=this.ctrls,t=this.vars;var s={nodes:[],grp:this.readCheckboxItems(this.ctrls.selectedGroups).on};var o=this.readCheckboxItems(this.ctrls.selectedNodes);var n=false;if(e.chooseAllSelected.checked){n=o.off.length==0;for(var r=0;r<t.selected.nodes.length;r++){var l=+t.selected.nodes[r].id;if(!n&&BX.util.in_array(l,o.off))continue;s.nodes.push(l)}}else s.nodes=o.on;e.chooseAllSelected.checked=false;this.deSelectItems(s,n)},selectItems:function(e){var t=this.vars;for(var s in e.grp){if(!e.grp.hasOwnProperty(s))continue;if(this.hasItem(e.grp[s],t.selected.grp)===false)this.selectLinkItem(e.grp[s],"grp")}for(var s in e.nodes){if(!e.nodes.hasOwnProperty(s))continue;if(this.hasItem(e.nodes[s],t.selected.nodes)===false){t.selected.nodes.unshift({id:e.nodes[s],view:null})}}t.selectedNodesShowOffset=0;BX.cleanNode(this.ctrls.selectedNodes);t.addPageSelected();this.ctrls.chooseAll.checked=false;this.toggleSelectionAuxCtrls();this.displaySelectedForm()},deSelectItems:function(e,t){for(var s in e.nodes)if(e.nodes.hasOwnProperty(s))this.deselectLinkItem(e.nodes[s],"nodes",t);if(t)BX.cleanNode(this.ctrls.selectedNodes);for(var s in e.grp)if(e.grp.hasOwnProperty(s))this.deselectLinkItem(e.grp[s],"grp");this.toggleSelectionAuxCtrls();this.displaySelectedForm()},hasItem:function(e,t){for(var s=0;s<t.length;s++){if(t[s].id==e)return s}return false},selectLinkItem:function(e,t){var s=this.makeSelectedItemView(e,t);this.vars.selected[t].unshift({id:e,view:s});BX.prepend(s,this.ctrls[t=="nodes"?"selectedNodes":"selectedGroups"]);if(t=="nodes")this.vars.selectedNodesShowOffset++},deselectLinkItem:function(e,t,s){var o=this.hasItem(e,this.vars.selected[t]);if(o===false)return;var n=this.vars.selected[t][o];if(t=="nodes"&&n.view!==null)this.vars.selectedNodesShowOffset--;if(n.view!==null&&!s)BX.remove(n.view);this.vars.selected[t]=BX.util.deleteFromArray(this.vars.selected[t],o)},makeSelectedItemView:function(e,t){var s=BX.merge({random_value:this.getRandom()},this.vars.cache[t][e]);if(t=="nodes"){path=[];for(var o=0;o<s.PATH.length;o++)path.push(this.vars.cache.path[s.PATH[o]]);s.path=path.join(", ");delete s.PATH;if(typeof this.opts.types[s.TYPE_ID]!="undefined")s.type=this.opts.types[s.TYPE_ID].NAME.toLowerCase();else s.type="?"}return this.createNodesByTemplate("selected-"+(t=="nodes"?"node":"group"),s,true)[0]},showSelectedNodePage:function(){var e=this.vars,t=this.ctrls;if(e.spMutex)return;e.spMutex=true;var s=false;var o=[];var n=[];for(var r=e.selectedNodesShowOffset,l=0;r<e.selected.nodes.length&&l<this.opts.pageSize;r++,l++){if(typeof e.selected.nodes[r]=="undefined")continue;var c=e.selected.nodes[r].id;if(typeof e.cache.nodes[c].PATH=="undefined")o.push(c);n.push(r)}this.downloadPath(o,BX.proxy(function(){for(var o=0;o<n.length;o++){var r=this.makeSelectedItemView(e.selected.nodes[n[o]].id,"nodes");e.selected.nodes[n[o]].view=r;r.querySelector('input[type="checkbox"]').checked=this.ctrls.chooseAllSelected.checked;BX.append(r,this.ctrls.selectedNodes);e.selectedNodesShowOffset++;s=true}if(s)t.scrollControllerSelected.informContentChanged()},this),function(){e.spMutex=false})},showSelectedGroups:function(){var e=this.vars;for(var t=0;t<e.selected.grp.length;t++){var s=this.makeSelectedItemView(e.selected.grp[t].id,"grp");e.selected.grp[t].view=s;s.querySelector('input[type="checkbox"]').checked=this.ctrls.chooseAllSelected.checked;BX.append(s,this.ctrls.selectedGroups)}},clearChoosen:function(){BX.cleanNode(this.ctrls.selectedNodes);BX.cleanNode(this.ctrls.selectedGroups);this.vars.selected.nodes=[];this.vars.selected.grp=[];this.vars.selectedParentNode=false;this.ctrls.chooseAllSelected.checked=false;this.toggleSelectionAuxCtrls();this.displaySelectedForm()},displayVariants:function(e,t){var s=this.ctrls,o=this.vars,n=this.opts,r=this.sys.code;this.hideNothingFound();var l=[];for(var c in e){if(e.hasOwnProperty(c))if(typeof o.cache.nodes[e[c]].PATH=="undefined")l.push(e[c])}this.downloadPath(l,BX.proxy(function(){if(o.expectChooseAll){s.chooseAll.checked=true;o.expectChooseAll=false}if(t==0){BX.cleanNode(s.vars);o.displayedIndex=[];s.displayedItems={}}for(var n in e){if(!e.hasOwnProperty(n))continue;var l=this.whenRenderVariant(e[n])[0];BX.data(l,"bx-"+r+"-item-value",e[n]);s.vars.appendChild(l);this.fireEvent("after-item-append",[l]);o.displayedIndex.push(e[n]);s.displayedItems[e[n]]=l}this.showDropdown();this.fireEvent("after-page-display",[o.cache.nodes,t])},this),function(){})},downloadPath:function(e,t,s){if(e.length==0){t();s();return}var o=this.ctrls,n=this.vars,r=this.opts,l=this;BX.ajax({url:l.opts.source,method:"post",dataType:"json",async:true,processData:true,emulateOnload:true,start:true,data:{REQUEST_TYPE:"get-path",ITEMS:e},onsuccess:function(o){if(o.result){for(var r=0;r<e.length;r++){var c=e[r];try{n.cache.nodes[c].PATH=o.data.PATH[c]}catch(i){n.cache.nodes[c].PATH=[]}}try{for(var a in o.data.PATH_ITEMS){if(!o.data.PATH_ITEMS.hasOwnProperty(a))continue;var d=o.data.PATH_ITEMS[a];n.cache.path[d.VALUE]=d.DISPLAY}}catch(i){BX.debug("Maleficent format of a part of responce to get-path request: PATH_ITEMS")}try{for(var a in o.data.ITEM_NAMES){if(o.data.ITEM_NAMES.hasOwnProperty(a))n.cache.nodes[a].DISPLAY=o.data.ITEM_NAMES[a]}}catch(i){BX.debug("Maleficent format of a part of responce to get-path request: ITEM_NAMES")}t()}else l.showError(l.opts.messages.error,o.errors);s()},onfailure:function(e){s();l.showError(r.messages.error,false,e)}})},toggleSelectionAuxCtrls:function(){var e=this.vars,t=this.ctrls;var s=null;if(e.selected.nodes.length==0&&e.selected.grp.length==0)s="show";else s="hide";BX[s](t.selectedNothing);if(e.selected.nodes.length!=0&&e.selected.grp.length!=0)s="show";else s="hide";BX[s](t.selectedGroupsSeparator);t.scrollControllerSelected.informContentChanged();t.selectedNodesCntr.innerHTML=e.selected.nodes.length;if(BX.type.isElementNode(t.selectedGroupsCntr))t.selectedGroupsCntr.innerHTML=e.selected.grp.length},toggleCheckBoxes:function(e,t){var s=null;var o=[];s=e.querySelectorAll('input[type="checkbox"]');for(var n=0;n<s.length;n++)s[n].checked=t},displaySelectedForm:function(){var e=this.vars,t=this.ctrls,s=this.opts;BX.cleanNode(t.inputPool);var o="";var n="";if(e.selected.nodes.length>0){var r="";for(var l=0;l<e.selected.nodes.length;l++){var c=e.selected.nodes[l].id;var i=e.cache.nodes[c].CODE;n+=r+(s.useCodes?i:c);r=":"}}o+=this.getHTMLByTemplate("location-input",{"=ids":n});n="";if(e.selected.grp.length>0){var r="";for(var l=0;l<e.selected.grp.length;l++){var c=e.selected.grp[l].id;var i=e.cache.grp[c].CODE;n+=r+(s.useCodes?i:c);r=":"}}o+=this.getHTMLByTemplate("group-input",{"=ids":n});BX.html(t.inputPool,o);this.fireEvent("after-select-item");this.fireEvent("after-target-input-modified")},checkSmthSelected:function(){return this.vars.selected.nodes.length>0||this.vars.selected.grp.length>0},getPlural:function(e,t){if(e%10==1&&e%100!=11)return t.element;if(e%10>=2&&e%10<=4&&(e%100<10||e%100>=20))return t.elementa;return t.elementov}})}if(typeof BX.Sale.component.location.selector.system.tree=="undefined"&&typeof BX.ui!="undefined"&&typeof BX.ui.itemTree!="undefined"){BX.Sale.component.location.selector.system.tree=function(e,t){this.parentConstruct(BX.Sale.component.location.selector.system.tree,e);BX.merge(this,{opts:{useDynamicLoading:true,pageSize:20,bindEvents:{"toggle-bundle-before":function(e,t){BX[e?"addClass":"removeClass"](t.expander,"expanded")}}},sys:{code:"item-tree-slss"}});this.handleInitStack(t,BX.Sale.component.location.selector.system.tree,e)};BX.extend(BX.Sale.component.location.selector.system.tree,BX.ui.itemTree);BX.merge(BX.Sale.component.location.selector.system.tree.prototype,{init:function(){this.pushFuncStack("toggleRoot",BX.Sale.component.location.selector.system.tree)},toggleRoot:function(){this.manageCeiling(0,-1);try{this.toggleBundle(0)}catch(e){}},refineRequest:function(e){var t={"=PARENT_ID":parseInt(e.ID)};if(this.opts.langId!==false)t["=NAME.LANGUAGE_ID"]=this.opts.langId;return{select:{VALUE:"ID",DISPLAY:"NAME.NAME",1:"IS_PARENT"},filter:t,additionals:{1:"CNT_BY_FILTER"},version:"2"}},refineResponce:function(e){var t={items:[]};for(var s in e.ITEMS){if(!e.ITEMS.hasOwnProperty(s))continue;var o=typeof e.ITEMS[s].IS_PARENT!="undefined"&&(e.ITEMS[s].IS_PARENT==true||parseInt(e.ITEMS[s].IS_PARENT)>0);t.items.push({name:e.ITEMS[s].DISPLAY,id:e.ITEMS[s].VALUE,is_parent:o?"1":"0",expander_class:o?" bx-ui-item-tree-slss-expander":"",select_class:o?" bx-ui-slss-selector-show-bundle":""})}if(typeof e.ETC.CNT_BY_FILTER!="undefined")t.total=parseInt(e.ETC.CNT_BY_FILTER);return t}})}
//# sourceMappingURL=script.map.js

Youez - 2016 - github.com/yon3zu
LinuXploit