dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #22742
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11029: (DV, PT) Minor performance improvement.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 11029 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-05-27 22:02:39 +0200
message:
(DV, PT) Minor performance improvement.
modified:
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js
dhis-2/dhis-web/dhis-web-visualizer/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-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2013-05-27 19:02:40 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2013-05-27 19:53:38 +0000
@@ -3556,12 +3556,12 @@
}
});
- openTableLayoutTab = function(type) {
+ openTableLayoutTab = function(type, isNewTab) {
if (pt.baseUrl && pt.paramString) {
var url = pt.baseUrl + '/api/analytics.' + type + pt.paramString;
url += '&tableLayout=true&columns=' + pt.xLayout.columnDimensionNames.join(';') + '&rows=' + pt.xLayout.rowDimensionNames.join(';');
- window.open(url, '_blank');
+ window.open(url, isNewTab ? '_blank' : '_top');
}
};
@@ -3597,7 +3597,7 @@
text: 'HTML (.html)',
iconCls: 'pt-menu-item-xls',
handler: function() {
- openTableLayoutTab('html');
+ openTableLayoutTab('html', true);
}
},
{
@@ -3610,16 +3610,7 @@
iconCls: 'pt-menu-item-csv',
handler: function() {
if (pt.baseUrl && pt.paramString) {
- window.open(pt.baseUrl + '/api/analytics.json' + pt.paramString);
- }
- }
- },
- {
- text: 'CSV',
- iconCls: 'pt-menu-item-csv',
- handler: function() {
- if (pt.baseUrl && pt.paramString) {
- window.location.href = pt.baseUrl + '/api/analytics.csv' + pt.paramString;
+ window.open(pt.baseUrl + '/api/analytics.json' + pt.paramString, '_blank');
}
}
},
@@ -3628,7 +3619,7 @@
iconCls: 'pt-menu-item-csv',
handler: function() {
if (pt.baseUrl && pt.paramString) {
- window.open(pt.baseUrl + '/api/analytics.xml' + pt.paramString);
+ window.open(pt.baseUrl + '/api/analytics.xml' + pt.paramString, '_blank');
}
}
},
@@ -3640,6 +3631,15 @@
window.location.href = pt.baseUrl + '/api/analytics.xls' + pt.paramString;
}
}
+ },
+ {
+ text: 'CSV',
+ iconCls: 'pt-menu-item-csv',
+ handler: function() {
+ if (pt.baseUrl && pt.paramString) {
+ window.location.href = pt.baseUrl + '/api/analytics.csv' + pt.paramString;
+ }
+ }
}
],
listeners: {
@@ -3885,13 +3885,12 @@
treePanel.numberOfRecords = pt.util.object.getLength(graphMap);
for (var key in graphMap) {
if (graphMap.hasOwnProperty(key)) {
- treePanel.multipleExpand(key, graphMap[key], true);
+ treePanel.multipleExpand(key, graphMap[key], false);
}
}
}
else {
treePanel.reset();
- //update();
}
};
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js 2013-05-27 19:02:40 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js 2013-05-27 20:01:15 +0000
@@ -4204,13 +4204,12 @@
treePanel.numberOfRecords = dv.util.object.getLength(graphMap);
for (var key in graphMap) {
if (graphMap.hasOwnProperty(key)) {
- treePanel.multipleExpand(key, graphMap[key], true);
+ treePanel.multipleExpand(key, graphMap[key], false);
}
}
}
else {
treePanel.reset();
- //update();
}
};