← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10494: Add combobox for selecting a section in list in data entry from

 

------------------------------------------------------------
revno: 10494
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-04-08 12:43:06 +0700
message:
  Add combobox for selecting a section in list in data entry from
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
  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/javascript/anonymousRegistration.js
  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/patientForm.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.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/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2013-04-02 04:51:30 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2013-04-08 05:43:06 +0000
@@ -617,4 +617,5 @@
 next = Next
 confirm_delete_favorite = Are you sure you want to delete favorite ?
 in = IN
-home = Home
\ No newline at end of file
+home = Home
+show_all_sections = Show all sections
\ No newline at end of file

=== 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-04-04 05:07:53 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm	2013-04-08 05:43:06 +0000
@@ -32,6 +32,7 @@
 
 <div id='entryForm' #if($!programStageInstance.executionDate) class='visible' #else class='hidden' #end>					
 	<table style="width:600px;margin-top:-9px" class="listTable">
+		
 		#if($programStageInstance.programStage.captureCoordinates=='true')
 		<tr>
 			<th class='coordinates1'><label for="longitude">$i18n.getString( "longitude" )</label></th>
@@ -43,6 +44,7 @@
 			</th>
 		</tr>
 		#end
+		
 		<tr>
 			<th class='coordinates1'><label for="postComment">$i18n.getString('post_comment'):</label></td>
 			<th colspan='3'>
@@ -50,6 +52,20 @@
 			</td>
 		</tr>
 		
+		#if( $programStageInstance.programStage.getDataEntryType()=='section' )
+		<tr id="filterDataSetSectionTr" class='coordinates1'>
+			<th class='coordinates1'><label for="filterDataSetSection">$i18n.getString( "filter_on_section" )</label></th>
+			<th colspan='3'>
+				<select id="filterDataSetSection" name="filterDataSetSection" onchange="filterOnSection()" style="width:430px;margin-left:10px;" >
+					<option value='all'>$i18n.getString("show_all_sections")</option>
+					#foreach( $section in $sections )
+						<option value='$section.id'>$encoder.htmlEncode( $section.displayName )</option>
+					#end
+				</select>
+			</th>
+		</tr>
+		#end
+		
 		<tr>
 			<td class='coordinates1'></td>
 			<td colspan='3'>
@@ -66,6 +82,7 @@
 				</table>
 			</td>
 		</tr>
+		
 	</table>
 	</table>
 	

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2013-04-08 04:57:19 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2013-04-08 05:43:06 +0000
@@ -500,6 +500,9 @@
             var programStageId = jQuery( '#programId option:selected' ).attr( 'psid' );
             jQuery( '.stage-object-selected' ).attr( 'psid', programStageId );
             setInnerHTML( 'programName', programName );
+			jQuery('#executionDate').css('width',430);
+			jQuery('#executionDate').css('margin-right',30);
+			
             if ( getFieldValue( 'completed' ) == 'true' ) {
                 disable( "completeBtn" );
                 enable( "uncompleteBtn" );

=== 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-04-04 05:07:53 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js	2013-04-08 05:43:06 +0000
@@ -860,3 +860,17 @@
 		});
 }
 
+function filterOnSection()
+{
+    var value = 'sec_' + $( '#filterDataSetSection option:selected' ).val();
+    
+    if ( value == 'all' )
+    {
+        $( '.formSection' ).show();
+    }
+    else
+    {
+        $( '.formSection' ).hide();
+        $( '#' + value ).show();
+    }
+}

=== 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-19 08:08:50 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm	2013-04-08 05:43:06 +0000
@@ -152,6 +152,8 @@
 							<option value="true" #if($value=='true') selected #end>$i18n.getString( "yes" )</option>
 							<option value="false" #if($value=='false') selected #end>$i18n.getString( "no" )</option>
 						</select>                
+					#elseif( $attribute.valueType == "trueOnly" )
+						<input type='checkbox' value="true" id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" #if($value=='true') checked #end> 
 					#elseif( $attribute.valueType == "date" )
 						<input type="text" id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" value='$value' class=' #validate( "default"  $attribute.mandatory )'/>
 						<script type="text/javascript">
@@ -193,6 +195,8 @@
 							<option value="true" #if( $attributeValue ) selected="selected" #end>$i18n.getString( "yes" )</option>
 							<option value="false" #if( !$attributeValue ) selected="selected" #end>$i18n.getString( "no" )</option>
 						</select>                
+					#elseif( $attribute.valueType == "trueOnly" )
+						<input type='checkbox' value="true" id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" #if($value=='true') checked #end> 
 					#elseif( $attribute.valueType == "date" )
 						<input type="text" id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" value="$!attributeValue" class=' #validate( "default"  $attribute.mandatory )'>
 						<script type="text/javascript">

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.vm	2013-04-04 05:07:53 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.vm	2013-04-08 05:43:06 +0000
@@ -1,6 +1,6 @@
 #set( $tabIndex = 1 )
 #foreach( $section in $sections )
-	<table class="formSection" width='80%'>
+	<table class="formSection" width='80%' id='sec_$section.id' >
 		<tr>
 		  <td class='entryScreen'>
 			<div class="cent"><h3>$encoder.htmlEncode( $section.displayName )</h3></div>
@@ -8,7 +8,7 @@
 		</tr>
 		<tr>
 			<td width='100%'>
-				<div id='div_$section.id' class='entryScreen'>
+				<div class='entryScreen'>
 					<table width='100%'>
 						<colgroup>
 							<col id="deCol">