← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6863: CCEM work in progress

 

------------------------------------------------------------
revno: 6863
committer: Mithilesh Kumar Thakur<mithilesh.hisp@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-05-05 16:46:25 +0530
message:
  CCEM work in progress
modified:
  local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/action/GetEquipmentInstanceListAction.java
  local/in/dhis-web-coldchain/src/main/resources/org/hisp/dhis/coldchain/i18n_module.properties
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/addCatalogForm.vm
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/equipmentInstanceList.vm
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/equipmentStatusForm.vm
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/javascript/equipment.js
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/selectEquipment.vm
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/showAddCatalogForm.vm
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/showEquipmentData.vm
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/updateCatalogForm.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 'local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/action/GetEquipmentInstanceListAction.java'
--- local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/action/GetEquipmentInstanceListAction.java	2012-05-02 09:18:42 +0000
+++ local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/action/GetEquipmentInstanceListAction.java	2012-05-05 11:16:25 +0000
@@ -144,7 +144,7 @@
     // -------------------------------------------------------------------------
     public String execute() throws Exception
     {
-        System.out.println("insde GetEquipmentInstanceListAction");
+        //System.out.println("insde GetEquipmentInstanceListAction");
         
         equipmentDetailsMap = new HashMap<String, String>();
         

=== modified file 'local/in/dhis-web-coldchain/src/main/resources/org/hisp/dhis/coldchain/i18n_module.properties'
--- local/in/dhis-web-coldchain/src/main/resources/org/hisp/dhis/coldchain/i18n_module.properties	2012-05-04 09:05:30 +0000
+++ local/in/dhis-web-coldchain/src/main/resources/org/hisp/dhis/coldchain/i18n_module.properties	2012-05-05 11:16:25 +0000
@@ -4,6 +4,7 @@
 coldchain_catalog_type_attribute_management = Catalogtype attribute management
 filter_by_name = Filter by name
 catalogType_attribute = Catalogtype attribute
+catalogType_details = Catalogtype details
 create_new_catalog_type_attribute = Create new catalogtype attribute
 catalog_type_attribute_details = Catalogtype attribute details
 mandatory = Mandatory
@@ -83,7 +84,7 @@
 status = Status
 working = Working
 notworking = Not working
-repair = Repair
+under_repair = Under repair
 add_new_equipment = Add new equipment
 update_equipment = Update equipment
 edit_equipment = Edit equipment
@@ -93,4 +94,6 @@
 equipment_status_history = Equipment status history
 reporting_date = Reporting date
 updation_date = Date of updation
-stored_by = Stored by
\ No newline at end of file
+stored_by = Stored by
+confirm_delete_equipment = Are you sure you want to delete equipment?
+equipment_details = Equipment details
\ No newline at end of file

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/addCatalogForm.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/addCatalogForm.vm	2012-05-04 09:05:30 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/addCatalogForm.vm	2012-05-05 11:16:25 +0000
@@ -6,7 +6,7 @@
 <form id="catalogForm" name="catalogForm" action="addCatalog.action" method="post" >
 
 <table>
-	<tr>
+	<!--<tr>
 		<td><label>$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
 		<td><input type="text" id="name" name="name" class="{validate:{required:true, rangelength:[4,160]}}"/></td>
 	</tr>	
@@ -14,7 +14,7 @@
 	<tr>
 		<td><label>$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
 		<td><input type="text" id="description" name="description" class="{validate:{required:true, minlength:4}}"/></td>
-	</tr>
+	</tr>-->
 	<tr>
 		
 		<td><label>$i18n.getString( "catalogType" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/equipmentInstanceList.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/equipmentInstanceList.vm	2012-05-03 11:07:19 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/equipmentInstanceList.vm	2012-05-05 11:16:25 +0000
@@ -26,8 +26,10 @@
     <td>    
       <table class="listTable" id="equipmentList" width='100%'>
       	<col width="30"/>
+      	#set($equipmetnInstanceName = "" )
           #foreach( $inventoryTypeAttribute in $inventoryTypeAttributeList )
 			<col/>
+			#set( $equipmetnInstanceName = $equipmetnInstanceName + " - " + $inventoryTypeAttribute.name )
 		  #end
           <col width="200"/>    
           
@@ -54,16 +56,16 @@
                 
 				 #foreach( $inventoryTypeAttribute in $inventoryTypeAttributeList )
 					#set( $mapId = $equipmentInstance.id + ':' + $inventoryTypeAttribute.id )
+					##set( $equipmetnInstanceName = '' + $inventoryTypeAttribute.name )
                     <td>$!equipmentDetailsMap.get( $mapId )</td>
                   #end
-                
                 <td>
                   <a href="javascript:showUpdateEquipmentForm( '$equipmentInstance.id' )" title='$i18n.getString( "edit_equipment" )'><img src="../images/edit.png" alt='$i18n.getString( "edit_equipment" )'></a>
                   #if( $inventoryType.tracking )
 					<a href="javascript:showEquipmentStatusForm( '$equipmentInstance.id' ); " title='$i18n.getString( "equipment_tracking" )'><img src="../icons/dataentry.png" alt='$i18n.getString( "equipment_tracking" )' style='width:25px; height:25px'></a>
                     <a href="javascript:showEquipmentStatusHistoryForm( '$equipmentInstance.id' ); " title='$i18n.getString( "equipment_tracking_history" )'><img src="../icons/dataentry.png" alt='$i18n.getString( "equipment_tracking_history" )' style='width:25px; height:25px'></a>
 				  #end
-                  <a href="javascript:removeEquipment( '$equipmentInstance.id', '$encoder.jsEncode( $equipmentInstance.id )' )" title='$i18n.getString( "remove" )'><img src="../images/delete.png" alt='$i18n.getString( "remove" )'></a>
+                  <a href="javascript:removeEquipment( '$equipmentInstance.id', '$equipmetnInstanceName')" title='$i18n.getString( "remove" )'><img src="../images/delete.png" alt='$i18n.getString( "remove" )'></a>
                   <a href="javascript:showEquipmentDetails( '$equipmentInstance.id' )" title='$i18n.getString( "equipment_details" )'><img src="../images/information.png" alt='$i18n.getString( "equipment_details" )'></a>
                 </td>
                 

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/equipmentStatusForm.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/equipmentStatusForm.vm	2012-05-03 11:07:19 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/equipmentStatusForm.vm	2012-05-05 11:16:25 +0000
@@ -50,7 +50,7 @@
 					<option value="" >[$i18n.getString( "please_select" )]</option>
                     <option value="WORKING">$i18n.getString( "working" )</option>
                     <option value="NOTWORKING" >$i18n.getString( "notworking" )</option>
-					<option value="REPAIR" >$i18n.getString( "repair" )</option>					
+					<option value="UNDERREPAIR" >$i18n.getString( "under_repair" )</option>					
 				</select>
 			</td>
         </tr>

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/javascript/equipment.js'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/javascript/equipment.js	2012-05-04 07:42:28 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/javascript/equipment.js	2012-05-05 11:16:25 +0000
@@ -139,7 +139,8 @@
 	
 	if( inventoryTypeId == 0 )
 	{	
-		alert("Plese select Inventorytype");
+		//alert("Plese select Inventorytype");
+		showWarningMessage( i18n_select_inventorytype );
 		return;
 	}
 	
@@ -248,7 +249,8 @@
 	var inventoryTypeId = inventoryType.options[ inventoryType.selectedIndex ].value;
 	if( inventoryTypeId == 0 )
 	{	
-		alert("Plese select inventorytype");
+		//alert("Plese select inventorytype");
+		showWarningMessage( i18n_select_inventorytype );
 		return;
 	}
 
@@ -361,7 +363,7 @@
 			
 		});
 	
-	alert( params );
+	//alert( params );
 	
 	return params;
 }
@@ -372,14 +374,14 @@
 function showEquipmentDetails( equipmentInstanceId )
 {
 	hideById('editEquipmentStatusDiv');
-	hideById('selectDiv');
-	hideById('searchEquipmentDiv');
+	//hideById('selectDiv');
+	//hideById('searchEquipmentDiv');
 	
 	setInnerHTML('editEquipmentDiv', '');
 	
 	jQuery('#equipmentStatusHistoryDiv').dialog('destroy').remove();
 	jQuery('<div id="equipmentStatusHistoryDiv">' ).load( 'showEquipmentInstanceDetails.action?equipmentInstanceId='+equipmentInstanceId ).dialog({
-		title: 'i18n_equipment_details',
+		title: i18n_equipment_details,
 		maximize: true, 
 		closable: true,
 		modal:true,

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/selectEquipment.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/selectEquipment.vm	2012-05-03 11:07:19 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/selectEquipment.vm	2012-05-05 11:16:25 +0000
@@ -61,6 +61,7 @@
 
 <script>
 	var i18n_equipment_status_history = '$encoder.jsEscape( $i18n.getString( "equipment_status_history" ) , "'")';
+	var i18n_equipment_details = '$encoder.jsEscape( $i18n.getString( "equipment_details" ) , "'")';
     var i18n_select_inventorytype = '$encoder.jsEscape( $i18n.getString( "select_inventorytype" ) , "'")';
     var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ) , "'")';
     var i18n_can_not_register_patient_for_orgunit = '$encoder.jsEscape( $i18n.getString( "can_not_register_patient_for_orgunit" ), "'")';   
@@ -72,7 +73,7 @@
     var i18n_enrol_success = '$encoder.jsEscape( $i18n.getString( "enrol_success" ) , "'")';
     var i18n_unenrol_success = '$encoder.jsEscape( $i18n.getString( "unenrol_success" ) , "'")';
     var i18n_list_patients_by_program = '$encoder.jsEscape( $i18n.getString( "list_patients_by_program" ) , "'" )';
-    var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_patient" ) , "'" )';
+    var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_equipment" ) , "'" )';
     var i18n_adding_patient_failed = '$encoder.jsEscape( $i18n.getString( "adding_patient_failed" ), "'")';
     var i18n_updating_patient_failed = '$encoder.jsEscape( $i18n.getString( "updating_patient_failed" ), "'")'; 
     var i18n_program_enrollment_failed = '$encoder.jsEscape( $i18n.getString( "program_enrollment_failed" ) , "'")';

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/showAddCatalogForm.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/showAddCatalogForm.vm	2012-04-30 11:24:11 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/showAddCatalogForm.vm	2012-05-05 11:16:25 +0000
@@ -11,7 +11,18 @@
 <table>
 <tr><td>&nbsp;</td></tr>
 #if ( $catalogTypeAttributes.size() > 0) 	
-	<tr><th colspan="2" class="heading-column">$i18n.getString( "catalogType_attribute" )</th></tr>
+	<tr><th colspan="2" class="heading-column">$i18n.getString( "catalogType_details" )</th></tr>
+	<tr>
+		<td><label>$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+		<td><input type="text" id="name" name="name" class="{validate:{required:true, rangelength:[4,160]}}"/></td>
+	</tr>	
+	
+	<tr>
+		<td><label>$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+		<td><input type="text" id="description" name="description" class="{validate:{required:true, minlength:4}}"/></td>
+	</tr>
+##if ( $catalogTypeAttributes.size() > 0) 	
+	<!--<tr><th colspan="2" class="heading-column">$i18n.getString( "catalogType_attribute" )</th></tr>-->
 	#foreach($attribute in $catalogTypeAttributes )
 		<tr>
 			<td class='text-column'><label>$attribute.name #if($attribute.mandatory)<em title="$i18n.getString( 'required' )" class="required">*</em> #end</label></td>

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/showEquipmentData.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/showEquipmentData.vm	2012-05-04 07:42:28 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/showEquipmentData.vm	2012-05-05 11:16:25 +0000
@@ -8,7 +8,7 @@
             <td>$equipmentInstance.organisationUnit.name</td>
         </tr>   
         <tr>
-            <td>$i18n.getString( "inventory_type" ) : </th>
+            <td>$i18n.getString( "inventorytype" ) : </th>
             <td>$equipmentInstance.inventoryType.name</th>
         </tr>
 

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/updateCatalogForm.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/updateCatalogForm.vm	2012-05-04 09:05:30 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/updateCatalogForm.vm	2012-05-05 11:16:25 +0000
@@ -18,7 +18,7 @@
 	<input type="hidden" id="catalogTypeID" name="id" value="$catalog.catalogType.id">
 </div>
 <table>
-	<tr>
+<!--<tr>
 		<th colspan="2" class="heading-column">$i18n.getString( "catalog__details" )</th>
 	</tr>
 	<tr>
@@ -29,7 +29,7 @@
 		<td class='text-column'><label for="description">$i18n.getString( "description" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
 		<td class="input-column" ><input type="text" id="description" name="description" value="$!catalog.description" class="{validate:{required:true, minlength:4}}"></td>
 	</tr>
-
+-->
 	<tr>
 		<td class='text-column'><label>$i18n.getString( "catalogType" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
         <td class="input-column" >
@@ -43,8 +43,17 @@
 	</tr>
 	<!-- ATTRIBUTES -->
 <tr><td>&nbsp;</td><td>&nbsp;</td></tr>
-	#if ( $catalogTypeAttributes.size() > 0) 	
-		<tr><th colspan="2" class="heading-column">$i18n.getString( "catalogType_attribute" )</th></tr>
+	<tr><th colspan="2" class="heading-column">$i18n.getString( "catalogType_details" )</th></tr>
+	#if ( $catalogTypeAttributes.size() > 0)
+	<tr>
+		<td class='text-column'><label for="name">$i18n.getString( "name" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+		<td class="input-column" ><input type="text" id="name" name="name" value="$!catalog.name" class="{validate:{required:true, rangelength:[4,50]}}"></td>
+	</tr>
+	<tr>
+		<td class='text-column'><label for="description">$i18n.getString( "description" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+		<td class="input-column" ><input type="text" id="description" name="description" value="$!catalog.description" class="{validate:{required:true, minlength:4}}"></td>
+	</tr>		
+		<!--<tr><th colspan="2" class="heading-column">$i18n.getString( "catalogType_details" )</th></tr>-->
 		#foreach($attribute in $catalogTypeAttributes )
 		#set( $attributeValue = "" )
 		#set( $attributeValue = $!catalogTypeAttributeValueMap.get( $attribute.id ) )