← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3166: fix bug: Don't show date field into case-entry module on Firefox 4.

 

------------------------------------------------------------
revno: 3166
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-03-25 15:20:12 +0700
message:
  fix bug: Don't show date field into case-entry module on Firefox 4.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/screen/DefaultDataEntryScreenManager.java


--
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-caseentry/src/main/java/org/hisp/dhis/caseentry/screen/DefaultDataEntryScreenManager.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/screen/DefaultDataEntryScreenManager.java	2011-03-22 05:49:48 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/screen/DefaultDataEntryScreenManager.java	2011-03-25 08:20:12 +0000
@@ -1228,16 +1228,15 @@
                 // -------------------------------------------------------------
                 // Remove placeholder view attribute from input field
                 // -------------------------------------------------------------
-
+                
                 dataElementCode = dataElementCode.replaceAll( "view=\".*?\"", "" );
-
                 // -------------------------------------------------------------
                 // Append Javascript code and meta data (type/min/max) for
                 // persisting to output code, and insert value and type for
                 // fields
                 // -------------------------------------------------------------
 
-                String appendCode = dataElementCode;
+                String appendCode = dataElementCode + "/>";
                 appendCode = appendCode.replace( "name=\"entryfield\"", jsCodeForDate );
                 //appendCode += "</script>";
 
@@ -1281,18 +1280,27 @@
                         orgUnitName = patientDataValue.getOrganisationUnit().getName();
                     }
                 }
-
+                
                 appendCode = appendCode.replace( "$DATAELEMENTID", String.valueOf( dataElementId ) );
+                
                 appendCode = appendCode.replace( "$PROGRAMSTAGEID", String.valueOf( programStageId ) );
+                
                 appendCode = appendCode.replace( "$PROGRAMSTAGENAME", programStageName );
+                
                 appendCode = appendCode.replace( "$ORGUNITNAME", orgUnitName );
+                
                 appendCode = appendCode.replace( "$DATAELEMENTNAME", dataElement.getName() );
+                
                 appendCode = appendCode.replace( "$DATAELEMENTTYPE", dataElementType );
+                
                 appendCode = appendCode.replace( "$DISABLED", disabled );
+                
                 appendCode = appendCode.replace( "$COMPULSORY", compulsory );
+                
                 appendCode = appendCode.replace( "$SAVEMODE", "false" );
+                
                 appendCode = appendCode.replaceAll( "\\$", "\\\\\\$" );
-
+                
                 dataElementMatcher.appendReplacement( sb, appendCode );
             }
         }