=== 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(); } };