Your IP : 52.15.209.178


Current Path : /var/www/u0635749/data/www/hobbyclick.ru/public/www/bitrix/js/report/
Upload File :
Current File : /var/www/u0635749/data/www/hobbyclick.ru/public/www/bitrix/js/report/stexport.min.js

BX.namespace("BX.Report");if(typeof BX.Report.StExportManager==="undefined"){BX.Report.StExportManager=function(){this._id="";this._settings={};this._processDialog=null;this._siteId="";this._entityType="";this._sToken="";this._cToken="";this._token="";this._serviceUrl="";this._initialOptions={}};BX.Report.StExportManager.prototype={initialize:function(t,e){this._id=BX.type.isNotEmptyString(t)?t:BX.util.getRandomString(4);this._settings=e?e:{};this._siteId=this.getSetting("siteId","");if(!BX.type.isNotEmptyString(this._siteId))throw"BX.Report.StExportManager: parameter 'siteId' is not found.";this._entityType=this.getSetting("entityType","");if(!BX.type.isNotEmptyString(this._entityType))throw"BX.Report.StExportManager: parameter 'entityType' is not found.";this._sToken=this.getSetting("sToken","");if(!BX.type.isNotEmptyString(this._sToken))throw"BX.Report.StExportManager: parameter 'sToken' is not found.";this._serviceUrl=this.getSetting("serviceUrl","");if(!BX.type.isNotEmptyString(this._serviceUrl))throw"BX.Report.StExportManager: parameter 'serviceUrl' is not found.";this._initialOptions=this.getSetting("initialOptions",{})},getId:function(){return this._id},getSetting:function(t,e){return this._settings.hasOwnProperty(t)?this._settings[t]:e},startExport:function(t){if(!BX.type.isNotEmptyString(t))throw"BX.Report.StExportManager: parameter 'exportType' has invalid value.";this._cToken="c"+Date.now();this._token=this._sToken+this._cToken;var e={SITE_ID:this._siteId,PROCESS_TOKEN:this._token,ENTITY_TYPE_NAME:this._entityType,EXPORT_TYPE:t,COMPONENT_PARAMS:this.getSetting("componentParams",{})};var i=t.charAt(0).toUpperCase()+t.slice(1);this._processDialog=BX.Report.LongRunningProcessDialog.create(this._id+"_LrpDlg",{serviceUrl:this._serviceUrl,action:"STEXPORT",params:e,initialOptions:this._initialOptions,title:this.getMessage("stExport"+i+"DlgTitle"),summary:this.getMessage("stExport"+i+"DlgSummary"),isSummaryHtml:false});this._processDialog.show()},destroy:function(){this._id="";this._settings={};this._processDialog=null;this._siteId="";this._entityType="";this._sToken="";this._cToken="";this._token="";this._serviceUrl="";this._initialOptions={}}};BX.Report.StExportManager.prototype.getMessage=function(t){var e=t;var i=this.getSetting("messages",null);if(i!==null&&typeof i==="object"&&i.hasOwnProperty(t)){e=i[t]}else{i=BX.Report.StExportManager.messages;if(i!==null&&typeof i==="object"&&i.hasOwnProperty(t)){e=i[t]}}return e};if(typeof BX.Report.StExportManager.messages==="undefined"){BX.Report.StExportManager.messages={}}if(typeof BX.Report.StExportManager.items==="undefined"){BX.Report.StExportManager.items={}}BX.Report.StExportManager.create=function(t,e){var i=new BX.Report.StExportManager;i.initialize(t,e);BX.Report.StExportManager.items[t]=i;return i};BX.Report.StExportManager.delete=function(t){if(BX.Report.StExportManager.items.hasOwnProperty(t)){BX.Report.StExportManager.items[t].destroy();delete BX.Report.StExportManager.items[t]}}}