=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/InterpretationController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/InterpretationController.java 2012-05-31 18:16:45 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/InterpretationController.java 2012-05-31 20:29:41 +0000 @@ -104,6 +104,7 @@ if ( chart == null ) { ContextUtils.conflictResponse( response, "Chart identifier not valid" ); + return; } Interpretation interpretation = new Interpretation( chart, text ); @@ -121,6 +122,7 @@ if ( reportTable == null ) { ContextUtils.conflictResponse( response, "Report table identifier not valid" ); + return; } Interpretation interpretation = new Interpretation( reportTable, text ); === modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretation.vm' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretation.vm 2012-05-29 19:44:34 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretation.vm 2012-05-31 20:29:41 +0000 @@ -36,7 +36,7 @@ #end - +
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/ExportTableAction.java' --- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/ExportTableAction.java 2012-04-23 09:35:01 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/ExportTableAction.java 2012-05-31 20:29:41 +0000 @@ -102,6 +102,11 @@ private String uid; + public String getUid() + { + return uid; + } + public void setUid( String uid ) { this.uid = uid; === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2012-05-21 09:33:12 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2012-05-31 20:29:41 +0000 @@ -214,4 +214,8 @@ last_5_financial_years=Last 5 financial years financial_yearly=Financial Yearly please_specify_file=Please specify a design file -jasper_design=Jasper design \ No newline at end of file +jasper_design=Jasper design +write_your_interpretation=Write your interpretation +share=Share +share_your_interpretation=Share your interpretation +interpretation_was_shared=Interpretation was shared \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml 2012-04-23 09:35:01 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml 2012-05-31 20:29:41 +0000 @@ -186,6 +186,7 @@ /dhis-web-reporting/reportTableGrid.vm /dhis-web-reporting/menu.vm javascript/generateReport.js + style/dhis-web-reporting.css === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/generateReport.js' --- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/generateReport.js 2012-04-23 09:35:01 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/generateReport.js 2012-05-31 20:29:41 +0000 @@ -73,3 +73,34 @@ window.location.href = url; } + +function viewShareForm() +{ + $( "#shareForm" ).dialog( { + modal : true, + width : 500, + resizable: false, + title : i18n_share_your_interpretation + } ); +} + +function shareInterpretation( uid ) +{ + var text = $( "#interpretationArea" ).val(); + + if ( text.length ) + { + var url = "../api/interpretations/reportTable/" + uid; + + $.ajax( url, { + type: "POST", + contentType: "text/html", + data: text, + success: function() { + $( "#shareForm" ).dialog( "close" ); + $( "#interpretationArea" ).val( "" ); + setHeaderDelayMessage( i18n_interpretation_was_shared ); + } + } ); + } +} === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/reportTableGrid.vm' --- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/reportTableGrid.vm 2011-01-14 18:10:02 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/reportTableGrid.vm 2012-05-31 20:29:41 +0000 @@ -1,11 +1,26 @@ + +
+
-#parse( "dhis-web-commons/ajax/htmlGrid.vm" ) \ No newline at end of file +#parse( "dhis-web-commons/ajax/htmlGrid.vm" ) + +
+ + +
\ No newline at end of file === added directory 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/style' === added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/style/dhis-web-reporting.css' --- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/style/dhis-web-reporting.css 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/style/dhis-web-reporting.css 2012-05-31 20:29:41 +0000 @@ -0,0 +1,23 @@ + +#shareForm +{ + display: none; +} + +.interpretationArea +{ + height: 120px; + width: 462px; + border: 1px solid #ccc; + resize: none; + overflow: auto; + margin: 10px 4px 6px 4px; + padding: 4px 0 0px 6px; +} + +.interpretationButton +{ + width: 120px; + height: 24px; + margin: 0 0 6px 4px; +}