dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #13272
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4201: Ajax Request stuff don't work does not work with IE9 ( Patient module ).
------------------------------------------------------------
revno: 4201
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-07-25 09:08:33 +0700
message:
Ajax Request stuff don't work does not work with IE9 ( Patient module ).
modified:
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/DataRecordingSelectAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/MultiDataEntrySelectAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SearchPatientAction.java
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/dataRecordingSelect.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/dataEntry.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageDataEntryForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/paging/paging.vm
--
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-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java 2011-07-21 08:26:15 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java 2011-07-25 02:08:33 +0000
@@ -580,7 +580,7 @@
// Inline Javascript to add to HTML before outputting
// ---------------------------------------------------------------------
- final String jsCodeForBoolean = " name=\"entryselect\" $DISABLED data=\"{compulsory:$COMPULSORY}\" onchange=\"saveOpt( $DATAELEMENTID )\" style=\" text-align:center;\" ";
+ final String jsCodeForBoolean = " name=\"entryselect\" $DISABLED data=\"{compulsory:$COMPULSORY, deName:'$DATAELEMENTNAME'}\" onchange=\"saveOpt( $DATAELEMENTID )\" style=\" text-align:center;\" ";
StringBuffer sb = new StringBuffer();
@@ -806,7 +806,7 @@
// Inline Javascript to add to HTML before outputting
// ---------------------------------------------------------------------
- final String jsCodeForCombo = " name=\"entryselect\" $DISABLED data=\"{compulsory:$COMPULSORY}\" onchange=\"saveOpt( $DATAELEMENTID )\"";
+ final String jsCodeForCombo = " name=\"entryselect\" $DISABLED data=\"{compulsory:$COMPULSORY, deName:'$DATAELEMENTNAME'}\" onchange=\"saveOpt( $DATAELEMENTID )\"";
StringBuffer sb = new StringBuffer();
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/DataRecordingSelectAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/DataRecordingSelectAction.java 2011-07-08 07:22:42 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/DataRecordingSelectAction.java 2011-07-25 02:08:33 +0000
@@ -94,12 +94,10 @@
throws Exception
{
patient = patientService.getPatient( patientId );
+
+ programs.addAll( patient.getPrograms() );
+
selectedStateManager.setSelectedPatient( patient );
-
- for ( Program program : patient.getPrograms() )
- {
- programs.add( program );
- }
return SUCCESS;
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/MultiDataEntrySelectAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/MultiDataEntrySelectAction.java 2011-05-20 09:23:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/MultiDataEntrySelectAction.java 2011-07-25 02:08:33 +0000
@@ -113,16 +113,8 @@
{
patientAttributes = patientAttributeService.getAllPatientAttributes();
- // ---------------------------------------------------------------------
- // Validate selected OrganisationUnit
- // ---------------------------------------------------------------------
-
organisationUnit = selectedStateManager.getSelectedOrganisationUnit();
- // ---------------------------------------------------------------------
- // Load assigned Programs
- // ---------------------------------------------------------------------
-
if( organisationUnit != null )
{
programs = programService.getPrograms( organisationUnit );
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SearchPatientAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SearchPatientAction.java 2011-05-10 07:25:28 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SearchPatientAction.java 2011-07-25 02:08:33 +0000
@@ -148,6 +148,17 @@
return SUCCESS;
}
+ if ( searchText != null )
+ {
+ int index = searchText.indexOf( ' ' );
+
+ if ( index != -1 && index == searchText.lastIndexOf( ' ' ) )
+ {
+ String[] keys = searchText.split( " " );
+ searchText = keys[0] + " " + keys[1];
+ }
+ }
+
if ( searchingAttributeId != null && searchText != null )
{
PatientAttribute searchingPatientAttribute = patientAttributeService
=== 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 2011-07-14 09:31:24 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm 2011-07-25 02:08:33 +0000
@@ -1,28 +1,19 @@
<script>
jQuery("#entryFormContainer").ready(function(){
- entryFormContainerOnReady();
+ setFieldValue( 'dueDate', "$!format.formatDate( $programStageInstance.dueDate )" );
+ setFieldValue( 'executionDate', "$!format.formatDate( $programStageInstance.executionDate )" );
+ entryFormContainerOnReady();
});
</script>
<div id='entryFormContainer'>
-<p align='right'>
- <label for="label2">$i18n.getString( "due_date" ) </label>
- <input type="text" id="dueDate" name="dueDate" value="$!format.formatDate( $programStageInstance.dueDate )" disabled="disabled"/>
-
- <label for="label">$i18n.getString( "report_date" ) </label>
- <input type="text" id="executionDate" name="executionDate" value="$!format.formatDate( $programStageInstance.executionDate )" onChange="saveExecutionDate( getFieldValue('programStageInstanceId'), getFieldValue('programStageInstanceName') );" />
- <script type="text/javascript">
- datePickerValid('executionDate', false);
- </script>
-</p>
-
<input type='hidden' id='incidentDate' value='$!format.formatDate($programStageInstance.programInstance.dateOfIncident)'>
<hr style="clear:both">
<span id="startMsg" style="font-style:italic; color:blue; display: #if($programStageInstance.executionDate) none #else block #end">$i18n.getString( "report_date_warning" )</span>
-<div id='entryForm' style="display: #if($programStageInstance.executionDate) block #else none #end">
+<div id='entryForm' style="display: #if($programStageInstance.executionDate) block #else none #end;">
#if( !$useDefaultForm)
<div id="customEntryScreenContainer">
#if( $customDataEntryFormCode )
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm 2011-07-08 07:22:42 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm 2011-07-25 02:08:33 +0000
@@ -29,6 +29,8 @@
#end
</select>
</td>
+ <td><label for="dueDate">$i18n.getString( "due_date" ) </label></td>
+ <td><input type="text" id="dueDate" name="dueDate" value="$!format.formatDate( $programStageInstance.dueDate )" readonly </td>
</tr>
<tr>
@@ -37,7 +39,13 @@
<select id="programStageId" name="programStageId" style="min-width:350px" onchange="javascript:loadDataEntry();" >
</select>
</td>
- </tr>
+ <td><label for="executionDate">$i18n.getString( "report_date" ) </label></td>
+ <td><input type="text" id="executionDate" name="executionDate" value="$!format.formatDate( $programStageInstance.executionDate )" onchange="saveExecutionDate( $programStageInstance.id, '$encoder.jsEncode( $programStageInstance.programStage.name )' )" >
+ <script type="text/javascript">
+ datePickerValid( 'executionDate', false );
+ </script>
+ </tr>
+
<tr>
<td></td>
<td>
@@ -45,7 +53,7 @@
<input type="button" id="validationBtn" value="$i18n.getString('validation')" onClick="javascript: runValidation();", '_blank', 'width=800, height=400, scrollbars=yes, resizable=yes' );" style="width:12em " disabled="disabled" >
</td>
<td align='right'>
- <input type="checkbox" id="useDefaultForm" name="useDefaultForm" value="true" onclick="loadDataEntry();" disabled="disabled" />
+ <input type="checkbox" id="useDefaultForm" name="useDefaultForm" value="true" onclick="loadDataEntry();" />
<label>$i18n.getString( "use_default_form" )</label><br>
</td>
</td>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/dataEntry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/dataEntry.js 2011-07-14 09:31:24 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/dataEntry.js 2011-07-25 02:08:33 +0000
@@ -6,21 +6,23 @@
hideById('dataEntryFormDiv');
hideById('dataRecordingSelectDiv');
showById('searchPatientDiv');
-
- jQuery.post("searchform.action",
- {
- },
- function (data)
- {
- enable('listPatientBtn');
- enable('searchingAttributeId');
- enable('searchBtn');
- jQuery('#searchText').removeAttr( 'readonly' );
-
- setFieldValue( 'orgunitName', data.getElementsByTagName( "name" )[0].firstChild.nodeValue );
-
- hideLoader();
- },'xml');
+
+ $.ajax({
+ url: "searchform.action",
+ dataType: "xml",
+ cache: false,
+ success: function (data)
+ {
+ enable('listPatientBtn');
+ enable('searchingAttributeId');
+ enable('searchBtn');
+ jQuery('#searchText').removeAttr( 'readonly' );
+
+ setFieldValue( 'orgunitName', $(data).find( "name" ).text() );
+
+ hideLoader();
+ }
+ });
}
selection.setListenerFunction( organisationUnitSelected );
@@ -139,48 +141,68 @@
function loadDataEntry()
{
- hideById('dataEntryFormDiv');
- if( getFieldValue('programStageId') == '0' )
+ setInnerHTML('dataEntryFormDiv', '');
+ showById('dataEntryFormDiv')
+ setFieldValue( 'dueDate', '' );
+ setFieldValue( 'executionDate', '' );
+
+ if( getFieldValue('programStageId') == null
+ || getFieldValue('programStageId') == 0 )
{
disable('validationBtn');
disable('completeBtn');
return;
}
- // Load data-entry form
showLoader();
var useDefaultForm = jQuery("#useDefaultForm").attr('checked') ? true : false;
- jQuery('#dataEntryFormDiv').load("dataentryform.action",
- {
- programStageId:getFieldValue('programStageId'),
- useDefaultForm : useDefaultForm
- },
- function( )
- {
- }).slideDown('fast', function()
- {
+
+ $.ajax({
+ url: "dataentryform.action",
+ data: 'programStageId='+getFieldValue('programStageId')+'&useDefaultForm=' +useDefaultForm,
+ cache: false,
+ dataType: "html",
+ success: function( html )
+ {
+ setInnerHTML('dataEntryFormDiv', html );
enable('validationBtn');
enable('completeBtn');
enable('useDefaultForm');
hideLoader();
hideById('contentDiv');
- });
+ }
+ });
}
//-----------------------------------------------------------------------------
// Search Patient
//-----------------------------------------------------------------------------
-function validateSearch()
+function searchPatientsOnKeyUp( event )
+{
+ var key = getKeyCode( event );
+
+ if ( key==13 )// Enter
+ {
+ validateSearch();
+ }
+}
+
+function getKeyCode(e)
+{
+ if (window.event)
+ return window.event.keyCode;
+ return (e)? e.which : null;
+}
+
+function validateSearch( event )
{
- var request = new Request();
- request.setResponseTypeXML( 'message' );
- request.setCallbackSuccess( searchValidationCompleted );
+ var request = new Request();
+ request.setResponseTypeXML( 'message' );
+ request.setCallbackSuccess( searchValidationCompleted );
request.sendAsPost('searchText=' + getFieldValue( 'searchText' ));
- request.send( 'validateSearch.action' );
-
- return false;
+ request.send( 'validateSearch.action' );
}
function searchValidationCompleted( messageElement )
@@ -220,10 +242,12 @@
function showPatientDetails( patientId )
{
- var request = new Request();
- request.setResponseTypeXML( 'patient' );
- request.setCallbackSuccess( patientReceived );
- request.send( 'getPatient.action?id=' + patientId );
+ $.ajax({
+ url: 'getPatient.action?id=' + patientId,
+ cache: false,
+ dataType: "xml",
+ success: patientReceived
+ });
}
function patientReceived( patientElement )
@@ -232,12 +256,12 @@
// Get common-information
// ----------------------------------------------------------------------------
- var id = patientElement.getElementsByTagName( "id" )[0].firstChild.nodeValue;
- var fullName = patientElement.getElementsByTagName( "fullName" )[0].firstChild.nodeValue;
- var gender = patientElement.getElementsByTagName( "gender" )[0].firstChild.nodeValue;
- var dobType = patientElement.getElementsByTagName( "dobType" )[0].firstChild.nodeValue;
- var birthDate = patientElement.getElementsByTagName( "dateOfBirth" )[0].firstChild.nodeValue;
- var bloodGroup= patientElement.getElementsByTagName( "bloodGroup" )[0].firstChild.nodeValue;
+ var id = jQuery(patientElement).find( "id" ).text();
+ var fullName = jQuery(patientElement).find( "fullName" ).text();
+ var gender = jQuery(patientElement).find( "gender" ).text();
+ var dobType = jQuery(patientElement).find( "dobType" ).text();
+ var birthDate = jQuery(patientElement).find( "dateOfBirth" ).text();
+ var bloodGroup= jQuery(patientElement).find( "bloodGroup" ).text();
var commonInfo = '<strong>' + i18n_id + ':</strong> ' + id + "<br>"
+ '<strong>' + i18n_full_name + ':</strong> ' + fullName + "<br>"
@@ -252,29 +276,29 @@
// Get identifier
// ----------------------------------------------------------------------------
- var identifiers = patientElement.getElementsByTagName( "identifier" );
-
+ var identifiers = jQuery(patientElement).find( "identifier" );
var identifierText = '';
- for ( var i = 0; i < identifiers.length; i++ )
- {
- identifierText = identifierText + identifiers[ i ].getElementsByTagName( "identifierText" )[0].firstChild.nodeValue + '<br>';
- }
+ $( identifiers ).each( function( i, item )
+ {
+ identifierText += $( item ).text() + '<br>';
+ });
+ identifiers = ( identifiers.length == 0 ) ? i18n_none : identifiers;
setInnerHTML( 'identifierField', identifierText );
// ----------------------------------------------------------------------------
// Get attribute
// ----------------------------------------------------------------------------
- var attributes = patientElement.getElementsByTagName( "attribute" );
-
+ var attributes = jQuery(patientElement).find( "attribute" );
var attributeValues = '';
- for ( var i = 0; i < attributes.length; i++ )
- {
- attributeValues = attributeValues + '<strong>' + attributes[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue + ': </strong>' + attributes[ i ].getElementsByTagName( "value" )[0].firstChild.nodeValue + '<br>';
- }
+ $( attributes ).each( function( i, item )
+ {
+ attributeValues += '<strong>' + $(item).find("name").text()+ ': </strong>' + $(item).find("value").text() + '<br>';
+ });
+
attributeValues = ( attributeValues.length == 0 ) ? i18n_none : attributeValues;
setInnerHTML( 'attributeField', attributeValues );
@@ -282,14 +306,13 @@
// Get programs
// ----------------------------------------------------------------------------
- var programs = patientElement.getElementsByTagName( "program" );
-
+ var programs = jQuery(patientElement).find( "program" );
var programName = '';
- for ( var i = 0; i < programs.length; i++ )
- {
- programName = programName + programs[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue + '<br>';
- }
+ $( programs ).each( function( i, item )
+ {
+ programName += $(item).text() + '<br>';
+ });
programName = ( programName.length == 0 ) ? i18n_none : programName;
setInnerHTML( 'programField', programName );
@@ -817,6 +840,7 @@
if ( code == 0 )
{
markValue( resultColor );
+ showById('entryFormContainer');
showById('dataEntryFormDiv');
showById('entryForm');
}
@@ -876,9 +900,7 @@
showData : function(data)
{
- jQuery("#orgUnitNameField").text(data.orgUnitName);
- jQuery("#programStageName").text(data.programStageName);
- jQuery("#dataelementName").text(data.dataElementName);
+ jQuery("#dataelementName").text(data.deName);
},
resetData : function()
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm 2011-05-10 07:25:28 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm 2011-07-25 02:08:33 +0000
@@ -63,10 +63,10 @@
$encoder.htmlEncode( $patient.getAge() )
</td>
<td style="text-align:center"#alternate( $mark )>
- <a href="javascript:showSelectedDataRecoding('$patient.id');" title="$i18n.getString( "data_entry" )"><img src="images/data_entry.png" alt="$i18n.getString( "data_entry" )"></a>
+ <a href="javascript:showSelectedDataRecoding('$patient.id');" title="$i18n.getString( 'data_entry' )"><img src="images/data_entry.png" alt="$i18n.getString( 'data_entry' )"></a>
</td>
<td style="text-align:center"#alternate( $mark )>
- <a href="javascript:showPatientDetails( $patient.id )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( "show_details" )"></a>
+ <a href="javascript:showPatientDetails( $patient.id )" title="$i18n.getString( 'show_details' )"><img src="../images/information.png" alt="$i18n.getString( 'show_details' )"></a>
</td>
</tr>
#if( $mark )
@@ -90,17 +90,15 @@
<td style="width:20em; padding-left:2em; vertical-align:top">
<div id="detailsArea" style="display:none">
<div style="float:right">
- <a href="javascript:hideDetails()" title="$i18n.getString( "hide_details" )"><img src="../images/close.png" alt="$i18n.getString( "hide_details" )"></a>
+ <a href="javascript:hideDetails()" title="$i18n.getString( 'hide_details' )"><img src="../images/close.png" alt="$i18n.getString( 'hide_details' )"></a>
</div>
- <p><label>$i18n.getString( "common_info" ):</label><br><span id="commonInfoField"></span></p>
- <p><label>$i18n.getString( "identifier" ):</label><br><span id="identifierField"></span></p>
- <p><label>$i18n.getString( "attributes" ):</label><br><span id="attributeField"></span></p>
- <p><label>$i18n.getString( "enrolled_in_program" ):</label><br><span id="programField"></span></p>
+ <p><label><strong>$i18n.getString( "common_info" ):</strong></label><br><span id="commonInfoField"></span></p>
+ <p><label><strong>$i18n.getString( "identifier" ):</strong></label><br><span id="identifierField"></span></p>
+ <p><label><strong>$i18n.getString( "attributes" ):</strong></label><br><span id="attributeField"></span></p>
+ <p><label><strong>$i18n.getString( "enrolled_in_program" ):</strong></label><br><span id="programField"></span></p>
</div>
</td>
</tr>
</table>
-
-
<span id="message"></span>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageDataEntryForm.vm 2011-07-14 09:31:24 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageDataEntryForm.vm 2011-07-25 02:08:33 +0000
@@ -4,9 +4,6 @@
});
</script>
-
-<form id="dataEntryFormDiv" name="dataEntryFormDiv" method="post" action="selectDataRecording.action">
-
<table class="mainPageTable">
<tr>
<td>
@@ -51,28 +48,25 @@
<td><input type="button" id="completeBtn" value="$i18n.getString('complete')" onClick="doComplete()" #if($programStageInstance.executionDate) #else disabled #end>
<input type="button" id="validationBtn" value="$i18n.getString('validation')" onClick="javascript: runValidation();" style="width:12em " #if($programStageInstance.executionDate) #else disabled #end>
</td>
- <td> </td>
+ <td align='right'>
+ <input type="checkbox" id="useDefaultForm" name="useDefaultForm" value="true" onclick="loadDataEntry();" />
+ <label>$i18n.getString( "use_default_form" )</label><br>
+ </td>
<td>
- <!-- <div id="actions" style="float:left">
- <input type="checkbox" id="useDefaultForm" name="useDefaultForm"
- #if( $useDefaultForm )
- checked="checked"
- #end
- onchange="selectDefaultForm();">
- <label>$i18n.getString( "use_default_form" )</label><br>
- </div> -->
</td>
</tr>
</table>
</form>
+<form id="dataEntryFormDiv" name="dataEntryFormDiv" method="post" action="selectDataRecording.action">
+
<hr style="clear:both">
<div id="dragDiv">
<table id="listInfo">
- <tr><td style="text-align:left"><strong>$i18n.getString("org_unit_name") :</strong></td> <td id="orgUnitNameField" style="text-align:right"></td></tr>
- <tr><td style="text-align:left"><strong>$i18n.getString("program_stage_name") :</strong></td> <td id="programStageName" style="text-align:right"></td></tr>
+ <tr><td style="text-align:left"><strong>$i18n.getString("org_unit_name") :</strong></td> <td style="text-align:right">$!patient.organisationUnit.name</td></tr>
+ <tr><td style="text-align:left"><strong>$i18n.getString("program_stage_name") :</strong></td> <td style="text-align:right">$!programStageInstance.programStage.name</td></tr>
<tr><td style="text-align:left"><strong>$i18n.getString("datae_element_name") :</strong></td> <td id="dataelementName" style="text-align:right"></td></tr>
</table>
</div>
@@ -81,7 +75,7 @@
#if( $programStageInstance.executionDate ) #else $i18n.getString( "report_date_warning" ) #end
</span>
-<div id="entryFormContainer" >
+<div id="entryFormContainer" #if( $programStageInstance.executionDate ) #else style='display:none;' #end>
<div id="customEntryScreenContainer">
#if( $customDataEntryFormCode )
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm 2011-06-14 16:13:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm 2011-07-25 02:08:33 +0000
@@ -1,6 +1,6 @@
<h3>$i18n.getString( "name_based_data_entry" )</h3>
-<div id='searchPatientDiv' #if($organisationUnit) #else disabled #end>
+<div id='searchPatientDiv'>
<table>
<tr>
<td><label>$i18n.getString( "registering_unit" )</label></td>
@@ -28,7 +28,7 @@
<em title="$i18n.getString( "required" )" class="required">*</em></label>
</td>
<td>
- <input type="text" id="searchText" name="searchText" maxlength="30" style="width:20em" #if($organisationUnit) #else readonly #end/>
+ <input type="text" id="searchText" name="searchText" maxlength="30" style="width:20em" #if($organisationUnit) #else readonly #end onkeyup='javascript: searchPatientsOnKeyUp(event)' />
</td>
<td>
<input type="button" id='searchBtn' value="$i18n.getString( 'search' )" onclick='validateSearch();' #if($organisationUnit) #else disabled #end/>
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/paging/paging.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/paging/paging.vm 2011-07-07 05:43:06 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/paging/paging.vm 2011-07-25 02:08:33 +0000
@@ -85,16 +85,14 @@
}
else
{
- if( contentDiv == undefined) { $( '#contentDiv' ).load(url); }
- else {
- var index = url.indexOf('?');
- var link = url.substring(0, index);
- var data = url.substring(index + 1);
- jQuery.postUTF8( link , data, function(html)
+ var index = url.indexOf('?');
+ var link = url.substring(0, index);
+ var data = url.substring(index + 1);
+ jQuery.postUTF8( link , data, function(html)
{
- setInnerHTML(contentDiv, html);
+ if( contentDiv == undefined) setInnerHTML( 'contentDiv', html);
+ else setInnerHTML(contentDiv, html);
});
- }
}
}