=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/readMessage.js' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/readMessage.js 2011-06-22 18:29:52 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/readMessage.js 2011-07-28 07:15:09 +0000 @@ -2,7 +2,6 @@ $( document ).ready( function() { - dialog = $( "#senderInfo" ).dialog( { modal : true, autoOpen : false, === modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetHistoryChartAction.java' --- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetHistoryChartAction.java 2011-07-20 21:38:30 +0000 +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetHistoryChartAction.java 2011-07-28 07:15:09 +0000 @@ -131,7 +131,7 @@ return width; } - private int height = 330; + private int height = 300; public int getHeight() { === modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/HistoryAction.java' --- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/HistoryAction.java 2011-07-20 21:38:30 +0000 +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/HistoryAction.java 2011-07-28 07:15:09 +0000 @@ -120,18 +120,6 @@ this.optionComboId = optionComboId; } - private Boolean showComment; - - public void setShowComment( Boolean showComment) - { - this.showComment = showComment; - } - - public Boolean getShowComment() - { - return showComment; - } - private String periodId; public String getPeriodId() @@ -189,7 +177,7 @@ public String execute() throws Exception - { + { DataElement dataElement = dataElementService.getDataElement( dataElementId ); DataElementCategoryOptionCombo optionCombo = categoryService.getDataElementCategoryOptionCombo( optionComboId ); === modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.xml 2011-07-25 20:12:49 +0000 +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/struts.xml 2011-07-28 07:15:09 +0000 @@ -14,7 +14,7 @@ /dhis-web-dataentry/select.vm /dhis-web-dataentry/menu.vm 420 - ../dhis-web-commons/ouwt/ouwt.js,javascript/form.js,javascript/entry.js + ../dhis-web-commons/ouwt/ouwt.js,javascript/form.js,javascript/entry.js,javascript/history.js style/dhis-web-dataentry.css @@ -58,9 +58,7 @@ - /popup.vm - /dhis-web-dataentry/history.vm - javascript/history.js + /dhis-web-dataentry/history.vm === modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/history.vm' --- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/history.vm 2011-07-20 21:38:30 +0000 +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/history.vm 2011-07-28 07:15:09 +0000 @@ -1,13 +1,6 @@ #set( $width = 40 * $dataElementHistory.historyLength ) @@ -28,16 +21,14 @@ - + - +

$i18n.getString( "dataelement_comment" )

- #if( $showComment == 'true' )
- - #end +

$encoder.htmlEncode( $i18n.getString( "min_max_limits" ) )

@@ -47,8 +38,8 @@ @@ -57,14 +48,14 @@ - + @@ -101,7 +92,4 @@ #end -
- + #else disabled="disabled" #end /> +
- + #else disabled="disabled" #end /> +
  $encoder.htmlEncode( $i18n.getString( "average" ) ) ${average}
 
- -

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js' --- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2011-07-25 15:46:47 +0000 +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2011-07-28 07:15:09 +0000 @@ -549,12 +549,26 @@ // History // ----------------------------------------------------------------------------- +function displayHistoryDialog() +{ + $( '#historyDiv' ).dialog( { + modal: true, + title: 'History', + width: 580, + height: 710 + } ); +} + function viewHist( dataElementId, optionComboId ) { var periodId = $( '#selectedPeriodId' ).val(); - window.open( 'viewHistory.action?dataElementId=' + dataElementId + '&optionComboId=' + optionComboId - + '&periodId=' + periodId + '&showComment=true', '_blank', 'width=580,height=710,scrollbars=yes' ); + $( '#historyDiv' ).load( 'viewHistory.action', { + dataElementId: dataElementId, + optionComboId: optionComboId, + periodId: periodId }, + displayHistoryDialog + ); } function closeCurrentSelection() === modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/history.js' --- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/history.js 2011-07-21 17:58:42 +0000 +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/history.js 2011-07-28 07:15:09 +0000 @@ -1,8 +1,4 @@ -var COLOR_GREEN = '#b9ffb9'; -var COLOR_YELLOW = '#fffe8c'; -var COLOR_RED = '#ff8a8a'; - // ----------------------------------------------------------------------------- // Comments // ----------------------------------------------------------------------------- @@ -10,8 +6,9 @@ function saveComment() { var commentValue = $( '#commentTextArea' ).val(); + var periodId = $( '#selectedPeriodId' ).val(); - var commentSaver = new CommentSaver( currentDataElementId, currentOptionComboId, currentOrganisationUnitId, currentPeriodId, commentValue ); + var commentSaver = new CommentSaver( currentDataElementId, currentOptionComboId, currentOrganisationUnitId, periodId, commentValue ); commentSaver.save(); } @@ -68,7 +65,7 @@ var url = 'removeMinMaxLimits.action?organisationUnitId=' + currentOrganisationUnitId + '&dataElementId=' + currentDataElementId + '&optionComboId=' + currentOptionComboId; - $.get( url, refreshWindow ); + $.get( url, refreshChart ); } function saveMinMaxLimit() @@ -114,17 +111,19 @@ $( '#maxSpan' ).html( '' ); } - // TODO fix - //currentMinMaxValueMap[currentDataElementId + '-' + currentOptionComboId + '-min'] = minValue; - //currentMinMaxValueMap[currentDataElementId + '-' + currentOptionComboId + '-max'] = maxValue; + var minId = currentDataElementId + '-' + currentOptionComboId + '-min'; + var maxId = currentDataElementId + '-' + currentOptionComboId + '-max'; + + currentMinMaxValueMap[minId] = minValue; + currentMinMaxValueMap[maxId] = maxValue; var url = 'saveMinMaxLimits.action?organisationUnitId=' + currentOrganisationUnitId + '&dataElementId=' + currentDataElementId + '&optionComboId=' + currentOptionComboId + '&minLimit=' + minValue + '&maxLimit=' + maxValue; - $.get( url, refreshWindow ); + $.get( url, refreshChart ); } -function refreshWindow() +function refreshChart() { var source = 'getHistoryChart.action?dataElementId=' + currentDataElementId + '&categoryOptionComboId=' + currentOptionComboId + '&r=' + Math.random(); === modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm' --- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm 2011-07-25 08:52:10 +0000 +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm 2011-07-28 07:15:09 +0000 @@ -19,6 +19,11 @@ var i18n_confirm_undo = '$encoder.jsEscape( $i18n.getString( "confirm_undo" ) , "'")'; var i18n_no_response_from_server = '$encoder.jsEscape( $i18n.getString( "no_response_from_server" ) , "'")'; +var i18n_enter_digits = '$encoder.jsEscape( $i18n.getString( "enter_digits" ) , "'")'; +var i18n_max_must_be_greater_than_min = '$encoder.jsEscape( $i18n.getString( "max_must_be_greater_than_min" ) , "'")'; +var i18n_mark_value_for_followup = '$encoder.jsEscape( $i18n.getString( "mark_value_for_followup" ) , "'")'; +var i18n_unmark_value_for_followup = '$encoder.jsEscape( $i18n.getString( "unmark_value_for_followup" ) , "'")'; + significantZeros = [ #set( $size1 = $significantZeros.size() ) #foreach( $dataElement in $significantZeros ) @@ -104,3 +109,5 @@ #parse( "dhis-web-commons/loader/loader.vm" )
+ +
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css' --- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css 2011-07-21 20:27:34 +0000 +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css 2011-07-28 07:15:09 +0000 @@ -53,28 +53,3 @@ { text-align: center; } - -@media print -{ - #mainHeader, #topMenu, #leftBar, #currentSelection, #actions, input[type=button] - { - display: none; - } - - input, select - { - border: 0; - background-color: inherit; - } - - a - { - text-decoration: none; - color: black; - } - - #typeCol, #minCol, #maxCol, #commentCol - { - visibility: collapse; - } -}