%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 18.224.44.186 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/report/install/components/bitrix/report.visualconstructor.config.fields/templates/selectwithpopup/ |
Upload File : |
(function(){"use strict";BX.namespace("BX.Report.VisualConstructor.Widget.Config.Fields");BX.Report.VisualConstructor.Widget.Config.Fields.SelectWithPopup=function(t){console.trace("new SelectWithPopup");this.fieldScope=t.fieldScope;this.selectControl=this.fieldScope.querySelector('[data-role="visualconstructor-field-custom-select"]');this.selectControlValue=this.fieldScope.querySelector('[data-role="visualconstructor-field-custom-select-value"]');this.optionList=t.optionList;this.value=t.value;this.id=this.fieldScope.id;this.init();BX.Report.VisualConstructor.Field.Base.apply(this,arguments)};BX.Report.VisualConstructor.Widget.Config.Fields.SelectWithPopup.prototype={__proto__:BX.Report.VisualConstructor.Field.Base.prototype,constructor:BX.Report.VisualConstructor.Widget.Config.Fields.SelectWithPopup,init:function(){BX.bind(this.selectControl,"click",BX.delegate(this.openSelectPopup,this))},openSelectPopup:function(){this.getSelectPopup().show()},getSelectPopup:function(){if(this.selectPopup){this.selectPopup.destroy()}var t=this.id+"_select_popup";this.popupContent=this.getSelectableOptionListContainer(this.optionList,this.handlerOptionChange);this.selectPopup=this.createPopup(t,this.selectControl,this.popupContent);return this.selectPopup},createPopup:function(t,e,o){return new BX.PopupWindow(t,e,{noAllPaddings:true,closeByEsc:true,angle:true,autoHide:true,zIndex:9999,offsetTop:0,content:o,targetContainer:document.querySelector('[data-role="report-configuration-page-wrapper"]')})},getSelectableOptionListContainer:function(t,e){var o=BX.create("div",{attrs:{className:"visualconstructor-select-popup-wrapper"}});for(var i in t){if(t.hasOwnProperty(i)){o.appendChild(BX.create("div",{attrs:{className:"visualconstructor-select-item-wrapper"},dataset:{selectionValue:i,selectionLabel:t[i]},text:t[i],events:{click:function(t){e.call(this,t.currentTarget.dataset.selectionValue,t.currentTarget.dataset.selectionLabel)}.bind(this)}}))}}return o},handlerOptionChange:function(t,e){if(this.selectPopup){this.selectPopup.close()}this.selectControl.innerHTML=e;this.selectControlValue.value=t;this.value=t;BX.onCustomEvent(this.fieldScope,this.id+"_onChange",[this])},getValue:function(){return this.value},setOptions:function(t){this.optionList=t;var e=Object.keys(this.optionList)[0];if(e){this.handlerOptionChange(e,this.optionList[e])}else{this.selectControl.innerHTML="";this.selectControlValue.value="";this.value=null}}}})(); //# sourceMappingURL=script.map.js