dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32218
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16454: PT dimension loading mask.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 16454 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-08-20 15:08:23 +0200
message:
PT dimension loading mask.
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/app/scripts/app.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/app/scripts/core.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-pivot/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2014-08-20 09:09:22 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2014-08-20 13:05:12 +0000
@@ -2642,6 +2642,7 @@
}
store.isPending = true;
+ ns.core.web.mask.show(indicatorAvailable.boundList);
Ext.Ajax.request({
url: ns.core.init.contextPath + '/api' + path,
@@ -2649,15 +2650,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);
}
});
},
@@ -2770,6 +2772,7 @@
}
store.isPending = true;
+ ns.core.web.mask.show(dataElementAvailable.boundList);
Ext.Ajax.request({
url: ns.core.init.contextPath + '/api' + path,
@@ -2777,15 +2780,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);
}
});
},
@@ -2798,7 +2802,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) {
@@ -2811,6 +2814,7 @@
}
store.isPending = true;
+ ns.core.web.mask.show(dataElementAvailable.boundList);
Ext.Ajax.request({
url: ns.core.init.contextPath + '/api' + path,
@@ -2818,9 +2822,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 || [],
@@ -2831,6 +2832,10 @@
}
store.loadStore(data, pager, append);
+ },
+ callback: function() {
+ store.isPending = false;
+ ns.core.web.mask.hide(dataElementAvailable.boundList);
}
});
},
@@ -2915,6 +2920,7 @@
}
store.isPending = true;
+ ns.core.web.mask.show(dataSetAvailable.boundList);
Ext.Ajax.request({
url: ns.core.init.contextPath + '/api' + path,
@@ -2922,15 +2928,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);
}
});
},
@@ -4865,6 +4872,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,
@@ -4872,15 +4880,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);
}
});
},
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/app/scripts/core.js 2014-08-20 09:09:22 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/app/scripts/core.js 2014-08-20 13:05:12 +0000
@@ -929,7 +929,6 @@
xDim.ids = [];
for (var j = 0; j < items.length; j++) {
-console.log("xl", items[j].id);
xDim.ids.push(items[j].id);
}
}