=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/defaultForm.vm' --- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/defaultForm.vm 2011-08-13 17:39:25 +0000 +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/defaultForm.vm 2011-08-19 23:11:39 +0000 @@ -41,13 +41,13 @@ #set( $dataEntryId = "${dataElement.id}-${optionCombo.id}-val" ) #if( $dataElement.type == "bool" ) - #else - + #end #set( $tabIndex = $tabIndex + 1 ) === modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js' --- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2011-08-19 08:56:53 +0000 +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2011-08-19 23:11:39 +0000 @@ -9,8 +9,6 @@ * {dataelementid}-cell // table cell for data element name * {dataelementid}-{optioncomboid}-min // min value for data value * {dataelementid}-{optioncomboid}-max // max value for data value - * - * Class "ef" means "entry field", class "es" means "entry select". */ // ----------------------------------------------------------------------------- @@ -52,7 +50,7 @@ { var entryFieldValues = new Array(); - $( 'input[name="ef"]' ).each( function( index ) + $( 'input[name="entryfield"]' ).each( function( index ) { entryFieldValues[$( this ).attr( 'id' )] = $( this ).attr( 'value' ); } ); === modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js' --- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2011-08-19 21:15:48 +0000 +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2011-08-19 23:11:39 +0000 @@ -123,7 +123,7 @@ function loadMetaData() { - var KEY_METADATA = "metadata"; + var KEY_METADATA = 'metadata'; $.getJSON( 'getMetaData.action', function( json ) { @@ -173,7 +173,7 @@ var key = array[0]; var value = completeDataSets[key]; - console.log( "Upload CompleteDataSet: " + key + ", with value: " + value ); + console.log( 'Uploaded complete data set: ' + key + ', with value: ' + value ); $.ajax( { url : 'registerCompleteDataSet.action', @@ -207,7 +207,7 @@ var key = array[0]; var value = dataValues[key]; - console.log( "Upload DataValue: " + key + ", with value: " + value ); + console.log( 'Uploaded data value: ' + key + ', with value: ' + value ); $.ajax( { url : 'saveValue.action', @@ -234,7 +234,7 @@ function addEventListeners() { - $( '[name="ef"]' ).each( function( i ) + $( '[name="entryfield"]' ).each( function( i ) { var id = $( this ).attr( 'id' ); var dataElementId = id.split( '-' )[0]; @@ -276,7 +276,7 @@ } } ); - $( '[name="es"]' ).each( function( i ) + $( '[name="entryselect"]' ).each( function( i ) { var id = $( this ).attr( 'id' ); var dataElementId = id.split( '-' )[0]; @@ -547,16 +547,16 @@ // Clear existing values and colors, grey disabled fields - $( '[name="ef"]' ).val( '' ); - $( '[name="es"]' ).val( '' ); + $( '[name="entryfield"]' ).val( '' ); + $( '[name="entryselect"]' ).val( '' ); - $( '[name="ef"]' ).css( 'background-color', COLOR_WHITE ); - $( '[name="es"]' ).css( 'background-color', COLOR_WHITE ); + $( '[name="entryfield"]' ).css( 'background-color', COLOR_WHITE ); + $( '[name="entryselect"]' ).css( 'background-color', COLOR_WHITE ); $( '[name="min"]' ).html( '' ); $( '[name="max"]' ).html( '' ); - $( '[name="ef"]' ).filter( ':disabled' ).css( 'background-color', COLOR_GREY ); + $( '[name="entryfield"]' ).filter( ':disabled' ).css( 'background-color', COLOR_GREY ); $.getJSON( 'getDataValues.action', { @@ -678,13 +678,13 @@ { var index = field.getAttribute( 'tabindex' ); - field = $( 'input[name="ef"][tabindex="' + ( ++index ) + '"]' ); + field = $( 'input[name="entryfield"][tabindex="' + ( ++index ) + '"]' ); while ( field ) { if ( field.is( ':disabled' ) || field.is( ':hidden' ) ) { - field = $( 'input[name="ef"][tabindex="' + ( ++index ) + '"]' ); + field = $( 'input[name="entryfield"][tabindex="' + ( ++index ) + '"]' ); } else { @@ -697,13 +697,13 @@ { var index = field.getAttribute( 'tabindex' ); - field = $( 'input[name="ef"][tabindex="' + ( --index ) + '"]' ); + field = $( 'input[name="entryfield"][tabindex="' + ( --index ) + '"]' ); while ( field ) { if ( field.is( ':disabled' ) || field.is( ':hidden' ) ) { - field = $( 'input[name="ef"][tabindex="' + ( --index ) + '"]' ); + field = $( 'input[name="entryfield"][tabindex="' + ( --index ) + '"]' ); } else { @@ -732,7 +732,6 @@ } ).error( function() { // no response from server, fake a positive result and save it - // anyway registerCompleteDataSet( { 'response' : 'success' } ); @@ -1289,7 +1288,7 @@ */ this.getDataValueIdentifier = function( dataElementId, categoryOptionComboId, periodId, organisationUnitId ) { - return dataElementId + "-" + categoryOptionComboId + "-" + periodId + "-" + organisationUnitId; + return dataElementId + '-' + categoryOptionComboId + '-' + periodId + '-' + organisationUnitId; }; /** @@ -1297,7 +1296,7 @@ */ this.getCompleteDataSetId = function( json ) { - return json.periodId + "-" + json.dataSetId + "-" + json.organisationUnitId; + return json.periodId + '-' + json.dataSetId + '-' + json.organisationUnitId; }; /** === modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm' --- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm 2011-08-19 19:27:33 +0000 +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm 2011-08-19 23:11:39 +0000 @@ -59,13 +59,13 @@ #set( $greyedField = false ) #set( $greyedField = $greyedFields.get( "$dataElement.id:$optionCombo.id" ) ) #if( $dataElement.type == "bool" ) - #else - + #end #set( $tabIndex = $tabIndex + 1 )