File manager - Edit - /home/web/vm-3fadc827.na4u.ru/www/bitrix/modules/ui/install/js/ui/feedback/form/ui.feedback.form.min.js
Back
(function(){var e=BX.namespace("BX.UI.Feedback");var t=[];var i={};var n=false;e.Form=function(e){this.init(e);t.push(this)};e.Form.getList=function(){return t};e.Form.getById=function(e){return t.filter(function(t){return t.id===e})[0]||null};e.Form.open=function(t){if(n){return}if(typeof i[t.id]!=="undefined"){i[t.id].openPanel();return}i[t.id]=new e.Form({map:t});i[t.id].openPanel()};e.Form.prototype={init:function(e){if(typeof e.map!=="undefined"){this.map=e.map;return}this.id=e.id;this.portal=e.portal;this.presets=e.presets||{};this.form=e.form||{};this.title=e.title||"";if(e.button){this.button=BX(e.button);BX.bind(this.button,"click",this.openPanel.bind(this))}},appendPresets:function(e){for(var t in e){if(!e.hasOwnProperty(t)){continue}this.presets[t]=e[t]}},openPanel:function(){n=true;BX.SidePanel.Instance.open("ui:feedback-form-"+this.id,{cacheable:false,contentCallback:function(){var e=new BX.Promise;e.fulfill();return e},animationDuration:200,events:{onLoad:this.checkSidePanelLoad.bind(this),onBeforeCloseComplete:this.checkSidePanelClosed.bind(this)},width:600})},checkSidePanelClosed:function(e){n=false},checkSidePanelLoad:function(e){if(typeof this.map!=="undefined"&&typeof this.cached==="undefined"){BX.ajax.runAction("ui.feedback.loadData",{json:{title:this.map.title||null,id:this.map.id||null,presets:this.map.presets||null,portalUri:this.map.portalUri||null,forms:this.map.forms||null,defaultForm:this.map.defaultForm||null}}).then(function(t){var i=t.data.params;this.id=i.id;this.title=i.title;this.form=i.form;this.presets=i.presets;this.portal=i.portal;this.cached=true;this.onSidePanelLoad(e)}.bind(this));return}this.onSidePanelLoad(e)},onSidePanelLoad:function(e){this.formNode=document.createElement("div");var t=document.createElement("div");t.style='margin-bottom: 25px; font: 26px/26px "OpenSans-Light", Helvetica, Arial, sans-serif;';t.textContent=this.title;var i=e.getSlider();var n=document.createElement("div");n.style="padding: 20px; overflow-y: auto;";n.appendChild(t);n.appendChild(this.formNode);if(!i){return}i.layout.content.appendChild(n);setTimeout(function(){i.showLoader()},0);this.loadForm(this.checkLoader.bind(this,i))},checkLoader:function(e){setTimeout(function(){e.closeLoader()},100)},loadForm:function(e){var t=this.form;if(!t||!t.id||!t.lang||!t.sec){return}if(t.presets){this.appendPresets(t.presets)}(function(e,t,i,n){e["Bitrix24FormObject"]=n;e[n]=e[n]||function(){arguments[0].ref=i;(e[n].forms=e[n].forms||[]).push(arguments[0])};if(e[n]["forms"])return;var o=t.createElement("script");var r=1*new Date;o.async=1;o.src=i+"?"+r;var s=t.getElementsByTagName("script")[0];s.parentNode.insertBefore(o,s)})(top,top.document,this.portal+"/bitrix/js/crm/form_loader.js","b24form");top.b24form({id:t.id,lang:t.lang,sec:t.sec,type:"inline",node:this.formNode,presets:this.presets,handlers:{load:e}})}}})(); //# sourceMappingURL=ui.feedback.form.map.js
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.25 |
proxy
|
phpinfo
|
Settings