← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7748: Add color help meaning div in multiple data entry.

 

------------------------------------------------------------
revno: 7748
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-07-28 20:37:33 +0700
message:
  Add color help meaning div in multiple data entry.
added:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/colorHelp.vm
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/resources/help_content.xml
  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/resources/org/hisp/dhis/caseentry/i18n_module.properties
  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/commons.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/javascript/multiDataEntry.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.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-core/src/main/resources/help_content.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/help_content.xml	2012-07-27 09:14:50 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/help_content.xml	2012-07-28 13:37:33 +0000
@@ -6161,7 +6161,7 @@
               <para>YELLOW: Coming stages.</para>
             </listitem>
             <listitem>
-              <para>GREEN: Compete stages.</para>
+              <para>GREEN: Completed stages.</para>
             </listitem>
           </itemizedlist>
         </section>

=== 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	2012-07-27 15:13:24 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java	2012-07-28 13:37:33 +0000
@@ -532,13 +532,13 @@
         {
             inputHTML += jsCodeForOnchange;
         }
-System.out.println("\n\n === \n dataElement.getDetailedTextType() : " + dataElement.getDetailedTextType() );
+        
         if ( DataElement.VALUE_TYPE_LONG_TEXT.equals( dataElement.getDetailedTextType() ) )
         {
             inputHTML = inputHTML.replaceFirst( "input", "textarea" );
             inputHTML += " >$VALUE</textarea>";
         }
-System.out.println("\n\n inputHTML: " + inputHTML );        
+        
         return inputHTML;
     }
 

=== 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	2012-07-27 15:29:04 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2012-07-28 13:37:33 +0000
@@ -375,10 +375,10 @@
 color_quick_help = Color quick help
 color = Color
 what_do_colors_mean = What do colors mean ?
-event_is_completed = Event is completed.
-the_stage_is_started_but_not_completed_yet = The stage is started, but not completed yet.
-the_stage_is_started_and_due_date_is_after_the_current_date = The stage is started and due date is after the current date.
-the_stage_is_not_started_and_due_date_is_before_the_current_date = The stage is not started and due date is before the current date.
+completed_stages = Completed stages.
+data_entered_and_uncompleted_stages = Data entered and uncompleted stages.
+coming_stages = Coming stages.
+stages_open_but_no_data_entered_while_the_date_estimated_for_closing_completing_is_over = Stages open but no data entered while the date estimated for closing/completing is over.
 value_is_invalid = Value is invalid
 value_is_valid = Value is valid
 incomplete_confirm_message=Are you sure this event is incompleted ?

=== added file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/colorHelp.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/colorHelp.vm	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/colorHelp.vm	2012-07-28 13:37:33 +0000
@@ -0,0 +1,28 @@
+<a href="javascript:showColorHelp()" id='colorHelpLink' title="$i18n.getString( 'what_do_colors_mean' )" class="hidden">$i18n.getString('what_do_colors_mean')</a>
+<div id="colorHelpDiv" class="hidden history">
+	<table>
+		<col width='80px;'/>
+		<thead>
+			<tr>
+				<th>$i18n.getString('color')</th>
+				<th>$i18n.getString('description')</th>
+			</tr>
+		</thead>
+		<tr>
+			<td id='colorGreenTD' class='input-column'><script>byId('colorGreenTD').style.backgroundColor = COLOR_GREEN;</script></td>
+			<td>$i18n.getString('completed_stages')</td>
+		</tr>
+		<tr>
+			<td id='colorLightredTD'><script>byId('colorLightredTD').style.backgroundColor = COLOR_LIGHTRED;</script></td>
+			<td>$i18n.getString('data_entered_and_uncompleted_stages')</td>
+		</tr>
+		<tr>
+			<td id='colorYellowTD'><script>byId('colorYellowTD').style.backgroundColor = COLOR_YELLOW;</script></td>
+			<td>$i18n.getString('coming_stages')</td>
+		</tr>
+		<tr>
+			<td id='colorRedTD'><script>byId('colorRedTD').style.backgroundColor = COLOR_RED;</script></td>
+			<td>$i18n.getString('stages_open_but_no_data_entered_while_the_date_estimated_for_closing_completing_is_over')</td>
+		</tr>
+	</table>
+</div>
\ No newline at end of file

=== 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	2012-07-27 03:53:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm	2012-07-28 13:37:33 +0000
@@ -1,5 +1,3 @@
-<script type="text/javascript" src="javascript/jquery.mousewheel.js"></script>
-
 <form id='dataRecordingSelectForm' name='dataRecordingSelectForm' method='post'>
 
 <table class="mainPageTable" id='patientInfoDiv'> 
@@ -20,41 +18,12 @@
 		</tr>
 		</table>
 	</tr>
-	<tr>
-		<td>
-			<a href="javascript:showColorHelp()" id='colorHelpLink' title="$i18n.getString( 'what_do_colors_mean' )" class="hidden">$i18n.getString('what_do_colors_mean')</a>
-			<div id="colorHelpDiv" class="hidden history">
-				<table>
-					<col width='80px;'/>
-					<thead>
-						<tr>
-							<th>$i18n.getString('color')</th>
-							<th>$i18n.getString('description')</th>
-						</tr>
-					</thead>
-					<tr>
-						<td id='colorGreenTD' class='input-column'><script>byId('colorGreenTD').style.backgroundColor = COLOR_GREEN;</script></td>
-						<td>$i18n.getString('event_is_completed')</td>
-					</tr>
-					<tr>
-						<td id='colorLightredTD'><script>byId('colorLightredTD').style.backgroundColor = COLOR_LIGHTRED;</script></td>
-						<td>$i18n.getString('the_stage_is_started_but_not_completed_yet')</td>
-					</tr>
-					<tr>
-						<td id='colorYellowTD'><script>byId('colorYellowTD').style.backgroundColor = COLOR_YELLOW;</script></td>
-						<td>$i18n.getString('the_stage_is_started_and_due_date_is_after_the_current_date')</td>
-					</tr>
-					<tr>
-						<td id='colorRedTD'><script>byId('colorRedTD').style.backgroundColor = COLOR_RED;</script></td>
-						<td>$i18n.getString('the_stage_is_not_started_and_due_date_is_before_the_current_date')</td>
-					</tr>
-				</table>
-			</div>
-		</td>
-	</tr>
 </table>
 
-
+<p>
+#parse( "/dhis-web-caseentry/colorHelp.vm" )
+</p>
+			
 <div class="actions">	
 	<input type="button" class='button' id="newEncounterBtn" value="$i18n.getString('create_new_event')" onClick="javascript: registerIrregularEncounter( getFieldValue('executionDate') );" disabled="disabled" >
 	<input type="button" class='button' id="validationBtn" value="$i18n.getString('run_validation')" onClick="javascript: runValidation();" disabled="disabled" >
@@ -81,7 +50,7 @@
 </div>
 
 <div id='programInstanceDiv' class='hidden '>
-	<div id='programInstanceFlowDiv' style="width:500px;height:90px;overflow-x:auto;">
+	<div id='programInstanceFlowDiv' style="width:500px;height:115px;overflow-x:auto;">
 		<table>
 			<tr id='programStageIdTR'></tr>
 		</table>

=== 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	2012-07-25 09:24:59 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2012-07-28 13:37:33 +0000
@@ -411,3 +411,15 @@
 		enable('advancedSearchBtn');
 	}
 }
+
+function showColorHelp()
+{
+	jQuery('#colorHelpDiv').dialog({
+		title: i18n_color_quick_help,
+		maximize: true, 
+		closable: true,
+		modal:false,
+		width: 500,
+		height: 180
+	}).show('fast');
+}

=== 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	2012-07-27 03:53:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js	2012-07-28 13:37:33 +0000
@@ -891,18 +891,6 @@
 		});
 }
 
-function showColorHelp()
-{
-	jQuery('#colorHelpDiv').dialog({
-		title: i18n_color_quick_help,
-		maximize: true, 
-		closable: true,
-		modal:false,
-		width: 500,
-		height: 180
-	}).show('fast');
-}
-
 function disableCompletedButton( disabled )
 {
 	if(disabled){

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/multiDataEntry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/multiDataEntry.js	2012-07-09 09:02:42 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/multiDataEntry.js	2012-07-28 13:37:33 +0000
@@ -28,6 +28,7 @@
 		function()
 		{
 			hideById('programDiv');
+			showById('colorHelpLink');
 			
 			setFieldValue('programId', programId);
 			setInnerHTML('programName', programName);
@@ -46,6 +47,7 @@
 	hideById('btnBack');
 	hideById('programName');
 	showById('programDiv');
+	hideById('colorHelpLink');
 }
 function viewPrgramStageRecords( programStageInstanceId ) 
 {

=== 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	2012-07-26 06:12:27 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm	2012-07-28 13:37:33 +0000
@@ -10,6 +10,7 @@
 #parse( "dhis-web-commons/loader/loader.vm" )
 
 <input type='hidden' id='orgunitId' value='$organisationUnit.id'>
+<p>#parse( "/dhis-web-caseentry/colorHelp.vm" )</p>
 <div id='listPatient'></div>
 
 <script>
@@ -37,4 +38,5 @@
 	var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ), "'")';
 	var i18n_show_all_items = '$encoder.jsEscape( $i18n.getString( "show_all_items" ) , "'")';
 	var i18n_program_stage = '$encoder.jsEscape( $i18n.getString( "program_stage" ) , "'")';
+	var i18n_color_quick_help = '$encoder.jsEscape( $i18n.getString( "color_quick_help" ) , "'")';
 </script>