%PDF- %PDF-
Direktori : /home/bitrix/www/bitrix/js/report/js/visualconstructor/fields/ |
Current File : /home/bitrix/www/bitrix/js/report/js/visualconstructor/fields/whatwillcalculate.min.js |
(function(){"use strict";BX.namespace("BX.Report.VisualConstructor.FieldEventHandlers");BX.Report.VisualConstructor.FieldEventHandlers.WhatWillCalculate=function(t){BX.Report.VisualConstructor.Field.BaseHandler.apply(this,arguments);if(this.currentField){this.reportsConfigurrationContainer=BX.findParent(this.currentField,{attr:{"data-role":"reports-configurations-container"}});this.reportConfigurationsContainer=BX.findParent(this.currentField,{attr:{"data-role":"report-configuration-container"}});this.widgetIdInput=this.currentFieldObject.getForm().querySelector("#widgetId")}};BX.Report.VisualConstructor.FieldEventHandlers.WhatWillCalculate.prototype={__proto__:BX.Report.VisualConstructor.Field.BaseHandler.prototype,constructor:BX.Report.VisualConstructor.FieldEventHandlers.WhatWillCalculate,process:function(){switch(this.action){case"reloadCompatibleCalculatedTypes":this.reloadCompatibleCalculatedTypes();break}},reloadCompatibleCalculatedTypes:function(){var t=this.currentFieldObject.getForm().querySelector("[data-role=preview-view-type-key]");BX.Report.VC.Core.ajaxPost("configuration.loadWhatWillCalculateByGroup",{data:{params:{widgetId:this.widgetIdInput.value,viewKey:t.value,groupBy:this.ownerFieldObject.getValue(),reportHandlerClassName:this.reportConfigurationsContainer.querySelector('[data-field-type="report-handler-class"]').value}},onFullSuccess:BX.delegate(function(t){this.currentFieldObject.setOptions(t.data)},this)})}}})();