← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7857: local/in Bug fixed in CCEM

 

------------------------------------------------------------
revno: 7857
committer: Mithilesh Kumar Thakur<mithilesh.hisp@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-08-03 16:40:18 +0530
message:
  local/in Bug fixed in CCEM
modified:
  local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/action/UploadCatalogImageAction.java
  local/in/dhis-web-coldchain/src/main/resources/struts.xml
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/addCatalogTypeForm.vm
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/catalogTypeList.vm
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/catalog_List.vm
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/coldChainCatalogTypeAttribute.vm
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/css/style.css
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/equipmentDataEntry.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/inventoryTypeAttributeList.vm
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/inventoryTypeList.vm
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/javascript/catalog.js
  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/responseUplodImageStatus.vm
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/selectCatalog.vm
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/selectEquipment.vm
  local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/uploadCatalogImageForm.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/catalog/action/UploadCatalogImageAction.java'
--- local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/action/UploadCatalogImageAction.java	2012-05-30 10:46:26 +0000
+++ local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/action/UploadCatalogImageAction.java	2012-08-03 11:10:18 +0000
@@ -1,10 +1,7 @@
 package org.hisp.dhis.coldchain.catalog.action;
 
 import java.io.File;
-import java.io.FileInputStream;
-import java.sql.Blob;
 
-import org.hibernate.Hibernate;
 import org.hisp.dhis.coldchain.catalog.Catalog;
 import org.hisp.dhis.coldchain.catalog.CatalogService;
 import org.hisp.dhis.system.util.StreamUtils;
@@ -160,18 +157,15 @@
         
         Catalog catalog = catalogService.getCatalog( catalogID );
         
-        
         //File directory = null;
         
         String fileType = fileName.substring(fileName.indexOf( '.' )+1, fileName.length());
         
-        
         System.out.println( "File Name is : " + fileName +" File Type is : " +  fileType );
         
         System.out.println( "UPLOAD is  : " + upload );
         
         
-        
         if ( ! ( fileType.equalsIgnoreCase( "jpg" ) || fileType.equalsIgnoreCase( "png" ) || fileType.equalsIgnoreCase( "gif" ) ||  fileType.equalsIgnoreCase( "jpeg" ) ||  fileType.equalsIgnoreCase( "tiff" ) || fileType.equalsIgnoreCase( "bmp" ) ) )
         //if ( !fileType.equalsIgnoreCase( "jpg" ) || !fileType.equalsIgnoreCase( "png" ) || !fileType.equalsIgnoreCase( "gif" ) || !fileType.equalsIgnoreCase( "bmp" ) )
         {

=== modified file 'local/in/dhis-web-coldchain/src/main/resources/struts.xml'
--- local/in/dhis-web-coldchain/src/main/resources/struts.xml	2012-08-01 12:21:34 +0000
+++ local/in/dhis-web-coldchain/src/main/resources/struts.xml	2012-08-03 11:10:18 +0000
@@ -508,7 +508,7 @@
 	
         <action name="showEquipmentDataEntryForm"
             class="org.hisp.dhis.coldchain.equipment.action.ShowEquipmentDataEntryFormAction">
-            <result name="success" type="velocity">/main.vm</result>
+            <result name="success" type="velocity">/content.vm</result>
             <param name="page">/dhis-web-coldchain/equipmentDataEntry.vm</param>
             <param name="menu">/dhis-web-coldchain/menu.vm</param>
 			<param name="stylesheets">css/equipmentDataentry.css</param>
@@ -551,6 +551,7 @@
 		<result name="success" type="velocity">/main.vm</result>
 		<param name="menu">/dhis-web-coldchain/menu.vm</param>
 		<param name="page">/dhis-web-coldchain/responseUplodImageStatus.vm</param>
+		<!--<result name="success" type="redirect">catalog.action</result>-->
 		<interceptor-ref name="fileUploadStack" />
 	</action>				
 	

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/addCatalogTypeForm.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/addCatalogTypeForm.vm	2012-05-02 06:03:10 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/addCatalogTypeForm.vm	2012-08-03 11:10:18 +0000
@@ -20,7 +20,7 @@
 
 <table id="catalogTypeMembersArea">    
     <thead>
-      <tr>        
+      <tr>
         <th>$i18n.getString( "available_catalogType_attribute" )</th>
         <th>$i18n.getString( "filter" )</th>
         <th>$i18n.getString( "selected_catalogType_attribute" )							
@@ -37,15 +37,15 @@
         </td>
         <td>         
             <input type="button" value="&gt;" onclick="selectCatalogTypeAttributes()" class='filterButton' /><br/>    
-            <input type="button" value="&lt;" onclick="unselectCatalogTypeAttributes()" class='filterButton' /><br/><br/>                    
+            <input type="button" value="&lt;" onclick="unselectCatalogTypeAttributes()" class='filterButton' /><br/><br/>
+        </td>                      
         <td>
-			<div class="catalogTypeAttributeDiv">
+			<div class="catalogTypeAttributeDiv"><br/>
 				<table>
-					<thead>
+					<!--<thead>
 						<tr>
 							<th>$i18n.getString( "catalogType_attributes" )</th>
-							
-					</thead>
+					</thead>-->
 					<tbody id="selectedList"></tbody>
 				</table>
 			</div>

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/catalogTypeList.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/catalogTypeList.vm	2012-08-01 12:21:34 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/catalogTypeList.vm	2012-08-03 11:10:18 +0000
@@ -17,7 +17,7 @@
 			<tr>
 				<td>#filterDiv( "catalogType" )</td>
 				<!--<td>$i18n.getString( "filter_by_name" ): <input type="text" onkeyup="filterValues( this.value , 1)" style="width:250px"/></td>-->
-				<td colspan="9" style="text-align:right">
+				<td colspan="9" style="text-align:right"><br/>
 					<input type="button" value="$i18n.getString( 'add_new' )" onclick="window.location.href='addCatalogTypeForm.action'" style="width:80px"/></a>
 				</td>
 			</tr>

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/catalog_List.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/catalog_List.vm	2012-06-26 08:38:56 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/catalog_List.vm	2012-08-03 11:10:18 +0000
@@ -84,4 +84,5 @@
     });
     var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_catalog" ) , "'" )';
 	var i18n_catalog_details = '$encoder.jsEscape( $i18n.getString( "catalog__details" ) , "'" )';
+	var i18n_upload_catalog_image = '$encoder.jsEscape( $i18n.getString( "upload_catalog_image" ) , "'" )';
 </script>

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/coldChainCatalogTypeAttribute.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/coldChainCatalogTypeAttribute.vm	2012-05-09 07:02:15 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/coldChainCatalogTypeAttribute.vm	2012-08-03 11:10:18 +0000
@@ -13,7 +13,7 @@
 				<td>#filterDiv( "coldChainCatalogTypeAttribute" )
 					<!--$i18n.getString( "filter_by_name" ): <input type="text" onkeyup="filterValues( this.value , 1)" style="width:250px"/>-->
 				</td>
-				<td colspan="3" style="text-align:right"><input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddColdChainCatalogTypeAttributeForm.action'" style="width:70px"></td>
+				<td colspan="3" style="text-align:right"><br/><input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddColdChainCatalogTypeAttributeForm.action'" style="width:70px"></td>
 			</tr>
 		</table>
 		

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/css/style.css'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/css/style.css	2012-04-25 05:52:37 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/css/style.css	2012-08-03 11:10:18 +0000
@@ -97,5 +97,5 @@
 }
 .catalogTypeAttributeDiv table
 {
-	width:100%;
+	size:15em;
 }
\ No newline at end of file

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/equipmentDataEntry.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/equipmentDataEntry.vm	2012-08-01 12:21:34 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/equipmentDataEntry.vm	2012-08-03 11:10:18 +0000
@@ -3,6 +3,27 @@
 	
 	var i18n_select_period = '$encoder.jsEscape( $i18n.getString( "select_period" ) , "'")';
 </script>
+<script>
+    
+	jQuery(document).ready( function(){
+	currentDiv = 'dataEntryForm';
+	isSubmit = true;
+    jQuery("#dataEntryForm").validate({
+		meta:"validate"
+		,errorElement:"span"
+		,submitHandler: function(form)
+		{
+        	if( isSubmit ) 
+            {
+            	editEquipmentDataEntryForm();
+            }
+		}
+    	});
+    }); 
+    
+</script>
+
+
 
 <h3>$i18n.getString( "equipment_dataentry" ) #openHelp( "equipmentDataEntry" )</h3>
 <!--
@@ -18,7 +39,8 @@
 	<br>
 #end
 -->
-<form id="dataEntryForm" name="dataEntryForm" action="saveDataEntryForm.action" method="post" >
+<!--<form id="dataEntryForm" name="dataEntryForm" action="saveDataEntryForm.action" method="post" >-->
+<form id="dataEntryForm" name="dataEntryForm" method="post" >	
 <div>
 	<input type="hidden" id="organisationUnitId" name="organisationUnitId" value="$organisationUnit.id">
 	<input type="hidden" id="inventoryTypeId" name="inventoryTypeId" value="$inventoryType.name">

=== 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-08-01 12:21:34 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/equipmentStatusForm.vm	2012-08-03 11:10:18 +0000
@@ -48,9 +48,9 @@
             <td>
 				<select id="status" name="status" class="{validate:{required:true}}">
 					<option value="" >[$i18n.getString( "please_select" )]</option>
+					<option value="NOTWORKING" >$i18n.getString( "notworking" )</option>
+					<option value="UNDERREPAIR" >$i18n.getString( "under_repair" )</option>
                     <option value="WORKING">$i18n.getString( "working" )</option>
-                    <option value="NOTWORKING" >$i18n.getString( "notworking" )</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/inventoryTypeAttributeList.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/inventoryTypeAttributeList.vm	2012-05-09 07:02:15 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/inventoryTypeAttributeList.vm	2012-08-03 11:10:18 +0000
@@ -16,7 +16,7 @@
                     $i18n.getString( "filter_by_name" ): <input type="text" onkeyup="filterValues( this.value , 1)" style="width:250px"/>
                 </td>-->
                 <td>#filterDiv( "inventoryTypeAttributeList" )</td>
-                <td colspan="3" style="text-align:right"><input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddInventoryTypeAttributeForm.action'" style="width:70px"></td>
+                <td colspan="3" style="text-align:right"><br/><input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddInventoryTypeAttributeForm.action'" style="width:70px"></td>
             </tr>
         </table>
             

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/inventoryTypeList.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/inventoryTypeList.vm	2012-05-17 07:33:28 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/inventoryTypeList.vm	2012-08-03 11:10:18 +0000
@@ -16,7 +16,7 @@
                     $i18n.getString( "filter_by_name" ): <input type="text" onkeyup="filterValues( this.value , 1)" style="width:250px"/>
                 </td>-->
                 <td>#filterDiv( "inventoryTypeList" )</td>
-                <td colspan="3" style="text-align:right"><input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddInventoryTypeForm.action'" style="width:70px"></td>
+                <td colspan="3" style="text-align:right"><br/><input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddInventoryTypeForm.action'" style="width:70px"></td>
             </tr>
         </table>
             

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/javascript/catalog.js'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/javascript/catalog.js	2012-08-01 12:21:34 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/javascript/catalog.js	2012-08-03 11:10:18 +0000
@@ -278,8 +278,12 @@
 // ----------------------------------------------------------------
 // On CatalogTypeChange  - Loading CatalogType Attributes
 // ----------------------------------------------------------------
-function getCatalogTypeChange( catalogTypeId )
+//function getCatalogTypeChange( catalogTypeId )
+function getCatalogTypeChange()
 {
+	
+	var catalogTypeId = $( '#catalogType' ).val();
+	
 	if( catalogTypeId == "0" )
 		return;
 	
@@ -365,7 +369,6 @@
 	hideLoader();
 }
 
-
 //----------------------------------------------------------------
 //Load Equipments On Filter by catalogType Attribute
 //----------------------------------------------------------------
@@ -494,6 +497,47 @@
      });
 }
 
+/*
+function showUploadCatalogImageForm( catalogId )
+{
+	setInnerHTML('uploadCatalogImageDiv', '');
+	jQuery('#uploadCatalogImageDiv').dialog('destroy').remove();
+	jQuery('<div id="uploadCatalogImageDiv">' ).load( 'showUploadImageForm.action?id='+catalogId ).dialog({
+		title: i18n_upload_catalog_image,
+		maximize: true,
+		closable: true,
+		modal:true,
+		overlay:{background:'#000000', opacity:0.1},
+		width: 800,
+		height: 450
+	});
+	
+}
+*/
+function upLoadImage()
+{
+	
+		$( '#imageSaveDiv' ).html( ' ' );
+		
+		var catalogID = $( '#catalogID' ).val();
+		//var sDateLB = $( '#sDateLB' ).val();
+		//var eDateLB = $( '#eDateLB' ).val();
+		
+		//jQuery('#loaderDiv').show();
+		//document.getElementById( "aggregate" ).disabled = true;
+		
+		jQuery('#imageSaveDiv').load('uploadCatalogImage.action',
+			{
+				catalogID:catalogID,
+				enctype:"multipart/form-data"
+				//eDateLB:eDateLB
+			}, function()
+			{
+				showById('imageSaveDiv');
+				//document.getElementById( "aggregate" ).disabled = false;
+				//jQuery('#loaderDiv').hide();
+			});	
+}	
 
 function showUploadCatalogImageForm( catalogId )
 {
@@ -517,7 +561,7 @@
 		
 	jQuery('#resultSearchDiv').dialog('close');
 }
-
+/*
 function uploadCatalogImage()
 {
 	$.ajax({
@@ -530,7 +574,7 @@
       }
      });
 }
-
+*/
 
 
 //----------------------------------------------------------------

=== 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-06-27 06:56:57 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/javascript/equipment.js	2012-08-03 11:10:18 +0000
@@ -38,8 +38,10 @@
 // ----------------------------------------------------------------
 // On InventoryType Change - Loading InventoryTypeAttributes
 // ----------------------------------------------------------------
-function inventoryTypeChange( inventoryTypeId )
+//function inventoryTypeChange( inventoryTypeId )
+function inventoryTypeChange()
 {
+	var inventoryTypeId = $( '#inventoryType' ).val();
 	if( inventoryTypeId == "0" )
 		return;
 	
@@ -106,6 +108,7 @@
     hideById('editEquipmentDiv');
 	hideById('resultSearchDiv');
 	hideById('editEquipmentStatusDiv');
+	hideById('equipmentDataEntryDiv');
 	
 	showById('selectDiv');
 	showById('searchEquipmentDiv');
@@ -150,8 +153,10 @@
 	hideById('editEquipmentDiv');
 	hideById('resultSearchDiv');
 	hideById('editEquipmentStatusDiv');
+	hideById('equipmentDataEntryDiv');
 	showById('selectDiv');
 	showById('searchEquipmentDiv');
+	
 
 	jQuery('#loaderDiv').show();
 	contentDiv = 'listEquipmentDiv';
@@ -178,18 +183,18 @@
 function showEquipmentStatusHistoryForm( equipmentInstanceId )
 {
 	//hideById('listEquipmentDiv');
-	hideById('editEquipmentStatusDiv');
+	//hideById('editEquipmentStatusDiv');
 	//hideById('selectDiv');
 	//hideById('searchEquipmentDiv');
 	
-	setInnerHTML('editEquipmentDiv', '');
+	setInnerHTML('equipmentStatusHistoryDiv', '');
 	
 	//jQuery('#loaderDiv').show();
 	
 	jQuery('#equipmentStatusHistoryDiv').dialog('destroy').remove();
 	jQuery('<div id="equipmentStatusHistoryDiv">' ).load( 'showEquipmentStatusHistoryForm.action?equipmentInstanceId='+equipmentInstanceId ).dialog({
 		title: i18n_equipment_status_history,
-		maximize: true, 
+		maximize: true,
 		closable: true,
 		modal:true,
 		overlay:{background:'#000000', opacity:0.1},
@@ -199,7 +204,6 @@
 	
 }
 
-
 //----------------------------------------------------------------
 //Show Equipment Tracking Form
 //----------------------------------------------------------------
@@ -210,8 +214,10 @@
 	hideById('editEquipmentStatusDiv');
 	hideById('selectDiv');
 	hideById('searchEquipmentDiv');
+	hideById('equipmentDataEntryDiv');
+	hideById('editEquipmentDiv');
 	
-	setInnerHTML('editEquipmentDiv', '');
+	setInnerHTML('editEquipmentStatusDiv', '');
 	
 	jQuery('#loaderDiv').show();
 	jQuery('#editEquipmentStatusDiv').load('showEquipmentStatusForm.action',
@@ -260,6 +266,9 @@
 	hideById('selectDiv');
 	hideById('searchEquipmentDiv');
 	hideById('editEquipmentStatusDiv');
+	hideById('equipmentDataEntryDiv');
+	setInnerHTML('editEquipmentDiv', '');
+	
 	
 	jQuery('#loaderDiv').show();
 	jQuery('#editEquipmentDiv').load('showAddEquipmentForm.action',{
@@ -298,6 +307,7 @@
 	hideById('selectDiv');
 	hideById('searchEquipmentDiv');
 	hideById('editEquipmentStatusDiv');
+	hideById('equipmentDataEntryDiv');
 	
 	setInnerHTML('editEquipmentDiv', '');
 	
@@ -327,6 +337,46 @@
      });
 }
 
+function showEquipmentDataEntryForm( equipmentInstanceId )
+{
+	hideById('listEquipmentDiv');
+	hideById('selectDiv');
+	hideById('searchEquipmentDiv');
+	hideById('editEquipmentStatusDiv');
+	hideById('editEquipmentDiv');
+	hideById('equipmentDataEntryDiv');
+	
+	setInnerHTML('equipmentDataEntryDiv', '');
+	
+	//jQuery('#loaderDiv').show();
+	jQuery('#equipmentDataEntryDiv').load('showEquipmentDataEntryForm.action',
+		{
+			equipmentInstanceId:equipmentInstanceId
+		}, function()
+		{
+			showById('equipmentDataEntryDiv');
+			jQuery('#searchEquipmentDiv').dialog('close');
+			//jQuery('#loaderDiv').hide();
+		});
+		
+	jQuery('#resultSearchDiv').dialog('close');
+	
+	//window.location.href = "showEquipmentDataEntryForm.action?equipmentInstanceId=" + equipmentInstanceId;
+	
+}
+
+function editEquipmentDataEntryForm()
+{
+	$.ajax({
+      type: "POST",
+      url: 'saveDataEntryForm.action',
+      data: getParamsForDiv('equipmentDataEntryDiv'),
+      success: function( json ) {
+		loadAllEquipments();
+      }
+     });
+}
+
 //-----------------------------------------------------------------------------
 //Remove equipment
 //-----------------------------------------------------------------------------
@@ -441,7 +491,7 @@
 //------------------------------------------------------------------------------
 //Update Equipment Data
 //------------------------------------------------------------------------------
-
+/*
 function showEquipmentDataEntryForm( equipmentInstanceId )
 {
 	
@@ -463,9 +513,9 @@
 		});
 		
 	jQuery('#resultSearchDiv').dialog('close');
-	*/
+	
 }
-
+*/
 function updateEquipmentDataEntry()
 {
 	$.ajax({

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/responseUplodImageStatus.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/responseUplodImageStatus.vm	2012-08-01 12:21:34 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/responseUplodImageStatus.vm	2012-08-03 11:10:18 +0000
@@ -3,6 +3,6 @@
 
 <br/><br/>
 
-<!--<input type="button" value="$i18n.getString( 'back' )" onclick="window.location.href='catalog.action'" />-->
+<input type="button" value="$i18n.getString( 'back' )" onclick="window.location.href='catalog.action'" />
 
-<input type="button" value="$i18n.getString( 'back' )" onclick="loadAllCatalogs();"/>
+<!--<input type="button" value="$i18n.getString( 'back' )" onclick="loadAllCatalogs();"/>-->

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/selectCatalog.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/selectCatalog.vm	2012-06-27 06:56:57 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/selectCatalog.vm	2012-08-03 11:10:18 +0000
@@ -6,8 +6,9 @@
 		<tr>
 			<td><label>$i18n.getString( "catalogType" )</label></td>
 			<td style="padding-right:5px">
-				<select id="catalogType" style="min-width:16em" onchange="getCatalogTypeChange( this.value )">
-					<option value="0">$i18n.getString( "please_select_catalog_type" )</option>
+				<!--<select id="catalogType" style="min-width:16em" onchange="getCatalogTypeChange( this.value )">-->
+				<select id="catalogType" style="min-width:16em" onchange="getCatalogTypeChange()">	
+					<!--<option value="0">$i18n.getString( "please_select_catalog_type" )</option>-->
 					#foreach( $catalogType in $catalogTypes )
 						<option value="$catalogType.id">$catalogType.name</option>
 					#end
@@ -53,4 +54,11 @@
 	var i18n_equipment_details = '$encoder.jsEscape( $i18n.getString( "equipment_details" ) , "'")';
     var i18n_select_please_select_catalog_type = '$encoder.jsEscape( $i18n.getString( "please_select_catalog_type" ) , "'")';
 </script>
+<script type="text/javascript">
+jQuery( document ).ready( function()
+{
+	getCatalogTypeChange();
+	loadAllCatalogs();
+});
+</script>
 

=== 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-17 09:53:19 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/selectEquipment.vm	2012-08-03 11:10:18 +0000
@@ -15,8 +15,9 @@
 		<tr>
 			<td><label>$i18n.getString( "inventorytype" )</label></td>
 			<td style="padding-right:5px">
-				<select id="inventoryType" style="min-width:16em" onchange="inventoryTypeChange( this.value )">
-					<option value="0">$i18n.getString( "select_inventorytype" )</option>
+				<!--<select id="inventoryType" style="min-width:16em" onchange="inventoryTypeChange( this.value )">-->
+				<select id="inventoryType" style="min-width:16em" onchange="inventoryTypeChange()">
+					<!--<option value="0">$i18n.getString( "select_inventorytype" )</option>-->
 					#foreach( $inventoryType in $inventoryTypes )
 						<option value="$inventoryType.id">$inventoryType.name</option>
 					#end
@@ -57,6 +58,7 @@
 <div id='editEquipmentDataDiv'></div> <!-- Add / Edit Equipment Data -->
 <div id='equipmentStatusHistoryDiv'></div> <!-- List Equipment Status History -->
 <div id='resultSearchDiv' style='font-size:13px'></div> <!-- List searching Equipment -->
+<div id='equipmentDataEntryDiv'></div> <!-- List All/Filtered Equipments -->
 
 #parse( "/dhis-web-commons/loader/loader.vm" )
 
@@ -164,4 +166,11 @@
         showById('searchPatientDiv');
     #end
     
+</script>
+<script type="text/javascript">
+jQuery( document ).ready( function()
+{
+	inventoryTypeChange();
+	loadAllEquipments();
+});
 </script>
\ No newline at end of file

=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/uploadCatalogImageForm.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/uploadCatalogImageForm.vm	2012-06-26 08:38:56 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/uploadCatalogImageForm.vm	2012-08-03 11:10:18 +0000
@@ -22,8 +22,9 @@
     
 </script>
 <h3>$i18n.getString( "upload_catalog_image" )</h3>
-<!--<form id="uploadCatalogImageForm" name="uploadCatalogImageForm" action="uploadCatalogImage.action" method="post" enctype="multipart/form-data">-->
-<form id="uploadCatalogImageForm" name="uploadCatalogImageForm" method="post" enctype="multipart/form-data">
+<form id="uploadCatalogImageForm" name="uploadCatalogImageForm" action="uploadCatalogImage.action" method="post" enctype="multipart/form-data">
+<!--<form id="uploadCatalogImageForm" name="uploadCatalogImageForm" enctype="multipart/form-data">-->
+<!--<form id="uploadCatalogImageForm" name="uploadCatalogImageForm" method="post" enctype="multipart/form-data">-->
 
 	<div>
 		<input type="hidden" id="id" name="id" value="$catalog.id" />
@@ -65,8 +66,9 @@
 						<td>&nbsp;</td>
 						<td>
 							<input type="submit" class='button' value="$i18n.getString( 'upload_image' )" >&nbsp;
-							<!--<input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='catalog.action'" />-->
-							<input type="button" class="button" value="$i18n.getString( 'cancel' )" onclick="loadAllCatalogs();"/>
+							<!--<input type="button" class='button' value="$i18n.getString( 'upload_image' )" onclick="upLoadImage()">&nbsp;-->
+							<input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='catalog.action'" />
+							<!--<input type="button" class="button" value="$i18n.getString( 'cancel' )" onclick="loadAllCatalogs();"/>-->
 						</td>
 					</tr>
 				</table>
@@ -74,5 +76,5 @@
 			<td valign="top"><img src="showImage.action?id=$catalog.id" style="width:200px;height:200px;" /></td>
 		</tr>
 	</table>
-
+<div id='imageSaveDiv'></div>
 </form>