dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15486
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5630: Don't show orgunit name and program list when opening multi-data-entry form.
------------------------------------------------------------
revno: 5630
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-12-28 13:21:57 +0700
message:
Don't show orgunit name and program list when opening multi-data-entry form.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addRelationshipForm.vm
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/form.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/relationshipPatient.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePrograms.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.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-web/dhis-web-caseentry/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2011-12-16 06:45:30 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2011-12-28 06:21:57 +0000
@@ -134,7 +134,7 @@
<param name="page">/dhis-web-caseentry/multiDataEntrySelect.vm</param>
<param name="menu">/dhis-web-caseentry/dataEntryMenu.vm</param>
<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/commons.js,
- javascript/form.js</param>
+ javascript/form.js, javascript/multiDataEntry.js</param>
</action>
<action name="getPrograms"
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addRelationshipForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addRelationshipForm.vm 2011-10-29 14:16:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addRelationshipForm.vm 2011-12-28 06:21:57 +0000
@@ -80,7 +80,7 @@
#end
</select>
<em title="$i18n.getString( 'required' )" class="required">*</em>
- <input type="text" id="searchText" name="searchText" maxlength="30"/>
+ <input type="text" id="searchText" name="searchText" maxlength="30" onchange="validateSearchPartner('$patient.id');"/>
<input type="button" value="$i18n.getString( 'search' )" onclick="validateSearchPartner('$patient.id')"/>
</td>
</tr>
=== 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-12-21 10:18:17 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm 2011-12-28 06:21:57 +0000
@@ -14,6 +14,14 @@
saveExecutionDate( getFieldValue('programStageId'), getFieldValue('executionDate') );
});
+ if( getFieldValue('programStageId') == 0 )
+ {
+ disable('executionDate');
+ }
+ else
+ {
+ enable('executionDate');
+ }
entryFormContainerOnReady();
});
</script>
=== 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-12-15 04:13:03 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm 2011-12-28 06:21:57 +0000
@@ -57,6 +57,7 @@
<td><input type="text" id="executionDate" name="executionDate" style="width:330px" value="$!format.formatDate( $programStageInstance.executionDate )" >
<script type="text/javascript">
datePickerValid( 'executionDate', false );
+ disable('executionDate');
</script>
</tr>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/form.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/form.js 2011-12-21 09:21:08 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/form.js 2011-12-28 06:21:57 +0000
@@ -15,6 +15,7 @@
}
selection.setListenerFunction( organisationUnitSelected );
+
//--------------------------------------------------------------------------------------------
// Show selected data-recording
//--------------------------------------------------------------------------------------------
@@ -148,93 +149,6 @@
}
}
-//------------------------------------------------------
-// Multi Data-entry
-//------------------------------------------------------
-
-function multiDataEntryOrgunitSelected( orgUnits )
-{
- hideById("listPatient");
- jQuery.postJSON( "getPrograms.action",
- {
- },
- function( json )
- {
- enable('programId');
- enable('patientAttributeId');
-
- clearListById('programId');
- if(json.programs.length == 0)
- {
- disable('programId');
- disable('patientAttributeId');
- }
- else
- {
- addOptionById( 'programId', "0", i18n_select );
-
- for ( var i in json.programs )
- {
- addOptionById( 'programId', json.programs[i].id, json.programs[i].name );
- }
- }
- setFieldValue( 'orgunitName', json.organisationUnit );
- });
-}
-
-function selectProgram()
-{
- setInnerHTML('listPatient', '');
- if( getFieldValue('programId') == 0 )
- {
- hideById('listPatient');
- return;
- }
-
- contentDiv = 'listPatient';
- showLoader();
- jQuery('#listPatient').load("getDataRecords.action",
- {
- programId:getFieldValue('programId'),
- sortPatientAttributeId: getFieldValue('patientAttributeId')
- },
- function()
- {
- showById("listPatient");
- hideLoader();
- });
-}
-
-function viewPrgramStageRecords( programStageInstanceId )
-{
- $('#contentDataRecord').dialog('destroy').remove();
- $('<div id="contentDataRecord">' ).load("viewProgramStageRecords.action",
- {
- programStageInstanceId: programStageInstanceId
- }).dialog(
- {
- title: 'ProgramStage',
- maximize: true,
- closable: true,
- modal:false,
- overlay:{background:'#000000', opacity:0.1},
- width: 800,
- height: 400
- });
-}
-
-function loadProgramStageRecords( programStageInstanceId )
-{
- setInnerHTML('dataEntryFormDiv', '');
- showLoader();
- $('#dataEntryFormDiv' ).load("loadProgramStageRecords.action",
- {
- programStageInstanceId: programStageInstanceId
- }, function() {
- hideLoader();
- });
-}
-
// -------------------------------------------------------------------------
// Show Patient chart list
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/relationshipPatient.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/relationshipPatient.js 2011-10-06 06:42:42 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/relationshipPatient.js 2011-12-28 06:21:57 +0000
@@ -250,11 +250,11 @@
}
else if( type == 'error' )
{
- window.alert( i18n_searching_patient_failed + ':' + '\n' + message );
+ showErrorMessage( i18n_searching_patient_failed + ':' + '\n' + message );
}
else if( type == 'input' )
{
- setHeaderMessage( message );
+ showWarningMessage( message );
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm 2011-08-04 06:25:28 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm 2011-12-28 06:21:57 +0000
@@ -1,9 +1,3 @@
-<script type="text/javascript">
- jQuery(document).ready(function() {
- selection.setListenerFunction( multiDataEntryOrgunitSelected );
- });
-</script>
-
<h3>$i18n.getString( "multiple_data_entry" ) #openHelp('multi_patient_entry_form')</h3>
<form id="dataEntryForm" name="dataEntryForm" method="post" action="multipledataEntrySelect.action">
@@ -11,7 +5,7 @@
<tr>
<td><label>$i18n.getString( "reporting_unit" )</label></td>
<td>
- <input type="text" readonly="readonly" id='orgunitName' name='orgunitName' #if( $organisationUnit ) value="$encoder.htmlEncode( $organisationUnit.name )" #else value="[$i18n.getString( "select" )]" #end style="min-width:350px">
+ <input type="text" readonly="readonly" id='orgunitName' name='orgunitName' #if( $organisationUnit ) value="$organisationUnit.name" #else value="[$i18n.getString( "select" )]" #end style="min-width:350px">
</td>
<td> </td>
<td> </td>
@@ -46,6 +40,7 @@
<div id='listPatient'></div>
<script>
+
var i18n_select = '[' + '$encoder.jsEscape( $i18n.getString( "select" ) , "'")' + ']';
var i18n_value_must_integer = '$encoder.jsEscape( $i18n.getString( "value_must_integer" ) , "'")';
var i18n_value_must_number = '$encoder.jsEscape( $i18n.getString( "value_must_number" ) , "'")';
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePrograms.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePrograms.vm 2011-10-05 15:59:17 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePrograms.vm 2011-12-28 06:21:57 +0000
@@ -1,7 +1,5 @@
#set( $size = $programs.size() )
{
-"organisationUnit": "$!encoder.jsonEncode( ${organisationUnit.name} )",
-"organisationUnitId": "${organisationUnit.id}",
"programs": [
#foreach( $program in $programs )
{
=== 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-09-30 09:10:14 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm 2011-12-28 06:21:57 +0000
@@ -45,6 +45,7 @@
#parse( "dhis-web-commons/loader/loader.vm" )
<script type="text/javascript">
+
var i18n_id = '$encoder.jsEscape( $i18n.getString( "id" ), "'")';
var i18n_full_name = '$encoder.jsEscape( $i18n.getString( "full_name" ), "'")';
var i18n_gender = '$encoder.jsEscape( $i18n.getString( "gender" ), "'")';
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm 2011-12-28 05:10:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm 2011-12-28 06:21:57 +0000
@@ -42,7 +42,7 @@
<tr>
<td width="20em"><label for="dataElement">$i18n.getString( "dataelement" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
<td>
- <select id="aggregationDataElementId" name="aggregationDataElementId" style="min-width:30.5em" class="{validate:{required:true}}" >
+ <select id="aggregationDataElementId" name="aggregationDataElementId" style="width:30.5em" class="{validate:{required:true}}" >
</select>
</td>
</tr>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm 2011-12-28 05:10:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm 2011-12-28 06:21:57 +0000
@@ -44,7 +44,7 @@
<tr>
<td width="20em"><label for="dataElement">$i18n.getString( "dataelement" )<em title="$i18n.getString( "required" )" class="required">*</em></label></td>
<td>
- <select id="aggregationDataElementId" name="aggregationDataElementId" style="min-width:30.5em" class="{validate:{required:true}}" >
+ <select id="aggregationDataElementId" name="aggregationDataElementId" style="width:30.5em" class="{validate:{required:true}}" >
<option value="$caseAggregation.aggregationDataElement.id.$caseAggregation.optionCombo.id">$caseAggregation.aggregationDataElement.name ($caseAggregation.optionCombo.name)</option>
</select>
</td>