← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12500: Data entry, using classes instead of names for element selection

 

------------------------------------------------------------
revno: 12500
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-10-08 15:00:44 +0200
message:
  Data entry, using classes instead of names for element selection
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
  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-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2013-10-08 11:54:18 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2013-10-08 13:00:44 +0000
@@ -85,7 +85,6 @@
     public static final String VALUE_TYPE_INT = "int";
     public static final String VALUE_TYPE_NUMBER = "number";    
     public static final String VALUE_TYPE_USER_NAME = "username";
-    public static final String VALUE_TYPE_TEXT = "text";
     public static final String VALUE_TYPE_BOOL = "bool";
     public static final String VALUE_TYPE_TRUE_ONLY = "trueOnly";
     public static final String VALUE_TYPE_DATE = "date";
@@ -93,6 +92,7 @@
     public static final String VALUE_TYPE_ZERO_OR_POSITIVE_INT = "zeroPositiveInt";
     public static final String VALUE_TYPE_POSITIVE_INT = "positiveNumber";
     public static final String VALUE_TYPE_NEGATIVE_INT = "negativeNumber";
+    public static final String VALUE_TYPE_TEXT = "text";
     public static final String VALUE_TYPE_LONG_TEXT = "longText";
 
     public static final String DOMAIN_TYPE_AGGREGATE = "aggregate";
@@ -130,12 +130,12 @@
     private String type;
 
     /**
-     * The number type. Is relevant when type is INT.
+     * The number type. Is relevant when type is VALUE_TYPE_INT.
      */
     private String numberType;
 
     /**
-     * The text type. Is relevant when type is TEXT.
+     * The text type. Is relevant when type is VALUE_TYPE_STRING.
      */
     private String textType;
 

=== 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	2013-10-07 14:00:59 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2013-10-08 13:00:44 +0000
@@ -474,7 +474,7 @@
         }
     } );
 
-    $( '[name="commentlink"]' ).each( function( i )
+    $( '.commentlink' ).each( function( i )
     {
         var id = $( this ).attr( 'id' );
         var split = splitFieldId( id );

=== 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	2013-09-03 15:37:17 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm	2013-10-08 13:00:44 +0000
@@ -93,9 +93,9 @@
       <option value="">[$i18n.getString( "no_value" )]</option>
       <option value="true">$i18n.getString( "yes" )</option>
       <option value="false">$i18n.getString( "no" )</option>
-    </select><img name="commentlink" id="${commentId}"></td>
+    </select><img class="commentlink" id="${commentId}"></td>
     #elseif( $dataElement.type == "trueOnly" )
-        <td><input name="entrytrueonly" class="entrytrueonly" id="${dataEntryId}" type="checkbox" tabindex="${tabIndex}"#if( $greyedField || !$hasAccess ) disabled="disabled"#end><img name="commentlink" id="${commentId}"></td>
+        <td><input name="entrytrueonly" class="entrytrueonly" id="${dataEntryId}" type="checkbox" tabindex="${tabIndex}"#if( $greyedField || !$hasAccess ) disabled="disabled"#end><img class="commentlink" id="${commentId}"></td>
     #else
         #if( $dataElement.optionSet )
           <td><input name="entryoptionset" class="entryoptionset" id="${dataEntryId}" type="text" tabindex="${tabIndex}"#if( $greyedField || !$hasAccess ) disabled="disabled"#end></td>