=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js' --- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js 2011-11-30 16:43:20 +0000 +++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js 2011-11-30 17:16:27 +0000 @@ -373,6 +373,13 @@ } }; }, + setMask: function(str) { + if (DV.mask) { + DV.mask.hide(); + } + DV.mask = new Ext.LoadMask(DV.chart.chart, {msg: str}); + DV.mask.show(); + }, label: { getCategoryLabel: function() { return { @@ -388,7 +395,7 @@ renderer: Ext.util.Format.numberRenderer(DV.util.number.getChartAxisFormatRenderer()) }; } - }, + }, bar: { getCategoryLabel: function() { return { @@ -701,6 +708,8 @@ DV.value = { values: [], getValues: function(exe) { + DV.util.chart.setMask('Please wait..'); + var params = [], i = DV.conf.finals.dimension.indicator.value, d = DV.conf.finals.dimension.dataelement.value; @@ -720,7 +729,7 @@ DV.value.values = Ext.JSON.decode(r.responseText).values; if (!DV.value.values.length) { - alert('no data values'); + alert('No data values'); return; } @@ -963,13 +972,14 @@ t = null; c.removeAll(true); c.add(this.chart); - DV.state.filter.names[0] = DV.state.filter.names[0] ? DV.state.filter.names[0] : 'Example chart'; if (!DV.init.isInit) { + DV.mask.hide(); DV.store.getDataTableStore(true); } - - DV.init.isInit = false; + else { + DV.init.isInit = false; + } } };