dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15007
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5248: (DV) Chart load mask added.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 5248 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-11-30 18:17:00 +0100
message:
(DV) Chart load mask added.
modified:
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== 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;
+ }
}
};