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/report/js/visualconstructor/ |
Upload File : |
(function(){"use strict";BX.namespace("BX.Report.VisualConstructor.Field");BX.Report.VisualConstructor.Field.Base=function(e){this.form=e.form||null;this.events=e.events||[];this.behaviours=e.behaviours||[];this.fieldScope=e.fieldScope||null;if(this.fieldScope){this.form=BX.findParent(this.fieldScope,{tag:"form"})}for(var t=0;t<this.behaviours.length;t++){var i=this.behaviours[t];BX.addCustomEvent(this.fieldScope,i["eventName"],this.baseEventHandler.bind(this,i))}BX.Report.VisualConstructor.Field.InitFieldRepository.add(this)};BX.Report.VisualConstructor.Field.Base.prototype={baseEventHandler:function(e,t,i){var r=this.getForm().querySelector(e["behaviorOwnerSelector"]);var s={action:e["handlerParams"]["action"],currentField:r,ownerField:t.fieldScope,additionalParams:e["handlerParams"]["additionalParams"]||[],currentFieldObject:this.findElementInRenderedElementsRepository(r),ownerFieldObject:t,optionsFromEvent:i};var o=null;if(e.handlerParams.class){var n=BX.Report.VC.Core.getClass(e.handlerParams.class);if(n){o=new n(s);o.process()}else{throw"Class with name: "+e.handlerParams.class+" not exist"}}else{o=new BX.Report.VisualConstructor.Field.BaseHandler(s);o.process()}},findElementInRenderedElementsRepository:function(e){return BX.Report.VisualConstructor.Field.InitFieldRepository.getByDomElement(e)},getForm:function(){return this.form}};BX.Report.VisualConstructor.Field.BaseHandler=function(e){this.action=e.action||"";this.currentField=e.currentField||{};this.currentFieldObject=e.currentFieldObject||{};this.ownerField=e.ownerField||{};this.ownerFieldObject=e.ownerFieldObject||{};this.additionalParams=e.additionalParams||{};this.optionsFromEvent=e.optionsFromEvent||{}};BX.Report.VisualConstructor.Field.BaseHandler.prototype={process:function(){switch(this.action){case"setValue":this.setValue();break}},setValue:function(){this.currentField.value=this.additionalParams.value}};BX.Report.VisualConstructor.Field.InitFieldRepository={fields:[],add:function(e){this.fields.push(e)},getByDomElement:function(e){for(var t in this.fields){if(this.fields[t].fieldScope===e){return this.fields[t]}}return null}}})();