← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11276: (DV) Chart and api links added to interpretation window.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 11276 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-06-28 13:53:56 +0200
message:
  (DV) Chart and api links added to interpretation window.
modified:
  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-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-06-26 16:11:35 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js	2013-06-28 11:52:44 +0000
@@ -1900,8 +1900,16 @@
 			});
 
 			linkPanel = Ext.create('Ext.panel.Panel', {
-				html: '<b>Link: </b><span class="user-select">' + dv.baseUrl + '/dhis-web-visualizer/app/index.html?id=' + dv.favorite.id + '</span>',
-				style: 'padding-top: 9px; padding-bottom: 6px',
+				html: function() {
+					var chartUrl = dv.baseUrl + '/dhis-web-visualizer/app/index.html?id=' + dv.favorite.id,
+						apiUrl = dv.baseUrl + '/api/charts/' + dv.favorite.id + '/data',
+						html = '';
+					
+					html += '<div><b>Chart link: </b><span class="user-select"><a href="' + chartUrl + '" target="_blank">' + chartUrl + '</a></span></div>';
+					html += '<div style="padding-top:3px"><b>API link: </b><span class="user-select"><a href="' + apiUrl + '" target="_blank">' + apiUrl + '</a></span></div>';
+					return html;
+				}(),
+				style: 'padding-top: 8px; padding-bottom: 5px',
 				bodyStyle: 'border: 0 none'
 			});