=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/plugin.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/plugin.js 2012-06-02 11:16:07 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/plugin.js 2012-06-11 18:09:44 +0000 @@ -625,6 +625,9 @@ object.organisationunitnames.push(DHIS.chart.util.string.getEncodedString(r.o[k])); } return object; + }, + isDefined: function(variable) { + return (typeof(variable) !== 'undefined'); } } }; @@ -784,7 +787,7 @@ baseUrl = Ext.String.urlAppend(baseUrl, 'userOrganisationUnitChildren=true'); } - Ext.data.JsonP.request({ + var options = { url: baseUrl, disableCaching: false, success: function(r) { @@ -818,7 +821,13 @@ DHIS.chart.state.state = project.state; DHIS.chart.chart.getData(project); } - }); + }; + + if (DHIS.chart.util.value.isDefined(project.state.conf.callbackName)) { + options.callbackName = project.state.conf.callbackName; + } + + Ext.data.JsonP.request(options); } }; === modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin/index.html' --- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin/index.html 2012-05-19 17:08:08 +0000 +++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin/index.html 2012-06-11 18:09:44 +0000 @@ -50,6 +50,7 @@ baseLineLabel: null, domainAxisLabel: null, rangeAxisLabel: null, + callbackName: 'chart2', el: 'chart2', url: url }); @@ -70,7 +71,8 @@ targetLineValue: 80, targetLineLabel: null, baseLineValue: 20, - baseLineLabel: null, + baseLineLabel: null, + callbackName: 'chart3', el: 'chart3', url: url });