← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7280: Minor fix.

 

------------------------------------------------------------
revno: 7280
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-06-13 11:13:23 +0700
message:
  Minor fix.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientIdentifierType.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatientIdentifierType.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStageList.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.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-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2012-06-13 03:59:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2012-06-13 04:13:23 +0000
@@ -245,4 +245,5 @@
 report_date = Report date
 program_stage_properties = Program stage properties
 allow_provided_elsewhere = Allow provided elsewhere
-save_success=Save successful
\ No newline at end of file
+save_success=Save successful
+sort_by_scheduled_days = Sort by scheduled days
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm	2012-05-24 03:51:44 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm	2012-06-13 04:13:23 +0000
@@ -53,7 +53,7 @@
 				<select id="type" name="type" class="{validate:{required:true}}">
 					<option value="text" selected="selected">$i18n.getString( "text" )</option>
 					<option value="number">$i18n.getString( "number" )</option>
-					<option value="letter">$i18n.getString( "letter" )</option>
+					<option value="letter">$i18n.getString( "letter_only" )</option>
 				</select>
 			</td>
 			<td></td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientIdentifierType.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientIdentifierType.js	2012-03-27 01:29:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientIdentifierType.js	2012-06-13 04:13:23 +0000
@@ -17,7 +17,7 @@
 			setInnerHTML( 'relatedField', boolValueMap[boolType] );
 			setInnerHTML( 'noCharsField', json.patientIdentifierType.noChars );
 			
-			var valueTypeMap = { 'text':i18n_string, 'number':i18n_number, 'letter':i18n_alphabet };
+			var valueTypeMap = { 'text':i18n_string, 'number':i18n_number, 'letter':i18n_letter_only };
 			var valueType = json.patientIdentifierType.type;
 			setInnerHTML( 'typeField', valueTypeMap[valueType] );
 			

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js	2012-06-05 07:04:35 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js	2012-06-13 04:13:23 +0000
@@ -18,20 +18,33 @@
 	}
 }
 
-function showSortProgramStage()
+function sortProgramStages()
 {
-	var programId = document.getElementById('id').value;
-	
+	var programId = getFieldValue('id');
 	if( programId == "null"  || programId == "" )
 	{
 		showWarningMessage( i18n_please_select_program );
 	}
 	else
 	{
-		window.location.href="showSortProgramStageForm.action?id=" + programId;
+		jQuery.getJSON( 'saveProgramStageSortOder.action', { id: programId }, 
+			function ( json ) {
+				showSuccessMessage( i18n_success );
+				loadProgramStageList( programId );
+			});
 	}
 }
 
+function loadProgramStageList( programId )
+{
+	jQuery('#programStageListDiv').load('programStageList.action',{
+			id: programId
+		},
+		function( html ){
+			setInnerHTML('programStageListDiv', html );
+		});
+}
+
 // -----------------------------------------------------------------------------
 // View details
 // -----------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatientIdentifierType.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatientIdentifierType.vm	2012-05-30 03:52:28 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatientIdentifierType.vm	2012-06-13 04:13:23 +0000
@@ -66,7 +66,7 @@
 	var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ), "'")';
 	var i18n_string = '$encoder.jsEscape( $i18n.getString( "string" ), "'")';
 	var i18n_number = '$encoder.jsEscape( $i18n.getString( "number" ), "'")';
-	var i18n_alphabet = '$encoder.jsEscape( $i18n.getString( "alphabet" ), "'")';
+	var i18n_letter_only = '$encoder.jsEscape( $i18n.getString( "letter_only" ), "'")';
 	var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ), "'")';
 	var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ), "'")';
 	var i18n_all = '$encoder.jsEscape( $i18n.getString( "all" ), "'")';

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStageList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStageList.vm	2012-05-30 03:52:28 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStageList.vm	2012-06-13 04:13:23 +0000
@@ -1,59 +1,44 @@
-<h3>$i18n.getString( "program_stage_management" ) $i18n.getString( "for" ) $program.name</h3>
-<h4></h4>
-
-<input type='hidden' id='id' name='id' value='$program.id'>
 <table class="mainPageTable">
-
-	<tr>
-		<td style="text-align:right">
-		    <input type="button" value="$i18n.getString( "back" )" onclick="window.location.href='program.action'" style="width:75px">
-			#if( $program.type=='1' )
-				<input type="button" value="$i18n.getString( "sort" )" onclick="javascript:showSortProgramStage()" style="width:75px">
-				<input type="button" value="$i18n.getString( "add_new" )" onclick="javascript:addProgramStage()" style="width:75px">		  	   
-		    #end
-		</td>
-	</tr>
 	<tr>
 		<td style="vertical-align:top" colspan=2>    
-		<table class="listTable" id="listTable">
-		  <col>
-		  <col>     
-		  <col width="120">	 
-		  <thead>
-			  <tr>            
-				<th>$i18n.getString( "name" )</th>
-				<th>$i18n.getString( "description" )</th>
-				<th>$i18n.getString( "operations" )</th>
-			  </tr>
-		  </thead>
+			<table class="listTable" id="listTable">
+				<col>
+				<col>     
+				<col width="120">	 
+				<thead>
+					<tr>            
+						<th>$i18n.getString( "name" )</th>
+						<th>$i18n.getString( "description" )</th>
+						<th>$i18n.getString( "operations" )</th>
+					</tr>
+				</thead>
 		  
-		  <tbody id="list">
-			#foreach( $association in $associations )
-			  <tr id="tr${association.id}">			  
-				<td onclick="showProgramStageDetails( $association.id )">$encoder.htmlEncode( $association.name )</td>                
-				<td onclick="showProgramStageDetails( $association.id )">$encoder.htmlEncode( $association.description )</td>
-				
-				<td style="text-align:center"#alternate( $mark )>
-				  <a href="showUpdateProgramStageForm.action?id=$association.id" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"></a>
-				  #if( $program.type=='1' )
-					<a href="javascript:removeItem( '$association.id', '$encoder.jsEncode( $association.name )', i18n_confirm_delete , 'removeProgramStage.action' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( "remove" )"></a>
-				  #end
-				  <a href="javascript:showProgramStageDetails( $association.id )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( "show_details" )"></a>
-				  <a href="viewDataEntryForm.action?programStageId=$association.id" title="$i18n.getString( "design_data_entry_form" )"><img src="../images/edit_layout.png" alt="$i18n.getString( "design_data_entry_form" )"></a>
-				</td>
-				
-			  </tr>
-			#end
-
-		  </tbody>
-
-		</table>
+				<tbody id="list">
+					#set( $mark = false )
+					#foreach( $association in $associations )
+						<tr id="tr${association.id}" #alternate( $mark )>			  
+							<td onclick="showProgramStageDetails( $association.id )">$encoder.htmlEncode( $association.name )</td>                
+							<td onclick="showProgramStageDetails( $association.id )">$encoder.htmlEncode( $association.description )</td>
+							
+							<td style="text-align:center"#alternate( $mark )>
+							  <a href="showUpdateProgramStageForm.action?id=$association.id" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"></a>
+							  #if( $program.type=='1' )
+								<a href="javascript:removeItem( '$association.id', '$encoder.jsEncode( $association.name )', i18n_confirm_delete , 'removeProgramStage.action' )" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"></a>
+							  #end
+							  <a href="javascript:showProgramStageDetails( $association.id )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( 'show_details' )"></a>
+							  <a href="viewDataEntryForm.action?programStageId=$association.id" title="$i18n.getString( "design_data_entry_form" )"><img src="../images/edit_layout.png" alt="$i18n.getString( 'design_data_entry_form' )"></a>
+							</td>
+						</tr>
+						#set( $mark = !$mark )
+					#end
+				</tbody>
+			</table>
 		</td>
+		
 		<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 class="bold">$i18n.getString( "name" ):</label><br><span id="nameField"></span></p>
 				<p><label class="bold">$i18n.getString( "description" ):</label><br><span id="descriptionField"></span></p>				
@@ -63,18 +48,6 @@
 				<p><label class="bold">$i18n.getString( "standard_interval_days" ):</label><br><span id="standardIntervalField"></span></p>
 				<p><label class="bold">$i18n.getString( "no_of_dataelements" ):</label><br><span id="dataElementCountField"></span></p>			  		
 			</div>
-
 		</td>
 	</tr>
 </table>
-
-<script type="text/javascript">
-    var i18n_please_select_program = '$encoder.jsEscape( $i18n.getString( "please_select_program" ) , "'" )';
-	var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_prorgam_stage" ) , "'" )';
-	var i18n_adding_program_stage_failed = '$encoder.jsEscape( $i18n.getString( "adding_program_stage_failed" ), "'")';
-	var i18n_updating_program_stage_failed = '$encoder.jsEscape( $i18n.getString( "updating_program_stage_failed" ), "'")';	
-	var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ), "'")';
-	var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ), "'")';
-	var i18n_no= '$encoder.jsEscape( $i18n.getString( "no" ), "'")';
-	
-</script>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm	2012-05-24 03:51:44 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm	2012-06-13 04:13:23 +0000
@@ -54,7 +54,7 @@
 				<select id="type" name="type" class="{validate:{required:true}}">
 					<option value="text" #if( $patientIdentifierType.type=='text' ) selected="selected" #end>$i18n.getString( "text" )</option>
 					<option value="number" #if( $patientIdentifierType.type=='number' ) selected="selected" #end>$i18n.getString( "number" )</option>
-					<option value="letter" #if( $patientIdentifierType.type=='letter' ) selected="selected" #end>$i18n.getString( "letter" )</option>
+					<option value="letter" #if( $patientIdentifierType.type=='letter' ) selected="selected" #end>$i18n.getString( "letter_only" )</option>
 				</select>
 			</td>		
 			<td></td>