← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11644: Data entry, true-only fields, checking that value is true for cases where there is a comment but ...

 

------------------------------------------------------------
revno: 11644
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-08-12 22:59:22 +0200
message:
  Data entry, true-only fields, checking that value is true for cases where there is a comment but value is null
modified:
  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


--
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/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js	2013-08-12 19:58:08 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js	2013-08-12 20:59:22 +0000
@@ -232,7 +232,7 @@
 
     var value = $( fieldId ).is( ':checked' );
     
-    value = ( value ==  true) ? value : undefined; // Send nothing if un-ticked
+    value = ( value == true) ? value : undefined; // Send nothing if un-ticked
 
     $( fieldId ).css( 'background-color', COLOR_YELLOW );
 

=== 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-08-12 19:34:06 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2013-08-12 20:59:22 +0000
@@ -433,7 +433,7 @@
             saveTrueOnly( dataElementId, optionComboId, id );
         } );
 
-        $( this ).css( 'width', '90%' );
+        $( this ).css( 'width', '60%' );
     } );
 
     $( '.entryoptionset' ).each( function( i )
@@ -1090,7 +1090,7 @@
 
 	            if ( $( fieldId ).length > 0 )
 	            {
-                    if ( $( fieldId ).attr( 'name' ) == 'entrytrueonly' ) 
+                    if ( $( fieldId ).attr( 'name' ) == 'entrytrueonly' && 'true' == value.val ) 
                     {
                         $( fieldId ).attr( 'checked', true);
                     }