← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2331: fixed popup window in bg/manpower module

 

------------------------------------------------------------
revno: 2331
committer: Tri <Tri@Tri-Laptop>
branch nick: dhis2
timestamp: Fri 2010-12-10 15:36:02 +0700
message:
  fixed popup window in bg/manpower module
modified:
  local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/employeePost.vm
  local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/form.vm
  local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/javascript/form.js
  local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/select.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 'local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/employeePost.vm'
--- local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/employeePost.vm	2010-11-23 09:50:29 +0000
+++ local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/employeePost.vm	2010-12-10 08:36:02 +0000
@@ -1,4 +1,3 @@
-
 <form id="employeePostForm" action="saveEmployeePost.action" method="post" >
 	
 	<table align="center">
@@ -43,7 +42,11 @@
 					##set($fordate = $lineListElement.shortName)						
 					<td>
 					  <input type="text" id="$lineListElement.shortName" name="$lineListElement.shortName" style="width:10em" onkeypress="return keyPress(event, this)">
-					  <script>datePickerValid( '$lineListElement.shortName', false );</script>
+						<script>
+							jQuery(function(){
+								datePickerValid( '$lineListElement.shortName', false );
+							});						
+						</script>
 					</td>
 				#end
 			</tr>

=== modified file 'local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/form.vm'
--- local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/form.vm	2010-11-22 14:00:26 +0000
+++ local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/form.vm	2010-12-10 08:36:02 +0000
@@ -56,8 +56,8 @@
 				<tr id="tr${employee.pdsCode}">
 					<td#alternate( $mark )>$encoder.htmlEncode( $employee.name ) - $encoder.htmlEncode( $employee.pdsCode )</td>
 					<td style="text-align:center"#alternate( $mark )>
-						<a href="javascript:showUpdateEmployeePostForm( '$employee.pdsCode' )" title="$i18n.getString( "edit" )">
-							<img src="../images/edit.png" alt="$i18n.getString( "edit" )" />
+						<a href="javascript:showUpdateEmployeePostForm( '$employee.pdsCode' )" title="$i18n.getString( 'edit' )">
+							<img src="../images/edit.png" alt="$i18n.getString( 'edit' )" />
 						</a>
 					</td>
 				</tr>	

=== modified file 'local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/javascript/form.js'
--- local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/javascript/form.js	2010-11-23 13:59:22 +0000
+++ local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/javascript/form.js	2010-12-10 08:36:02 +0000
@@ -196,33 +196,15 @@
 function showEmployeePostForm( sancPos, dataValueMapKey ) 
 {
 	var reportingDate = document.getElementById( "reportingDate" ).value;
-	var url = 'showEmployeePostForm.action?reportingDate=' + reportingDate + '&dataValue=' + sancPos + '&dataValueMapKey=' + dataValueMapKey;
-	$('#contentDataRecord').dialog('destroy').remove();
-    $('<div id="contentDataRecord" style="z-index: 1;">' ).load(url).dialog({
-    title: 'Employee Post Detail',
-	maximize: true, 
-	closable: true,
-	modal:true,
-	overlay:{background:'#000000', opacity:0.1},
-	width: 420,
-    height: 330
-    });
+	var url = 'showEmployeePostForm.action?reportingDate=' + reportingDate + '&dataValue=' + sancPos + '&dataValueMapKey=' + dataValueMapKey;	
+    $('#contentDataRecord' ).load(url).dialog("open");
 }
 
 function showUpdateEmployeePostForm( pdsCode ) 
 {
 	var reportingDate = document.getElementById( "reportingDate" ).value;
 	var url = 'showEditEmployeePostForm.action?id=' + pdsCode + '&reportingDate=' + reportingDate;
-	$('#contentDataRecord').dialog('destroy').remove();
-    $('<div id="contentDataRecord" style="z-index: 1;">' ).load(url).dialog({
-    title: 'Edit Employee Post Detail',
-	maximize: true, 
-	closable: true,
-	modal:true,
-	overlay:{background:'#000000', opacity:0.1},
-	width: 420,
-    height: 380
-	});
+	$('#contentDataRecord' ).load(url).dialog("open");
 }
 
 function keyPress( event, field )

=== modified file 'local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/select.vm'
--- local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/select.vm	2010-11-23 09:50:29 +0000
+++ local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/select.vm	2010-12-10 08:36:02 +0000
@@ -68,6 +68,17 @@
 
 <hr style="clear:both;">
 
+<div id="contentDataRecord"></div>
+
 <script type="text/javascript">
-    datePickerValid( 'reportingDate', false );
+	jQuery( function(){
+		datePickerValid( 'reportingDate', false );
+	});    
+	jQuery("#contentDataRecord").dialog({
+		autoOpen:false,
+		title:"Edit Employee Post Detail",
+		modal:true,
+		width:400
+		});
 </script>
+