dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #13589
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4388: Fixed minor issue
------------------------------------------------------------
revno: 4388
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2011-08-20 01:11:39 +0200
message:
Fixed minor issue
modified:
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/javascript/entry.js
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/sectionForm.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 '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" )
<td>
#if( $dataElement.type == "bool" )
- <select name="es" id="$dataEntryId"#if( !$hasAccess ) disabled="disabled"#end tabindex="$tabIndex">
+ <select name="entryselect" id="$dataEntryId"#if( !$hasAccess ) disabled="disabled"#end tabindex="$tabIndex">
<option value="">[$i18n.getString( "no_value" )]</option>
<option value="true">$i18n.getString( "yes" )</option>
<option value="false">$i18n.getString( "no" )</option>
</select>
#else
- <input name="ef" id="$dataEntryId" type="text"#if( !$hasAccess ) disabled="disabled"#end tabindex="$tabIndex">
+ <input name="entryfield" id="$dataEntryId" type="text"#if( !$hasAccess ) disabled="disabled"#end tabindex="$tabIndex">
#end
</td>
#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" )
- <td><select name="es" id="$dataEntryId" tabindex="$tabIndex"#if( $greyedField || !$hasAccess ) disabled="disabled"#end>
+ <td><select name="entryselect" id="$dataEntryId" tabindex="$tabIndex"#if( $greyedField || !$hasAccess ) disabled="disabled"#end>
<option value="">[$i18n.getString( "no_value" )]</option>
<option value="true">$i18n.getString( "yes" )</option>
<option value="false">$i18n.getString( "no" )</option>
</select></td>
#else
- <td><input name="ef" id="$dataEntryId" type="text" tabindex="$tabIndex"#if( $greyedField || !$hasAccess ) disabled="disabled"#end></td>
+ <td><input name="entryfield" id="$dataEntryId" type="text" tabindex="$tabIndex"#if( $greyedField || !$hasAccess ) disabled="disabled"#end></td>
#end
</td>
#set( $tabIndex = $tabIndex + 1 )