← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3754: Don't show dataelement info while inputing value into case-entry.

 

------------------------------------------------------------
revno: 3754
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-05-26 15:25:21 +0700
message:
  Don't show dataelement info while inputing value into case-entry.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/dataEntry.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageDataEntryForm.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-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm	2011-05-25 08:44:29 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm	2011-05-26 08:25:21 +0000
@@ -1,4 +1,10 @@
+<script>
+jQuery("#entryFormContainer").ready(function(){
+    entryFormContainerOnReady();
+});
+</script>
 
+<div id='entryFormContainer'>
 <p align='right'>
 	<label for="label2">$i18n.getString( "due_date" ) </label>
 	<input type="text" id="dueDate" name="dueDate" value="$!format.formatDate( $programStageInstance.dueDate )" disabled="disabled"/>
@@ -118,7 +124,7 @@
 
 	</div>
 </div>
-
+</div>
 <script type="text/javascript"> 
 	initCustomCheckboxes();
 	DRAG_DIV.init();

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/dataEntry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/dataEntry.js	2011-05-25 08:44:29 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/dataEntry.js	2011-05-26 08:25:21 +0000
@@ -1277,69 +1277,6 @@
     jQuery('input[type=checkbox][name="providedByAnotherFacility"]').prettyCheckboxes();
 }
 
-jQuery(document).ready(function(){
-    var currentFocus;
-    if( jQuery("#entryFormContainer") ) {
-        if( jQuery("#executionDate").val() )
-        {
-            jQuery("#startMsg").hide();
-        }else
-        {
-            toggleContentForReportDate(false);
-        }
-	
-        jQuery("#customEntryScreenContainer td").hover(
-            function(){
-                var childrens = jQuery(this).children("input[name='entryfield'],select[name='entryselect']");
-                
-				if( jQuery(childrens[0]).is(":disabled")) {
-                    DRAG_DIV.showData(jQuery(childrens[0]).metadata({
-                        "type":"attr",
-                        "name":"data"
-                    }));
-                }
-				
-				
-            },
-            function(){
-            }
-            );
-		
-        jQuery("input[name='entryfield'],select[name='entryselect']").each(function(){
-            jQuery(this).focus(function(){
-                currentFocus = this;
-                DRAG_DIV.showData(jQuery(this).metadata({
-                    "type":"attr",
-                    "name":"data"
-                }));
-            });
-            jQuery(this).blur(function(){
-               
-                });
-            jQuery(this).hover(
-                function(){
-                    DRAG_DIV.showData(jQuery(this).metadata({
-                        "type":"attr",
-                        "name":"data"
-                    }));
-                },
-                function()
-                {
-                    if(currentFocus){
-                        DRAG_DIV.showData(jQuery(currentFocus).metadata({
-                            "type":"attr",
-                            "name":"data"
-                        }));
-                    }
-                }
-                );
-            jQuery(this).addClass("inputText");
-        });
-		
-        TOGGLE.init();
-    }
-});
-
 DRAG_DIV = {
     init : function()
     {
@@ -1356,14 +1293,14 @@
 		
     showData : function(data)
     {
-        jQuery("#orgUnitName").text(data.orgUnitName);
+        jQuery("#orgUnitNameField").text(data.orgUnitName);
         jQuery("#programStageName").text(data.programStageName);
         jQuery("#dataelementName").text(data.dataElementName);
     },
 		
     resetData : function()
     {
-        jQuery("#orgUnitName").text("");
+        jQuery("#orgUnitNameField").text("");
         jQuery("#programStageName").text("");
         jQuery("#dataelementName").text("");
     }
@@ -1537,3 +1474,67 @@
         height: 400
     });
 }
+
+function entryFormContainerOnReady()
+{
+	var currentFocus; 
+    if( jQuery("#entryFormContainer") ) {
+        if( jQuery("#executionDate").val() )
+        {
+            jQuery("#startMsg").hide();
+        }else
+        {
+            toggleContentForReportDate(false);
+        }
+		
+        jQuery("#customEntryScreenContainer td").hover(
+            function(){
+                var childrens = jQuery(this).children("input[name='entryfield'],select[name='entryselect']");
+                
+				if( jQuery(childrens[0]).is(":disabled")) {
+                    DRAG_DIV.showData(jQuery(childrens[0]).metadata({
+                        "type":"attr",
+                        "name":"data"
+                    }));
+                }
+				
+				
+            },
+            function(){
+            }
+            );
+		
+        jQuery("input[name='entryfield'],select[name='entryselect']").each(function(){
+            jQuery(this).focus(function(){
+                currentFocus = this;
+                DRAG_DIV.showData(jQuery(this).metadata({
+                    "type":"attr",
+                    "name":"data"
+                }));
+            });
+            jQuery(this).blur(function(){
+               
+                });
+            jQuery(this).hover(
+                function(){
+                    DRAG_DIV.showData(jQuery(this).metadata({
+                        "type":"attr",
+                        "name":"data"
+                    }));
+                },
+                function()
+                {
+                    if(currentFocus){
+                        DRAG_DIV.showData(jQuery(currentFocus).metadata({
+                            "type":"attr",
+                            "name":"data"
+                        }));
+                    }
+                }
+                );
+            jQuery(this).addClass("inputText");
+        });
+		
+        TOGGLE.init();
+    }
+}
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageDataEntryForm.vm	2011-05-20 09:23:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageDataEntryForm.vm	2011-05-26 08:25:21 +0000
@@ -1,3 +1,10 @@
+<script>
+jQuery("#entryFormContainer").ready(function(){
+    entryFormContainerOnReady();
+});
+</script>
+
+
 <form id="dataEntryFormDiv" name="dataEntryFormDiv" method="post" action="selectDataRecording.action">
 
 <input type="hidden" id="patientId" name="patientId" value="$patient.id">
@@ -67,7 +74,7 @@
 
 <div id="dragDiv">
     <table id="listInfo">
-        <tr><td style="text-align:left"><strong>$i18n.getString("org_unit_name") :</strong></td> <td id="orgUnitName" style="text-align:right"></td></tr>
+        <tr><td style="text-align:left"><strong>$i18n.getString("org_unit_name") :</strong></td> <td id="orgUnitNameField" style="text-align:right"></td></tr>
         <tr><td style="text-align:left"><strong>$i18n.getString("program_stage_name") :</strong></td> <td  id="programStageName" style="text-align:right"></td></tr>
         <tr><td style="text-align:left"><strong>$i18n.getString("datae_element_name") :</strong></td> <td id="dataelementName" style="text-align:right"></td></tr>
     </table>