dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32220
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16455: DV dimension load mask.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 16455 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-08-20 15:29:00 +0200
message:
DV dimension load mask.
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/app/scripts/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-apps/src/main/webapp/dhis-web-visualizer/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/app/scripts/app.js 2014-08-13 14:12:10 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/app/scripts/app.js 2014-08-20 13:27:26 +0000
@@ -2626,6 +2626,7 @@
}
store.isPending = true;
+ ns.core.web.mask.show(indicatorAvailable.boundList);
Ext.Ajax.request({
url: ns.core.init.contextPath + '/api' + path,
@@ -2633,15 +2634,16 @@
page: store.nextPage,
pageSize: 50
},
- failure: function() {
- store.isPending = false;
- },
success: function(r) {
var response = Ext.decode(r.responseText),
data = response.indicators || [],
pager = response.pager;
store.loadStore(data, pager, append);
+ },
+ callback: function() {
+ store.isPending = false;
+ ns.core.web.mask.hide(indicatorAvailable.boundList);
}
});
},
@@ -2755,6 +2757,7 @@
}
store.isPending = true;
+ ns.core.web.mask.show(dataElementAvailable.boundList);
Ext.Ajax.request({
url: ns.core.init.contextPath + '/api' + path,
@@ -2762,15 +2765,16 @@
page: store.nextPage,
pageSize: 50
},
- failure: function() {
- store.isPending = false;
- },
success: function(r) {
var response = Ext.decode(r.responseText),
data = response.dataElements || [],
pager = response.pager;
store.loadStore(data, pager, append);
+ },
+ callback: function() {
+ store.isPending = false;
+ ns.core.web.mask.hide(dataElementAvailable.boundList);
}
});
},
@@ -2784,7 +2788,6 @@
}
if (Ext.isString(uid)) {
- //path = '/dataElementGroups/' + uid + '/operands' + (filter ? '/query/' + filter : '') + '.json';
path = '/dataElementOperands.json?fields=id,name&filter=dataElement.dataElementGroups.id:eq:' + uid + (filter ? '&filter=name:like:' + filter : '');
}
else if (uid === 0) {
@@ -2797,6 +2800,7 @@
}
store.isPending = true;
+ ns.core.web.mask.show(dataElementAvailable.boundList);
Ext.Ajax.request({
url: ns.core.init.contextPath + '/api' + path,
@@ -2804,9 +2808,6 @@
page: store.nextPage,
pageSize: 50
},
- failure: function() {
- store.isPending = false;
- },
success: function(r) {
var response = Ext.decode(r.responseText),
data = response.objects || response.dataElementOperands || [],
@@ -2817,6 +2818,10 @@
}
store.loadStore(data, pager, append);
+ },
+ callback: function() {
+ store.isPending = false;
+ ns.core.web.mask.hide(dataElementAvailable.boundList);
}
});
},
@@ -2901,6 +2906,7 @@
}
store.isPending = true;
+ ns.core.web.mask.show(dataSetAvailable.boundList);
Ext.Ajax.request({
url: ns.core.init.contextPath + '/api' + path,
@@ -2908,15 +2914,16 @@
page: store.nextPage,
pageSize: 50
},
- failure: function() {
- store.isPending = false;
- },
success: function(r) {
var response = Ext.decode(r.responseText),
data = response.dataSets || [],
pager = response.pager;
store.loadStore(data, pager, append);
+ },
+ callback: function() {
+ store.isPending = false;
+ ns.core.web.mask.hide(dataSetAvailable.boundList);
}
});
},
@@ -4837,6 +4844,7 @@
path = '/dimensions/' + dimension.id + '/items' + filterPath + '.json';
store.isPending = true;
+ ns.core.web.mask.show(available.boundList);
Ext.Ajax.request({
url: ns.core.init.contextPath + '/api' + path,
@@ -4844,15 +4852,16 @@
page: store.nextPage,
pageSize: 50
},
- failure: function() {
- store.isPending = false;
- },
success: function(r) {
var response = Ext.decode(r.responseText),
data = response.items || [],
pager = response.pager;
store.loadStore(data, pager, append);
+ },
+ callback: function() {
+ store.isPending = false;
+ ns.core.web.mask.hide(available.boundList);
}
});
},