← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 657: Fix bug in Child Health Record

 

------------------------------------------------------------
revno: 657
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Thu 2009-09-10 12:59:02 +0700
message:
  Fix bug in Child Health Record
modified:
  local/vn/dhis-web-chr-form/src/main/webapp/dhis-web-chr-form/addForm.vm
  local/vn/dhis-web-chr-form/src/main/webapp/dhis-web-chr-form/javascripts/dhtmlgoodies_calendar.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 'local/vn/dhis-web-chr-form/src/main/webapp/dhis-web-chr-form/addForm.vm'
--- local/vn/dhis-web-chr-form/src/main/webapp/dhis-web-chr-form/addForm.vm	2009-09-03 03:55:25 +0000
+++ local/vn/dhis-web-chr-form/src/main/webapp/dhis-web-chr-form/addForm.vm	2009-09-10 05:59:02 +0000
@@ -61,12 +61,16 @@
     <td>$element.label
       #if($element.required == "true") <font color="#FF0000">*</font> #end </td>
     <td>
-      <div id="date$element.id" >
-    <input name="data" id="data" type="text" value="$!element.initialValue" width="180px" onBlur="javascript : var strerror = '$!element.label' + ' ' +  '$i18n.getString("value_not_null")' ;  validateObject('$element.required', this, strerror); if(this.value != ''){var strerror =  '$i18n.getString("not_date")'; isDate(this, strerror);}"/>
-	  
+	<div id="datainput$element.id">
+	 <input name="data" id="data" type="text" value="$!element.initialValue" width="180px" onBlur="javascript : var strerror = '$!element.label' + ' ' +  '$i18n.getString("value_not_null")' ;  validateObject('$element.required', this, strerror); if(this.value != ''){var strerror =  '$i18n.getString("not_date")'; isDate(this, strerror);}"/>
+	
+	</div>
+		<img src="images/cal.gif"  alt="i18n.getString('click_here_pick_up_date')" width="16" height="16" border="no" onClick="javascript: parent_div=document.getElementById('date$element.id'); if(parent_div.style.display=='block'){parent_div.style.display='none';}else{ parent_div.style.display ='block'; }; displayCalendar(document.getElementById('datainput$element.id').getElementsByTagName('input')[0],'yyyy-mm-dd',this,true); " style="cursor:pointer "/>
+
+      <div id="date$element.id" style="z-index:100001; background-color:#99FF99; display:none" >
+     
     </div>
 	
-	<img src="images/cal.gif"  alt="i18n.getString('click_here_pick_up_date')" width="16" height="16" border="no" onClick="displayCalendar(document.getElementById('date$element.id').getElementsByTagName('input')[0],'yyyy-mm-dd',this,true); " style="cursor:pointer "/>
     
           </td>
     <!-- Text field -->

=== modified file 'local/vn/dhis-web-chr-form/src/main/webapp/dhis-web-chr-form/javascripts/dhtmlgoodies_calendar.js'
--- local/vn/dhis-web-chr-form/src/main/webapp/dhis-web-chr-form/javascripts/dhtmlgoodies_calendar.js	2009-09-01 03:49:33 +0000
+++ local/vn/dhis-web-chr-form/src/main/webapp/dhis-web-chr-form/javascripts/dhtmlgoodies_calendar.js	2009-09-10 05:59:02 +0000
@@ -909,7 +909,7 @@
 
 
 }
-
+var parent_div;
 function writeCalendarContent()
 {
 	var calendarContentDivExists = true;
@@ -936,6 +936,8 @@
 	document.getElementById('calendar_hour_txt').innerHTML = currentHour/1 > 9 ? currentHour : '0' + currentHour;
 	document.getElementById('calendar_minute_txt').innerHTML = currentMinute/1 >9 ? currentMinute : '0' + currentMinute;
 
+	
+	
 	var existingTable = calendarContentDiv.getElementsByTagName('TABLE');
 	if(existingTable.length>0){
 		calendarContentDiv.removeChild(existingTable[0]);
@@ -1021,8 +1023,8 @@
 		if(!calendarContentDivExists)setTimeout('resizeIframe()',350);else setTimeout('resizeIframe()',10);
 	}
 
-
-
+	parent_div.appendChild(calendarContentDiv); 
+	//parent_div.appendChild(calendarDiv); 
 
 }