Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/ui/layout-form/dist/ |
Upload File : |
this.BX=this.BX||{};(function(e,t,i,n,s){"use strict";class o extends s.EventEmitter{constructor(e){var t;super();this.setEventNamespace("BX.UI.LayoutForm");this.params=e!=null?e:{};this.container=(t=this.params.container)!=null?t:document.documentElement;this.nodes=null;this.init()}init(){this.nodes=[].slice.call(this.container.querySelectorAll("["+o.HIDDEN_ATTRIBUTE+"]"));this.nodes.forEach((e=>{t.Event.bind(e,"click",(t=>{t.preventDefault();this.toggleBLock(e);this.emit("onToggle",{checkbox:e.querySelector(o.CHECKBOX_SELECTOR)})}));e.querySelector(o.CHECKBOX_SELECTOR).style.pointerEvents="none";this.checkInitialBlockVisibility(e)}))}checkInitialBlockVisibility(e){const i=e.querySelector(o.CHECKBOX_SELECTOR);if(i&&i.checked){const i=e.nextElementSibling;if(i){i.style.height="auto";t.Dom.addClass(i,o.SHOW_CLASS)}}}toggleBLock(e){const i=e.querySelector(o.CHECKBOX_SELECTOR);if(i){const n=e.nextElementSibling;if(n){const e=n.scrollHeight;if(e>0){if(!i.checked){i.checked=true;n.style.height=e+"px";t.Dom.addClass(n,o.SHOW_CLASS);const s=()=>{n.style.height="auto";t.Event.unbind(n,"transitionend",s)};t.Event.bind(n,"transitionend",s)}else{i.checked=false;n.style.height=e+"px";requestAnimationFrame((()=>{n.style.height=0;t.Dom.removeClass(n,o.SHOW_CLASS)}))}}}}}}o.HIDDEN_ATTRIBUTE="data-form-row-hidden";o.SHOW_CLASS="ui-form-row-hidden-show";o.CHECKBOX_SELECTOR='.ui-ctl-element[type="checkbox"]';e.LayoutForm=o})(this.BX.UI=this.BX.UI||{},BX,BX,BX,BX.Event); //# sourceMappingURL=layout-form.bundle.map.js