dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21288
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10029: Minor fix for Advanced search patient.
------------------------------------------------------------
revno: 10029
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-03-07 15:55:02 +0700
message:
Minor fix for Advanced search patient.
modified:
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/multiDataEntrySelect.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.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/webapp/dhis-web-caseentry/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2013-03-06 15:05:04 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2013-03-07 08:55:02 +0000
@@ -142,7 +142,7 @@
function getGenderSelector()
{
- var genderSelector = '<select id="searchText" name="searchText">';
+ var genderSelector = '<select id="searchText" name="searchText" style="width:200px;">';
genderSelector += '<option value="M">' + i18n_male + '</option>';
genderSelector += '<option value="F">' + i18n_female + '</option>';
genderSelector += '<option value="T">' + i18n_transgender + '</option>';
@@ -153,14 +153,14 @@
function getAgeTextBox( container )
{
var ageField = '<select id="dateOperator" name="dateOperator" style="width:40px"><option value=">"> > </option><option value=">="> >= </option><option value="="> = </option><option value="<"> < </option><option value="<="> <= </option></select>';
- ageField += '<input type="text" id="searchText_' + container + '" name="searchText" style="width:220px;">';
+ ageField += '<input type="text" id="searchText_' + container + '" name="searchText" style="width:160px;">';
return ageField;
}
function getDateField( container )
{
var dateField = '<select id="dateOperator_' + container + '" name="dateOperator" style="width:40px"><option value=">"> > </option><option value=">="> >= </option><option value="="> = </option><option value="<"> < </option><option value="<="> <= </option></select>';
- dateField += '<input type="text" id="searchText_' + container + '" name="searchText" style="width:200px;" onkeyup="searchPatientsOnKeyUp( event );">';
+ dateField += '<input type="text" id="searchText_' + container + '" name="searchText" style="width:160px;" onkeyup="searchPatientsOnKeyUp( event );">';
return dateField;
}
=== 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 2013-03-05 14:47:06 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm 2013-03-07 08:55:02 +0000
@@ -2,7 +2,7 @@
jQuery(document).ready( function(){
jQuery("#programIdAddPatient option").each(function(){
var item = jQuery(this);
- if( item.attr('type')!=1 && item.val()!='' ){
+ if( item.attr('type')!=1 || item.val()=='' ){
item.remove();
}
});
@@ -11,6 +11,10 @@
hideById('addPatientBtn');
jQuery("#searchObjectId [value=prg]").remove();
registration = false;
+ if(jQuery("#programIdAddPatient option").length > 0){
+ enable('listPatientBtn');
+ enable('advancedSearchBtn');
+ }
});
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm 2013-03-05 14:47:06 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm 2013-03-07 08:55:02 +0000
@@ -11,7 +11,7 @@
#end
<tr id='registrationDateTR'>
- <td class='text-column'><label for="registration_date">$i18n.getString( "registration_date" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+ <td class='text-column'><label for="registration_date">$i18n.getString( "registration_date" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
<td class="input-column" colspan='2'>
<input type="text" id="registrationDate" name="registrationDate" class="{validate:{required:true}}"/>
</td>
@@ -22,12 +22,12 @@
</tr>
<tr>
- <td class='text-column'><label for="fullName">$i18n.getString( "full_name" )<em title="$i18n.getString( "required" )" class="required">*</em></label></td>
+ <td class='text-column'><label for="fullName">$i18n.getString( "full_name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
<td class="input-column"><input type="text" id="fullName" name="fullName" value="$!patient.getFullName()" class="{validate:{required:true, rangelength:[3,50]}}"></td>
</tr>
<tr>
- <td class='text-column'><label for="gender">$i18n.getString( "gender" )<em title="$i18n.getString( "required" )" class="required">*</em></label></td>
+ <td class='text-column'><label for="gender">$i18n.getString( "gender" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
<td class="input-column">
<select id="gender" name="gender">
<option value="M" #if( $!patient.gender == 'M' ) selected="selected" #end>$i18n.getString( "male" )</option>
@@ -38,7 +38,7 @@
</tr>
<tr>
- <td class='text-column' ><label for="birthDate">$i18n.getString( "date_of_birth" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+ <td class='text-column' ><label for="birthDate">$i18n.getString( "date_of_birth" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
<td class="input-column">
<select id='dobType' name="dobType" style='width:120px' onchange='dobTypeOnChange("patientForm")' >
<option value="V" #if($patient.dobType=='V') selected #end >$i18n.getString( "verified" )</option>
@@ -127,7 +127,7 @@
#set( $identifier = '' )
#set( $identifier = $identiferMap.get( $identifierType.id ) )
<tr>
- <td class='text-column'><label>$encoder.htmlEncode($identifierType.displayName) #if($identifierType.mandatory)<em title="$i18n.getString( "required" )" class="required">*</em> #end</label></td>
+ <td class='text-column'><label>$encoder.htmlEncode($identifierType.displayName) #if($identifierType.mandatory) <em title="$i18n.getString( "required" )" class="required">*</em> #end</label></td>
<td class="input-column"><input type="text" id="iden$identifierType.id" name="iden$identifierType.id" value="$!identifier" data="{related:$identifierType.related}" #if($identifierType.related && $!patient.underAge) disabled="disabled" #end class="{validate:{required:$identifierType.mandatory, #if($!identifierType.noChars) maxlength:$identifierType.noChars, #end #if($identifierType.type=='number') number:true #elseif($!identifierType.type=='letter') lettersonly:true #end }}" /></td>
</tr>
#end
@@ -145,7 +145,7 @@
#set($value = $patientAttributeValueMap.get($attribute.id))
#if( $attribute.valueType != 'calculated')
<tr>
- <td class='text-column'><label>$encoder.htmlEncode($attribute.displayName) #if($attribute.mandatory)<em title="$i18n.getString( 'required' )" class="required">*</em> #end</label></td>
+ <td class='text-column'><label>$encoder.htmlEncode($attribute.displayName) #if($attribute.mandatory) <em title="$i18n.getString( 'required' )" class="required">*</em> #end</label></td>
<td class="input-column">
#if( $attribute.valueType == "bool" )
<select id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit">
@@ -187,7 +187,7 @@
#set( $attributeValue = $!patientAttributeValueMap.get( $attribute.id ) )
#if( $attribute.valueType != 'calculated')
<tr>
- <td class='text-column'><label>$encoder.htmlEncode($attribute.displayName) #if($attribute.mandatory)<em title="$i18n.getString( "required" )" class="required">*</em> #end</label></td>
+ <td class='text-column'><label>$encoder.htmlEncode($attribute.displayName) #if($attribute.mandatory) <em title="$i18n.getString( "required" )" class="required">*</em> #end</label></td>
<td class="input-column">
#if( $attribute.valueType == "bool" )
<select id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit">
@@ -224,17 +224,17 @@
<tr><th colspan="2" class="heading-column">$i18n.getString( "program_enrollment" )</th></tr>
<tr>
<tr>
- <td class='text-column'><label for="enrollmentDate">$encoder.htmlEncode($program.dateOfEnrollmentDescription) <em title="$i18n.getString( "required" )" class="required"> * </em></label></td>
+ <td class='text-column'><label for="enrollmentDate">$encoder.htmlEncode($program.dateOfEnrollmentDescription) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
<td colspan='2' class='input-column'><input type="text" id="enrollmentDate" name="enrollmentDate" class="{validate:{required:true}}"></td>
</tr>
#if($!program.displayIncidentDate=='true')
<tr>
- <td class='text-column'><label for="dateOfIncident">$encoder.htmlEncode($program.dateOfIncidentDescription) <em title="$i18n.getString( "required" )" class="required"> * </em></label></td>
+ <td class='text-column'><label for="dateOfIncident">$encoder.htmlEncode($program.dateOfIncidentDescription) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
<td colspan='2' class='input-column'><input type="text" id="dateOfIncident" name="dateOfIncident" class="{validate:{required:true}}"></td>
</tr>
- <script>datePickerInRangeValid( 'dateOfIncident' , 'enrollmentDate' );</script>
+ <script>datePickerInRangeValid( 'dateOfIncident' , 'enrollmentDate', false, true );</script>
#else
- <script>datePickerValid( 'enrollmentDate', false );</script>
+ <script>datePickerValid( 'enrollmentDate', true );</script>
#end
#end
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm 2013-03-06 15:05:04 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm 2013-03-07 08:55:02 +0000
@@ -131,8 +131,8 @@
datePicker( 'startDueDate', true );
datePicker( 'endDueDate', true );
- var searchTextBox = '<input type="text" id="searchText" name="searchText" onkeyup="searchPatientsOnKeyUp( event );" style="width:200px;">';
- var programComboBox = '<select class="search-field" id="searchText" name="searchText" >';
+ var searchTextBox = '<input type="text" id="searchText" name="searchText" onkeyup="searchPatientsOnKeyUp( event );" style="width:202px;">';
+ var programComboBox = '<select class="search-field" id="searchText" name="searchText" style="width:205px;">';
#foreach ( $program in $programs )
programComboBox += '<option value="$program.id">$program.displayName</option>';
#end