=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/chart.js' --- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/chart.js 2011-06-08 08:38:45 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/chart.js 2011-06-09 07:43:53 +0000 @@ -2,11 +2,20 @@ // View chart // ----------------------------------------------------------------------------- -function viewChart( url ) +function viewChart( url, size ) { - window - .open(url, "_blank", - "directories=no, height=560, width=760, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); + var width = size === 'wide' ? 1000 : 700; + var height = size === 'tall' ? 800 : 500; + + $('#chartImage').attr('src', url); + $('#chartView').dialog({ + autoOpen: true, + modal: true, + height: height + 35, + width: width, + resizable: false, + title: 'Viewing Chart' + }); } // ----------------------------------------------------------------------------- === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewChartForm.vm' --- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewChartForm.vm 2011-06-08 08:47:42 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewChartForm.vm 2011-06-09 07:43:53 +0000 @@ -49,7 +49,7 @@ $encoder.htmlEncode( $chart.title ) - $i18n.getString( + $i18n.getString( $i18n.getString( #if( $auth.hasAccess( "dhis-web-reporting", "removeChart" ) ) $i18n.getString( @@ -84,3 +84,7 @@ + +