You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
7.8 KiB
Plaintext

9 months ago
/*!
* FusionCharts Export Component JavaScript Library
* Copyright FusionCharts Technologies LLP
* @license License Information at <http://www.fusioncharts.com/license>
*
* @author FusionCharts Technologies LLP
* @version: 1.0.3-release
*/
if(typeof FusionCharts==='undefined'){alert('FusionChartsExport: object::FusionCharts was not found.'+' Verify script inclusions.',10901271400);throw'FusionChartsExportComponentFatalError::10901271400';}var _FCEO=function(){_FCEO.initializeComponent(this,arguments)};var FusionChartsExportObject=_FCEO;if(FusionCharts.version&&FusionCharts.version[0]>=3){_FCEO.__global=FusionCharts(['private','LegacyExportComponent'])}_FCEO.version=[1,0,3,'release',362];_FCEO.defaultParameters={id:undefined,swfLocation:undefined,componentAttributes:{width:'120',height:'40',bgColor:'',strictTrigger:'0'},exportAttributes:{},sourceCharts:[],debugMode:false,outerHTML:''};_FCEO.checkFlashVersion=false;_FCEO.debugMode=false;var FC_ExportComponentReady=function(a){setTimeout(function(){_FCEO.flushRack(a)},0);return true};var FC_ExportDataReady=function(a){setTimeout(function(){return _FCEO.relayStream(a)},0)};_FCEO.prototype.Render=function(a){return this.render(a)};_FCEO.prototype.BeginExport=function(){return _FCEO.batchExport(this,this.sourceCharts)};_FCEO.prototype.BeginExportAll=function(){return _FCEO.batchExport(this,_FCEO.probeCharts())};_FCEO.prototype.GetOuterHTML=function(){this.update();return this.outerHTML};_FCEO.prototype.render=function(a){var b=_FCEO.L.get(a);if(!b||!_FCEO.L.isObj(b.innerHTML,'string')){this.trace(_FCEO.R.errContainer,10902091233);return false}this.update();try{this.srcObj.render(b)}catch(err){this.trace(_FCEO.R.errFusion+'\n'+err,10902101448)}return true};_FCEO.prototype.update=function(){_FCEO.updateComponent(this)};_FCEO.prototype.trace=function(a,b){_FCEO.trace(a,b,this.debugMode)};_FCEO.prototype.toString=function(){return'[object '+_FCEO.R.resSig+' #'+this.id+' ]'};_FCEO.streamRack={};_FCEO.flags={c:0};_FCEO.playerVersion={major:0,minor:0,rev:0};try{if(typeof _FCEO.__global==='undefined'){_FCEO.playerVersion=infosoftglobal.FusionChartsUtil.getPlayerVersion()}else{_FCEO.playerVersion=_FCEO.__global.swfobject.getFlashPlayerVersion()}}catch(err){_FCEO.trace('FusionChartsExport: object::Flash Player DetectionError.\n'+err,10902182119)}_FCEO.relayStream=function(a){var b=_FCEO.probeHandler(a);if(b==null){_FCEO.trace(_FCEO.R.errStream,10902041759)}if(!_FCEO.L.isObj(a.parameters.exportParameters)){a.parameters.exportParameters={}}if(!_FCEO.L.isObj(a.parameters.exportParameters.triggerOrdinal,'number')){a.parameters.exportParameters.triggerOrdinal=_FCEO.flags.c++}setTimeout(function(){if(typeof window.FC_ExportReady==='function'){FC_ExportReady(a.meta.DOMId)}},0);if(_FCEO.probeComponent(b)){_FCEO.pushStream(b,[a]);return true}if(!_FCEO.streamRack[b]){_FCEO.streamRack[b]=[]}_FCEO.streamRack[b].push(a);return true};_FCEO.flushRack=function(a){a=_FCEO.probeHandler(a);if(a==null){_FCEO.trace(_FCEO.R.errComponent,10902041939)}if(!_FCEO.probeComponent(a)){_FCEO.trace(_FCEO.R.errComponent,10902041917)}if(!_FCEO.streamRack[a]){return}_FCEO.pushStream(a,_FCEO.streamRack[a]);_FCEO.streamRack[a]=[]};_FCEO.pushStream=function(a,b){return _FCEO.L.get(a).pushData(b)};_FCEO.probeComponent=function(a){if(!a){return false}var b=_FCEO.L.get(a);return b?b.isReady!=null&&b.isReady()==true:false};_FCEO.probeHandler=function(a){if(!a){return null}return _FCEO.L.isString(a)?a:(a.parameters!=null&&_FCEO.L.isString(a.parameters.exportHandler))?a.parameters.exportHandler:null};_FCEO.probeCharts=function(){var a,toks,acc=[];toks=_FCEO.L.tags('object');for(var i=0;i<toks.length;i++){a=toks[i];if(_FCEO.probeChart(a)){acc.push(a)}}toks=_FCEO.L.tags('embed');for(i=0;i<toks.length;i++){a=toks[i];if(a.parentNode!=undefined&&a.parentNode.tagName=='object'){continue}if(_FCEO.probeChart(a)){acc.push(a)}}return acc};_FCEO.probeChart=function(a){if(a.signature==undefined){return false}var b=a.signature();return(_FCEO.L.isString(b)&&b.indexOf(_FCEO.R.resChartSig)==0)};_FCEO.initializeComponent=function(a,b){if(!b||!b.length||b.length<1){_FCEO.trace(_FCEO.R.errArgs,10902061902)}var c=!_FCEO.L.isString(b[0])&&b.length==1;if(!c&&b.length<2){_FCEO.trace(_FCEO.R.errArgs,10902091732)}var i=0;for(var d in _FCEO.defaultParameters){a[d]=(c?b[0][d]:b[i++])||_FCE