=== modified file 'local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/api/LLDataSets.java' --- local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/api/LLDataSets.java 2011-10-14 13:44:18 +0000 +++ local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/api/LLDataSets.java 2011-11-04 08:03:14 +0000 @@ -41,13 +41,13 @@ //---------------------------------------------------------------- // LineListing Cold Chain //---------------------------------------------------------------- - public static final int LLCC_EQUIPMENT = 5726; - public static final int LLCC_MACHINE = 5727; - public static final int LLCC_MACHINE_WORKING = 5728; - public static final int LLCC_BREAKDOWN_DATE = 5729; - public static final int LLCC_INTIMATION_DATE = 5730; - public static final int LLCC_REPAIR_DATE = 5731; - public static final int LLCC_REMARKS = 5732; + public static final int LLCC_EQUIPMENT = 5786; + public static final int LLCC_MACHINE = 5787; + public static final int LLCC_MACHINE_WORKING = 5788; + public static final int LLCC_BREAKDOWN_DATE = 5789; + public static final int LLCC_INTIMATION_DATE = 5790; + public static final int LLCC_REPAIR_DATE = 5791; + public static final int LLCC_REMARKS = 5792; //---------------------------------------------------------------- // LineListing IDSP LAB === modified file 'local/in/dhis-web-dataentry-linelisting/src/main/webapp/dhis-web-dataentry-national/javascript/general.js' --- local/in/dhis-web-dataentry-linelisting/src/main/webapp/dhis-web-dataentry-national/javascript/general.js 2011-10-24 11:27:50 +0000 +++ local/in/dhis-web-dataentry-linelisting/src/main/webapp/dhis-web-dataentry-national/javascript/general.js 2011-11-04 08:03:14 +0000 @@ -79,7 +79,7 @@ { if(lastRecordNo == -1) return true; - var dataElementId = 5732; + var dataElementId = 5792; var field = document.getElementById( 'value[' + dataElementId + '].value:value[' + lastRecordNo + '].value' ); var resVal = field.selectedIndex; @@ -125,9 +125,9 @@ function isColdChainEquipmentFieldEntered( recordNo ) { - var dataElementId = 5726; + var dataElementId = 5786; var field = document.getElementById( 'value[' + dataElementId + '].value:value[' + recordNo + '].value' ); - alert( 'value[' + dataElementId + '].value:value[' + recordNo + '].value' ); + //alert( 'value[' + dataElementId + '].value:value[' + recordNo + '].value' ); var resVal = field.selectedIndex; if(resVal <= 0 || resVal == "---") @@ -173,7 +173,7 @@ function isColdChainMachineNumberFieldEntered( recordNo ) { - var dataElementId = 5727; + var dataElementId = 5787; var field = document.getElementById( 'value[' + dataElementId + '].value:value[' + recordNo + '].value' ); var resVal = field.value; @@ -209,7 +209,17 @@ } else { - saveLLbirthValue( dataElementId, recordNo ); + //alert( field.options[ resVal ].value ); + + if( field.options[ resVal ].value == "N" ) + { + document.getElementById( 'value[5789].value:value[' + recordNo + '].value' ).disabled = false; + } + else + { + document.getElementById( 'value[5789].value:value[' + recordNo + '].value' ).disabled = true; + } + saveLLbirthValue( dataElementId, recordNo ); } } else @@ -302,7 +312,7 @@ function isColdChainDateOfBreakdownFieldEntered( recordNo ) { - var dataElementId = 5729; + var dataElementId = 5789; var field = document.getElementById( 'value[' + dataElementId + '].value:value[' + recordNo + '].value' ); var resVal = field.value; @@ -348,7 +358,13 @@ var startDate = startDateObj.value; var endDate = endDateObj.value; - if( isColdChainDateOfBreakdownFieldEntered( recordNo ) ) + var flag = 1; + if( document.getElementById( 'value[' + dataElementId + '].value:value[' + recordNo + '].value' ).value == "N" ) + { + flag = 2; + } + + if( flag == 1 || isColdChainDateOfBreakdownFieldEntered( recordNo ) ) { if(isDate(resVal) ) { @@ -384,7 +400,7 @@ function isColdChainDateOfIntimationFieldEntered( recordNo ) { - var dataElementId = 5730; + var dataElementId = 5790; var field = document.getElementById( 'value[' + dataElementId + '].value:value[' + recordNo + '].value' ); var resVal = field.value; @@ -466,7 +482,7 @@ function isColdChainDateOfRepairFieldEntered( recordNo ) { - var dataElementId = 5731; + var dataElementId = 5791; var field = document.getElementById( 'value[' + dataElementId + '].value:value[' + recordNo + '].value' ); var resVal = field.value; @@ -529,7 +545,7 @@ { saveLLbirthValue( dataElementId, recordNo ); } - addLLColdChainNewRow( resVal, 5726, recordNo ); + addLLColdChainNewRow( resVal, 5786, recordNo ); } else { @@ -2493,7 +2509,7 @@ dataElementId == 1035 || dataElementId == 1036 || dataElementId == 1037 || dataElementId == 1038 || dataElementId == 1039 || dataElementId == 1040 || dataElementId == 1043 || dataElementId == 1046 || dataElementId == 1050 || dataElementId == 1051 || dataElementId == 1052 || dataElementId == 1054 || - dataElementId == 5726 || dataElementId == 5728 || dataElementId == 3120 + dataElementId == 5786 || dataElementId == 5788 || dataElementId == 3120 ) { resVal = field.options[field.selectedIndex].value; === modified file 'local/in/dhis-web-dataentry-linelisting/src/main/webapp/dhis-web-dataentry-national/llcoldchain.vm' --- local/in/dhis-web-dataentry-linelisting/src/main/webapp/dhis-web-dataentry-national/llcoldchain.vm 2011-10-14 13:44:18 +0000 +++ local/in/dhis-web-dataentry-linelisting/src/main/webapp/dhis-web-dataentry-national/llcoldchain.vm 2011-11-04 08:03:14 +0000 @@ -37,35 +37,35 @@ var newRow = tbl.insertRow(lastRow); var oCell = newRow.insertCell(0); - oCell.innerHTML = "