File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/components/bitrix/landing.site_edit/templates/.default/script.min.js
Back
BX.namespace("BX.Landing");BX.Landing.EditComponent=function(e){this.actionCloseId=BX(e);if(this.actionCloseId){BX.bind(this.actionCloseId,"click",BX.delegate(this.actionClose,this))}};BX.Landing.EditComponent.prototype={actionClose:function(){if(typeof top.BX.SidePanel!=="undefined"){setTimeout((function(){top.BX.SidePanel.Instance.close()}),300);top.BX.SidePanel.Instance.postMessage(window,"landingEditClose",{})}}};BX.Landing.SelectColor=function(e){this.id=e.id?e.id:"";this.options=e.options?e.options:[];this.value=e.value?e.value:"";this.DOM={}};BX.Landing.SelectColor.prototype={show:function(){this.checkValue();this.initSectionSelector()},checkValue:function(){if(!this.options[this.value]){this.value=Object.keys(this.options)[0]}},initSectionSelector:function(){this.DOM.sectionWrap=BX(this.id+"_select_color_wrap");this.DOM.sectionInput=BX(this.id+"_select_color");this.DOM.sectionSelect=this.DOM.sectionWrap.appendChild(BX.create("DIV",{props:{className:"select-color-field"}}));this.DOM.sectionSelectInner=this.DOM.sectionSelect.appendChild(BX.create("DIV",{props:{className:"select-color-field-icon"},style:{backgroundColor:this.options[this.value].color}}));this.DOM.sectionSelectInnerText=this.DOM.sectionSelect.appendChild(BX.create("SPAN",{text:this.options[this.value].name}));BX.bind(this.DOM.sectionSelect,"click",o);var e=this,t=this.options;function o(){if(e.sectionMenu&&e.sectionMenu.popupWindow&&e.sectionMenu.popupWindow.isShown()){return e.sectionMenu.close()}var o,n=[],i;for(var s in t){n.push({id:"bx-select-color-option-"+s,text:BX.util.htmlspecialchars(t[s].name),color:t[s].color,className:"select-color-popup-menu-item "+(t[s].class?t[s].class:""),onclick:function(o){return function(){var n=t[o];e.DOM.sectionInput.value=o;e.DOM.sectionSelectInner.style.backgroundColor=n.color;e.DOM.sectionSelectInnerText.innerHTML=BX.util.htmlspecialchars(n.name);e.sectionMenu.close()}}(s)})}e.sectionMenu=BX.PopupMenu.create("selectColor"+e.id,e.DOM.sectionSelect,n,{closeByEsc:true,autoHide:true,offsetTop:0,offsetLeft:0});e.sectionMenu.popupWindow.contentContainer.style.maxHeight="300px";e.sectionMenu.popupWindow.setWidth(e.DOM.sectionSelect.offsetWidth-2);e.sectionMenu.show();for(o=0;o<e.sectionMenu.menuItems.length;o++){if(e.sectionMenu.menuItems[o].layout.item){i=e.sectionMenu.menuItems[o].layout.item.querySelector(".menu-popup-item-icon");if(i){i.style.backgroundColor=e.sectionMenu.menuItems[o].color}}}BX.addClass(e.DOM.sectionSelect,"active");BX.addCustomEvent(e.sectionMenu.popupWindow,"onPopupClose",(function(){BX.removeClass(e.DOM.sectionSelect,"active");e.sectionMenu=null;BX.PopupMenu.destroy("selectColor"+e.id)}))}}};BX.ready((function(){var e=[].slice.call(document.querySelectorAll(".landing-frame-btn"));for(var t=0,o=e.length;t<o;t++){BX.bind(e[t],"click",(function(){top.BX.SidePanel.Instance.open(this.getAttribute("href"),{width:1e3,allowChangeHistory:false,events:{onClose:function(e){if(e.slider.url.indexOf("save=Y")!==-1||e.slider.url.indexOf("switch=Y")!==-1){window.location.reload()}}}});BX.PreventDefault()}))}}));function showAllColors(e,t){for(let e=0;e<t.childNodes.length;e++){t.childNodes[e].hidden=false}e.hidden=true} //# sourceMappingURL=script.map.js
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.27 |
proxy
|
phpinfo
|
Settings