=== modified file 'local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/action/ShowAddCatalogFormAction.java' --- local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/action/ShowAddCatalogFormAction.java 2012-04-30 11:24:11 +0000 +++ local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/action/ShowAddCatalogFormAction.java 2012-05-03 07:02:57 +0000 @@ -1,10 +1,14 @@ package org.hisp.dhis.coldchain.catalog.action; +import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; +import java.util.List; import org.hisp.dhis.coldchain.catalog.CatalogType; import org.hisp.dhis.coldchain.catalog.CatalogTypeAttribute; import org.hisp.dhis.coldchain.catalog.CatalogTypeService; +import org.hisp.dhis.coldchain.catalog.comparator.CatalogTypeAttributeComparator; import com.opensymphony.xwork2.Action; @@ -32,13 +36,21 @@ { this.catalogTypeId = catalogTypeId; } - +/* private Collection catalogTypeAttributes; public Collection getCatalogTypeAttributes() { return catalogTypeAttributes; } +*/ + + private List catalogTypeAttributes = new ArrayList(); + + public List getCatalogTypeAttributes() + { + return catalogTypeAttributes; + } // ------------------------------------------------------------------------- // Action implementation @@ -49,7 +61,11 @@ CatalogType catalogType = catalogTypeService.getCatalogType( catalogTypeId ); - catalogTypeAttributes = catalogType.getCatalogTypeAttributes(); + //catalogTypeAttributes = catalogType.getCatalogTypeAttributes(); + + catalogTypeAttributes = new ArrayList ( catalogType.getCatalogTypeAttributes()); + Collections.sort( catalogTypeAttributes, new CatalogTypeAttributeComparator() ); + /* System.out.println( "Name of CatalogType is ====== :" + catalogType.getName() ); System.out.println( "Size of catalogTypeAttributes :" + catalogTypeAttributes.size() ); === 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-02 06:03:10 +0000 +++ local/in/dhis-web-coldchain/src/main/resources/org/hisp/dhis/coldchain/i18n_module.properties 2012-05-03 07:02:57 +0000 @@ -64,3 +64,22 @@ edit_inventorytype = Edit inventorytype inventorytype_details = Details inventorytype edit_inventorytype_attribute = Edit inventorytype attribute + + +equipment_registration = Equipment registration +equipment_management = Equipment management +registering_unit = Registering unit +select_inventorytype = Please select inventorytype +list_all_equipments = List all equipments +equipmentstatus = Equipment status +search_equipment_by_attributes = Search equipment by attributes +search_result_matching_the_search_criteria = Search result matching the search criteria +total_result = Total result +reporting_date = Reporting date +date_of_updation = Date of updation +please_select = Please select +status = Status +working = Working +notworking = Not working +repair = Repair + === 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-02 09:18:42 +0000 +++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/equipmentInstanceList.vm 2012-05-03 07:02:57 +0000 @@ -5,7 +5,7 @@   #if($!listAll) - $i18n.getString( "list_all_equipment" ) + $i18n.getString( "list_all_equipments" ) #else $i18n.getString( "search_equipment_by_attributes" ) #end === modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/equipmentMenu.vm' --- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/equipmentMenu.vm 2012-04-26 10:00:48 +0000 +++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/equipmentMenu.vm 2012-05-03 07:02:57 +0000 @@ -2,45 +2,9 @@

$i18n.getString( "coldchain_management" ) 


#parse( "/dhis-web-commons/ouwt/orgunittree.vm" ) - === 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-02 09:18:42 +0000 +++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/javascript/equipment.js 2012-05-03 07:02:57 +0000 @@ -1,3 +1,39 @@ +// ---------------------------------------------------------------- +// organization Unit Selected +// ---------------------------------------------------------------- +function organisationUnitSelected( orgUnits ) +{ + document.getElementById('selectedOrgunitID').value = orgUnits; + + showById('selectDiv'); + disable('listAllEquipmentBtn'); + + hideById('searchEquipmentDiv'); + hideById('listEquipmentDiv'); + hideById('editEquipmentDiv'); + hideById('resultSearchDiv'); + + $.getJSON( 'getOrganisationUnit.action', {orgunitId:orgUnits[0]} + , function( json ) + { + var type = json.response; + setFieldValue('selectedOrgunitText', json.message ); + + if( type == 'success' ) + { + //showById('searchEquipmentDiv'); + enable('listAllEquipmentBtn'); + setInnerHTML('warnmessage',''); + setFieldValue('selectedOrgunitText', json.message ); + } + else if( type == 'input' ) + { + setInnerHTML('warnmessage', i18n_can_not_register_patient_for_orgunit); + disable('listPatientBtn'); + } + } ); +} +selection.setListenerFunction( organisationUnitSelected ); // ---------------------------------------------------------------- // On InventoryType Change - Loading InventoryTypeAttributes @@ -62,7 +98,8 @@ if( inventoryTypeId == 0 ) { - alert("Plese select Inventorytype"); + //alert("Plese select Inventorytype"); + showWarningMessage( i18n_select_inventorytype ); return; } === 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-02 09:18:42 +0000 +++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/selectEquipment.vm 2012-05-03 07:02:57 +0000 @@ -60,6 +60,7 @@ #parse( "/dhis-web-commons/loader/loader.vm" )