%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 3.22.130.108
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/sender.ui.tile.selector/templates/.default/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/components/bitrix/sender.ui.tile.selector/templates/.default/script.min.js
(function(t){BX.namespace("BX.Sender.UI");if(BX.Sender.UI.TileSelector){return}var e=[];function i(t){this.id=t.id;this.node=t.node;this.data=t.data;this.nameNode=o.getNode("tile-item-name",this.node)}function n(t){this.init(t)}n.prototype.events={containerClick:"container-click",tileClick:"tile-click",tileRemove:"tile-remove",tileEdit:"tile-edit",tileAdd:"tile-add",buttonAdd:"add",buttonSelect:"select",buttonSelectFirst:"select-first",search:"search",input:"input",searcherCategoryClick:"popup-category-click",searcherItemClick:"popup-item-click"};n.getById=function(t){var i=e.filter(function(e){return e.id===t});return i.length>0?i[0]:null};n.getList=function(){return e};n.prototype.init=function(t){this.list=[];this.id=t.id;this.context=BX(t.containerId);this.duplicates=t.duplicates;this.multiple=t.multiple;this.readonly=t.readonly;this.manualInputEnd=t.manualInputEnd;this.checkOnStatic=t.checkOnStatic;this.notifyContent=t.notifyContent;this.attributeId="data-bx-id";this.attributeData="data-bx-data";this.tileContainer=o.getNode("tile-container",this.context);this.tileTemplate=o.getNode("tile-template",this.context);this.input=o.getNode("tile-input",this.context);this.buttonAdd=o.getNode("tile-add",this.context);this.buttonSelect=o.getNode("tile-select",this.context);if(!this.context||!this.input){return}o.getNodes("tile-item",this.context).forEach(this.initNode.bind(this));if(!this.readonly){this.initEventHandlers()}this.searcher=null;e.push(this)};n.prototype.initEventHandlers=function(){if(this.buttonAdd){BX.bind(this.buttonAdd,"click",this.onButtonAdd.bind(this))}if(this.context){BX.bind(this.context,"click",this.onContainerClick.bind(this))}if(this.buttonSelect){BX.bind(this.buttonSelect,"click",this.onButtonSelect.bind(this));BX.bind(this.tileContainer,"click",this.onButtonSelect.bind(this))}BX.bind(this.input,"input",this.onInput.bind(this));if(!this.manualInputEnd){BX.bind(this.input,"blur",this.onInputEnd.bind(this));o.handleKeyEnter(this.input,this.onInputEnd.bind(this))}};n.prototype.getSearchInput=function(){return this.input};n.prototype.isSearcherInit=function(){return!!this.searcher};n.prototype.clearSearcher=function(){this.isButtonSelectFired=false;if(this.searcher){this.searcher.hide();this.searcher=null}};n.prototype.hideSearcher=function(){this.searcher.hide()};n.prototype.showSearcher=function(t){if(!this.searcher){this.searcher=new s({id:this.id,caller:this,context:this.context,notifyContent:this.notifyContent,checkOnStatic:this.checkOnStatic,title:t||""})}this.searcher.filterByName();this.searcher.show()};n.prototype.setSearcherData=function(t){if(!this.searcher){this.showSearcher()}this.searcher.setCategories(t)};n.prototype.initNode=function(t){if(!t){return null}var e=t.getAttribute(this.attributeId);var n=t.getAttribute(this.attributeData);try{n=JSON.parse(n)}catch(t){try{n=JSON.parse(BX.util.htmlspecialcharsback(n))}catch(t){n={}}}var s=new i({id:e,node:t,data:n});if(s.id&&!this.duplicates&&this.findDuplicates(s.id)){s=null;return null}var r=o.getNode("remove",t);if(r){BX.bind(r,"click",this.onRemove.bind(this,s))}BX.bind(t,"click",this.onClick.bind(this,s));this.list.push(s);return s};n.prototype.onRemove=function(t,e){e.preventDefault();e.stopPropagation();this.removeTile(t);return false};n.prototype.onClick=function(t,e){e.preventDefault();e.stopPropagation();this.fire(this.events.tileClick,[t])};n.prototype.removeTiles=function(){var t=this.list;t.forEach(this.removeTile.bind(this))};n.prototype.removeTile=function(t){this.list=BX.util.deleteFromArray(this.list,this.list.indexOf(t));BX.remove(t.node);this.fire(this.events.tileRemove,[t])};n.prototype.getTile=function(t){var e=this.list.filter(function(e){return e.id===t});return e.length>0?e[0]:null};n.prototype.getTilesData=function(){return this.list.map(function(t){return t.data})};n.prototype.getTilesId=function(){return this.list.map(function(t){return t.id}).filter(function(t){return!!t})};n.prototype.getTiles=function(){return this.list};n.prototype.findDuplicates=function(t){var e=this.getTile(t);if(!e){return false}this.removeTile(e)};n.prototype.addTile=function(t,e,i,n,s){if(!t||this.readonly){return null}if(!this.multiple){this.removeTiles();if(this.isSearcherInit()){this.hideSearcher()}}e=e||{};i=i||"";s=s||"";n=n||"";var r=this.tileTemplate;if(!r){return null}r=r.textContent;var a="";if(s){a+="color: "+BX.util.htmlspecialchars(s)+"; "}if(n){a+="background-color: "+BX.util.htmlspecialchars(n)+"; "}r=o.replace(r,{id:BX.util.htmlspecialchars(i+""),name:t,data:BX.util.htmlspecialchars(JSON.stringify(e)),style:a});var h=document.createElement("div");h.innerHTML=r;h=h.children[0];var c=this.initNode(h);if(!c){return null}this.input.parentNode.insertBefore(h,this.input);this.fire(this.events.tileAdd,[c]);return c};n.prototype.updateTile=function(t,e,i,n,o){if(!t||this.readonly){return null}e=e||null;i=i||null;n=n||null;o=o||null;if(e){t.nameNode.textContent=e}if(i){t.data=i}if(n||n===null){t.node.style.backgroundColor=n}if(o){t.node.style.color=o}this.fire(this.events.tileEdit,[t]);return t};n.prototype.fire=function(t,e){BX.onCustomEvent(this,t,e)};n.prototype.onInput=function(){var t=this.input.value;if(this.searcher&&t.length>0){this.searcher.filterByName(t)}this.fire(this.events.input,[this.input.value])};n.prototype.onInputEnd=function(){var t=this.input.value;this.input.value="";o.changeDisplay(this.input,false);o.changeDisplay(this.buttonSelect,true);this.fire(this.events.search,[t])};n.prototype.onButtonAdd=function(t){t.preventDefault();t.stopPropagation();this.fire(this.events.buttonAdd,[])};n.prototype.onContainerClick=function(){this.fire(this.events.containerClick,[])};n.prototype.onButtonSelect=function(t){t.preventDefault();t.stopPropagation();o.changeDisplay(this.buttonSelect,false);o.changeDisplay(this.input,true);this.input.focus();this.fire(this.events.buttonSelect,[]);if(!this.isButtonSelectFired){this.fire(this.events.buttonSelectFirst,[]);this.isButtonSelectFired=true}};var o={getObjectByKey:function(t,e,i){var n=t.filter(function(t){return t.hasOwnProperty(e)&&t[e]===i});return n.length>0?n[0]:null},getNode:function(t,e){var i=this.getNodes(t,e);return i.length>0?i[0]:null},getNodes:function(t,e){if(!e){return[]}return BX.convert.nodeListToArray(e.querySelectorAll('[data-role="'+t+'"]'))},changeClass:function(t,e,i){if(!t){return}if(i){BX.addClass(t,e)}else{BX.removeClass(t,e)}},changeDisplay:function(t,e){if(!t){return}t.style.display=e?"":"none"},replace:function(t,e,i){e=e||{};i=i||false;if(!t){return""}for(var n in e){if(!e.hasOwnProperty(n)){continue}var o=e[n];o=o||"";if(!i&&o){o=BX.util.htmlspecialchars(o)}t=t.replace(new RegExp("%"+n+"%","g"),o)}return t},handleKeyEnter:function(e,i){if(!i){return}var n=function(e){e=e||t.event;if(e.keyCode===10||e.keyCode===13){e.preventDefault();e.stopPropagation();i();return false}};BX.bind(e,"keyup",n)},getTemplatedNode:function(t,e,i){if(!t){return null}var n=o.replace(t.innerHTML,e,i);var s=document.createElement("div");s.innerHTML=n;return s.children[0]}};function s(t){this.init(t)}s.prototype.classNameCategoryActive="sender-ui-tile-searcher-sidebar-item-selected";s.prototype.classNameItemActive="sender-ui-tile-searcher-content-item-selected";s.prototype.init=function(t){this.id=t.id;this.context=t.context;this.caller=t.caller;this.checkOnStatic=t.checkOnStatic;this.notifyContent=t.notifyContent;this.categories=[];this.items=[];this.currentCategory=null;this.categoryTemplate=o.getNode("popup-category-template",this.context);this.itemTemplate=o.getNode("popup-item-template",this.context);this.content=o.getTemplatedNode(o.getNode("popup-template",this.context));this.loader=o.getNode("popup-loader",this.content);this.categoryContainer=o.getNode("popup-category-list",this.content);this.itemContainer=o.getNode("popup-item-list",this.content);this.itemContainer.innerHTML="";this.categoryContainer.innerHTML="";this.title=o.getNode("popup-title",this.content);if(this.title){this.title.textContent=t.title}if(t.dataList){this.setCategories(t.dataList)}BX.addCustomEvent(this.caller,this.caller.events.tileAdd,this.onTileAdd.bind(this));BX.addCustomEvent(this.caller,this.caller.events.tileRemove,this.onTileRemove.bind(this))};s.prototype.onTileAdd=function(t){if(t.data.hasStatic&&this.checkOnStatic){BX.UI.Notification.Center.notify({content:this.notifyContent,position:"top-right",autoHideDelay:5e3})}var e=o.getObjectByKey(this.items,"id",t.id);if(!e){return}o.changeClass(e.node,this.classNameItemActive,true)};s.prototype.onTileRemove=function(t){var e=o.getObjectByKey(this.items,"id",t.id);if(!e){return}o.changeClass(e.node,this.classNameItemActive,false)};s.prototype.filterByName=function(t){t=t||"";if(t.length<3){o.changeDisplay(this.categoryContainer,true);this.setCurrentCategory();return}var e=new RegExp(BX.util.escapeRegExp(t),"i");this.items.forEach(function(t){o.changeDisplay(t.node,e.test(t.name))});o.changeDisplay(this.categoryContainer,false)};s.prototype.onCategoryClick=function(t){this.setCurrentCategory(t);this.caller.fire(this.caller.events.searcherCategoryClick,[t])};s.prototype.setCurrentCategory=function(t){t=t||this.categories[0];if(this.currentCategory){BX.removeClass(this.currentCategory.node,this.classNameCategoryActive)}this.currentCategory=t;if(!t){return}BX.addClass(this.currentCategory.node,this.classNameCategoryActive);this.items.forEach(function(e){o.changeDisplay(e.node,e.category===t)})};s.prototype.onItemClick=function(t){this.caller.addTile(t.name,t.data,t.id,t.bgcolor,t.color);this.caller.fire(this.caller.events.searcherItemClick,[t])};s.prototype.getCategory=function(t){return o.getObjectByKey(this.categories,"id",t)};s.prototype.getItem=function(t){return o.getObjectByKey(this.items,"id",t)};s.prototype.updateItem=function(t,e,i){if(e){t.node.textContent=e;t.node.title=e}if(i){t.data=i}};s.prototype.addItem=function(t,e,i,n){var s=o.getTemplatedNode(this.itemTemplate,{name:i});var r={category:t,node:s,id:e,name:i,data:n||{}};this.items.push(r);this.itemContainer.appendChild(s);BX.bind(s,"click",this.onItemClick.bind(this,r));return r};s.prototype.setItems=function(t,e){this.items=[];e.forEach(function(e){this.addItem(t,e.id,e.name,e.data)},this)};s.prototype.addItems=function(t,e){e.forEach(function(e){this.addItem(t,e.id,e.name,e.data)},this)};s.prototype.addCategory=function(t,e,i,n){var s=o.getTemplatedNode(this.categoryTemplate,{name:e});var r={node:s,id:t,name:e,data:i||{}};this.categories.push(r);this.categoryContainer.appendChild(s);BX.bind(s,"click",this.onCategoryClick.bind(this,r));this.addItems(r,n);return r};s.prototype.setCategories=function(t){this.categories=[];t.forEach(function(t){this.addCategory(t.id,t.name,t.data,t.items)},this);if(this.categories.length>0){this.setCurrentCategory(this.categories[0])}var e=this.caller.getTilesId();this.items.filter(function(t){var i=t.id&&BX.util.in_array(t.id,e);o.changeClass(t.node,this.classNameItemActive,i)},this);o.changeDisplay(this.loader,false);o.changeDisplay(this.itemContainer,true);o.changeDisplay(this.categoryContainer,true)};s.prototype.showLoader=function(){o.changeDisplay(this.loader,true)};s.prototype.hide=function(){if(!this.popup){return}this.popup.close()};s.prototype.show=function(){if(this.popup){this.popup.show();return}this.popup=BX.Main.PopupManager.create(this.id,this.context,{width:620,height:300,autoHide:true,lightShadow:true,closeByEsc:true,closeIcon:false,offsetLeft:40,angle:true,buttons:[new BX.UI.CloseButton({onclick:function(){this.popup.close()}.bind(this)})]});this.popup.setContent(this.content);o.changeDisplay(this.content,true);this.popup.show()};BX.Sender.UI.TileSelector=n})(window);
//# sourceMappingURL=script.map.js

Youez - 2016 - github.com/yon3zu
LinuXploit