dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #35487
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18162: DV gui fix.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 18162 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-02-03 15:09:28 +0100
message:
DV gui fix.
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/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/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js 2015-01-27 12:39:32 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js 2015-02-03 13:35:17 +0000
@@ -2493,12 +2493,18 @@
web.pivot.getData = function(layout, isUpdateGui) {
var xLayout,
- paramString;
+ paramString,
+ onFailure;
if (!layout) {
return;
}
+ onFailure = function() {
+ ns.app.viewport.setGui(layout, xLayout, isUpdateGui);
+ web.mask.hide(ns.app.centerRegion);
+ };
+
xLayout = service.layout.getExtendedLayout(layout);
paramString = web.analytics.getParamString(xLayout, true);
@@ -2517,9 +2523,7 @@
},
disableCaching: false,
failure: function(r) {
- ns.app.viewport.setGui(layout, xLayout, isUpdateGui);
-
- web.mask.hide(ns.app.centerRegion);
+ onFailure();
if (Ext.Array.contains([413, 414], parseInt(r.status))) {
web.analytics.validateUrl(init.contextPath + '/api/analytics.json' + paramString);
@@ -2534,8 +2538,7 @@
var response = api.response.Response(Ext.decode(r.responseText));
if (!response) {
- ns.app.viewport.setGui(layout, xLayout, isUpdateGui);
- web.mask.hide(ns.app.centerRegion);
+ onFailure();
return;
}
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js 2015-02-03 08:30:32 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js 2015-02-03 13:35:17 +0000
@@ -2346,12 +2346,18 @@
web.chart.getData = function(layout, isUpdateGui) {
var xLayout,
- paramString;
+ paramString,
+ onFailure;
if (!layout) {
return;
}
+ onFailure = function() {
+ ns.app.viewport.setGui(layout, xLayout, isUpdateGui);
+ web.mask.hide(ns.app.centerRegion);
+ };
+
xLayout = service.layout.getExtendedLayout(layout);
paramString = web.analytics.getParamString(xLayout, true);
@@ -2367,9 +2373,7 @@
},
disableCaching: false,
failure: function(r) {
- ns.app.viewport.setGui(layout, xLayout, isUpdateGui);
-
- web.mask.hide(ns.app.centerRegion);
+ onFailure();
if (Ext.Array.contains([413, 414], parseInt(r.status))) {
web.analytics.validateUrl(init.contextPath + '/api/analytics.json' + paramString);
@@ -2384,8 +2388,7 @@
response = api.response.Response(Ext.decode(r.responseText));
if (!response) {
- ns.app.viewport.setGui(layout, xLayout, isUpdateGui);
- web.mask.hide(ns.app.centerRegion);
+ onFailure();
return;
}
@@ -2393,7 +2396,7 @@
xLayout = service.layout.getSyncronizedXLayout(xLayout, response);
if (!xLayout) {
- web.mask.hide(ns.app.centerRegion);
+ onFailure();
return;
}
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js 2014-12-15 16:54:01 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js 2015-02-03 13:35:17 +0000
@@ -705,7 +705,7 @@
console.log('Response: no valid headers');
return;
}
-
+
if (!(Ext.isArray(config.rows) && config.rows.length > 0)) {
if (!NS.plugin) {
alert('No values found');
@@ -1188,13 +1188,13 @@
ou = dimConf.organisationUnit.objectName,
layout;
- // Set items from init/metaData/xLayout
+ // set items from init/metaData/xLayout
for (var i = 0, dim, metaDataDim, items; i < dimensions.length; i++) {
dim = dimensions[i];
dim.items = [];
metaDataDim = response.metaData[dim.objectName];
- // If ou and children
+ // if ou and children
if (dim.dimensionName === ou) {
if (isUserOrgunit || isUserOrgunitChildren || isUserOrgunitGrandChildren) {
var userOu,
@@ -1279,7 +1279,7 @@
}
}
- // Re-layout
+ // re-layout
layout = api.layout.Layout(xLayout);
if (layout) {