Your IP : 3.144.230.90
(function(){"use strict";BX.namespace("BX.Report.Dashboard");BX.Report.Dashboard.Content=function(t){this.height=t.height||"auto";this.color=t.color||"inherit";this.errors=t.errors||[];this.data=t.data||{};this.rendered=false;this.widget=t.widget||null;this.layout={container:null}};BX.Report.Dashboard.Content.prototype={isRendered:function(){return this.rendered},setRenderStatus:function(t){this.rendered=t},getColor:function(){return this.color},getHeight:function(){if(this.height!=="auto"){return this.height-55}else{return"auto"}},setWidget:function(t){this.widget=t;return this},getWidget:function(){return this.widget},render:function(){return BX.create("div",{html:"parent render"})}};BX.Report.Dashboard.Content.Html=function(t){this.html=t.html||[];this.js=t.js||[];this.css=t.css||"";this.config=t.config||"";this.htmlContentWrapper=BX.create("div");BX.Report.Dashboard.Content.apply(this,arguments)};BX.Report.Dashboard.Content.Html.counter=0;BX.Report.Dashboard.Content.Html.callbacks={};BX.Report.Dashboard.Content.Html.ready=function(t){this.callbacks[this.counter]=t};BX.Report.Dashboard.Content.Html.callCallbackInContext=function(t,e){if(this.callbacks[t]){this.callbacks[t](e)}};BX.Report.Dashboard.Content.Html.prototype={__proto__:BX.Report.Dashboard.Content.prototype,constructor:BX.Report.Dashboard.Content.Html,loadAssets:function(){if(this.css.length){BX.load(this.css,BX.delegate(function(){if(this.js.length){BX.load(this.js,BX.delegate(function(){this.fillHtmlContentWrapper()},this))}else{this.fillHtmlContentWrapper()}},this))}else if(this.js.length){BX.load(this.js,BX.delegate(function(){this.fillHtmlContentWrapper()},this))}else{this.fillHtmlContentWrapper()}},fillHtmlContentWrapper:function(){BX.Report.Dashboard.Content.Html.counter++;BX.html(this.htmlContentWrapper,this.html,{callback:function(){BX.Report.Dashboard.Content.Html.callCallbackInContext(BX.Report.Dashboard.Content.Html.counter,this.htmlContentWrapper)}.bind(this)});this.htmlContentWrapper.style.minHeight=this.getHeight()+"px";this.htmlContentWrapper.style.overflow="hidden"},render:function(){if(this.isRendered()){return this.htmlContentWrapper}else{BX.addCustomEvent(this.widget,"Dashboard.Board.Widget:onAfterRender",BX.delegate(function(){if(this.htmlContentWrapper.parentNode){this.loadAssets()}},this));this.setRenderStatus(true);return this.htmlContentWrapper}},setHeight:function(t){this.height=t;this.htmlContentWrapper.style.minHeight=this.height+"px"}};BX.Report.Dashboard.Content.Empty=function(t){BX.Report.Dashboard.Content.apply(this,arguments)};BX.Report.Dashboard.Content.Empty.prototype={__proto__:BX.Report.Dashboard.Content.prototype,constructor:BX.Report.Dashboard.Content.Empty,render:function(){return BX.create("div",{styles:{height:this.getHeight()+"px"},html:"empty content"})}};BX.Report.Dashboard.Content.Error=function(t){BX.Report.Dashboard.Content.apply(this,arguments)};BX.Report.Dashboard.Content.Error.prototype={__proto__:BX.Report.Dashboard.Content.prototype,constructor:BX.Report.Dashboard.Content.Error,render:function(){var t=[];for(var e=0;e<this.errors.length;e++){t.push(BX.create("div",{html:this.errors[e],style:{color:"red"}}))}return BX.create("div",{styles:{height:this.getHeight()+"px"},children:t})}}})();