← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4381: Data entry, putting grey background color on disabled input fields

 

------------------------------------------------------------
revno: 4381
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-08-19 21:27:33 +0200
message:
  Data entry, putting grey background color on disabled input fields
modified:
  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
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css


--
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/form.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2011-08-19 12:47:28 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2011-08-19 19:27:33 +0000
@@ -46,6 +46,7 @@
 var COLOR_RED = '#ff8a8a';
 var COLOR_ORANGE = '#ff6600';
 var COLOR_WHITE = '#ffffff';
+var COLOR_GREY = '#cccccc';
 
 /**
  * Page init. The order of events is:
@@ -539,7 +540,7 @@
     var periodId = $( '#selectedPeriodId' ).val();
     var dataSetId = $( '#selectedDataSetId' ).val();
 
-    // Clear existing values and colors
+    // Clear existing values and colors, grey disabled fields
 
     $( '[name="ef"]' ).val( '' );
     $( '[name="es"]' ).val( '' );
@@ -549,6 +550,8 @@
 
     $( '[name="min"]' ).html( '' );
     $( '[name="max"]' ).html( '' );
+    
+    $( '[name="ef"]' ).filter( ':disabled' ).css( 'background-color', COLOR_GREY );
 
     $.getJSON( 'getDataValues.action', {
             periodId : periodId,

=== 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-16 15:44:11 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm	2011-08-19 19:27:33 +0000
@@ -65,7 +65,7 @@
       <option value="false">$i18n.getString( "no" )</option>
     </select></td>
     #else
-    <td><input name="ef" id="$dataEntryId" type="text" tabindex="$tabIndex"#if( $greyedField || !$hasAccess ) class="grey" disabled="disabled"#end></td>
+    <td><input name="ef" id="$dataEntryId" type="text" tabindex="$tabIndex"#if( $greyedField || !$hasAccess ) disabled="disabled"#end></td>
     #end
     </td>
     #set( $tabIndex = $tabIndex + 1 )

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css	2011-08-16 13:16:34 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css	2011-08-19 19:27:33 +0000
@@ -33,11 +33,6 @@
   background-color: #ff6600;
 }
 
-.grey
-{
-  background-color: #cccccc;
-}
-
 .alt
 {
   background-color: #e0e0e0;