=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm 2013-09-06 15:53:07 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm 2013-09-08 09:12:12 +0000 @@ -78,10 +78,13 @@
@@ -124,4 +127,5 @@ disable('validateBtn'); } } + === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2013-09-07 21:25:35 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2013-09-08 09:12:12 +0000 @@ -2028,6 +2028,13 @@ } } +function commentKeyup(){ + var commentInput = byId('commentInput'); + while($(commentInput).outerHeight() < commentInput.scrollHeight + parseFloat($(commentInput).css("borderTopWidth")) + parseFloat($(commentInput).css("borderBottomWidth"))) { + $(commentInput).height($(commentInput).height()+10); + }; +} + function removeMessage(programInstanceId, programStageInstanceId, smsId ) { var result = window.confirm( i18n_confirmation_delete_message); === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2013-09-06 15:53:07 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2013-09-08 09:12:12 +0000 @@ -804,12 +804,13 @@ $( "#entryFormContainer input[id='currentUsername']" ).val( data.currentUsername ); $( "#entryFormContainer input[id='blockEntryForm']" ).val( data.programStage.blockEntryForm ); $( "#entryFormContainer input[id='remindCompleted']" ).val( data.programStage.remindCompleted ); - $( "#entryFormContainer input[id='commentInput']" ).val( data.comment ); $( "#entryFormContainer input[id='displayOptionSetAsRadioButton']" ).val( data.displayOptionSetAsRadioButton ); $( "input[id='dueDate']" ).val( data.dueDate ); $( "input[id='executionDate']" ).val( data.executionDate ); - + $( "#commentInput" ).val( data.comment ); + $( "#commentInput" ).height(data.comment.split('\n').length * 15 + 12); + if ( data.program.type != '1' ) { hideById( 'newEncounterBtn' ); }