← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5666: Show entry-forms instead of report-date link ( Show Event in Event Registration).

 

------------------------------------------------------------
revno: 5666
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-01-06 11:56:54 +0700
message:
  Show entry-forms instead  of report-date link ( Show Event in Event Registration).
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttribute.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOption.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOptionService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOptionStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidation.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramNameComparator.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageDataElementSortOrderComparator.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageNameComparator.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/package-info.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetEventsByProgramAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/historyAnonymousEvents.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.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 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttribute.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttribute.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttribute.java	2012-01-06 04:56:54 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2012, University of Oslo
+ * Copyright (c) 2004-2010, University of Oslo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOption.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOption.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOption.java	2012-01-06 04:56:54 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2012, University of Oslo
+ * Copyright (c) 2004-2010, University of Oslo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOptionService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOptionService.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOptionService.java	2012-01-06 04:56:54 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2012, University of Oslo
+ * Copyright (c) 2004-2010, University of Oslo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOptionStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOptionStore.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeOptionStore.java	2012-01-06 04:56:54 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2012, University of Oslo
+ * Copyright (c) 2004-2010, University of Oslo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeService.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeService.java	2012-01-06 04:56:54 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2012, University of Oslo
+ * Copyright (c) 2004-2010, University of Oslo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeStore.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramAttributeStore.java	2012-01-06 04:56:54 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2012, University of Oslo
+ * Copyright (c) 2004-2010, University of Oslo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java	2012-01-04 04:55:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java	2012-01-06 04:56:54 +0000
@@ -55,8 +55,6 @@
     Collection<ProgramStageInstance> getProgramStageInstances( ProgramStage programStage );
 
     Collection<ProgramStageInstance> getProgramStageInstances( Collection<ProgramInstance> programInstances );
-    
-    List<ProgramStageInstance> getProgramStageInstances( ProgramInstance programInstance, int min, int max );
 
     Collection<ProgramStageInstance> getProgramStageInstances( Date dueDate );
 
@@ -84,5 +82,9 @@
     public List<ProgramStageInstance> get( OrganisationUnit unit, Date after, Date before, Boolean completed );
 
     List<ProgramStageInstance> getProgramStageInstances( Patient patient, Boolean completed );
+    
+    List<ProgramStageInstance> getProgramStageInstances( ProgramInstance programInstance, Date executionDate, int min, int max );
+    
+    int countProgramStageInstances( ProgramInstance programInstance, Date executionDate);
 
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java	2012-01-04 04:55:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java	2012-01-06 04:56:54 +0000
@@ -68,5 +68,7 @@
 
     List<ProgramStageInstance> getProgramStageInstances( Patient patient, Boolean completed);
     
-    List<ProgramStageInstance> getProgramStageInstances( ProgramInstance programInstance, int min, int max );
+    List<ProgramStageInstance> getProgramStageInstances( ProgramInstance programInstance, Date executionDate, int min, int max );
+    
+    int countProgramStageInstances( ProgramInstance programInstance, Date executionDate);
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStore.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStore.java	2012-01-06 04:56:54 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2012, University of Oslo
+ * Copyright (c) 2004-2010, University of Oslo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidation.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidation.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidation.java	2012-01-06 04:56:54 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2012, University of Oslo
+ * Copyright (c) 2004-2010, University of Oslo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationService.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationService.java	2012-01-06 04:56:54 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2012, University of Oslo
+ * Copyright (c) 2004-2010, University of Oslo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationStore.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationStore.java	2012-01-06 04:56:54 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2012, University of Oslo
+ * Copyright (c) 2004-2010, University of Oslo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramNameComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramNameComparator.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramNameComparator.java	2012-01-06 04:56:54 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2012, University of Oslo
+ * Copyright (c) 2004-2010, University of Oslo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageDataElementSortOrderComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageDataElementSortOrderComparator.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageDataElementSortOrderComparator.java	2012-01-06 04:56:54 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2012, University of Oslo
+ * Copyright (c) 2004-2010, University of Oslo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageNameComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageNameComparator.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageNameComparator.java	2012-01-06 04:56:54 +0000
@@ -1,7 +1,7 @@
 package org.hisp.dhis.program.comparator;
 
 /*
- * Copyright (c) 2004-2012, University of Oslo
+ * Copyright (c) 2004-2010, University of Oslo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/package-info.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/package-info.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/package-info.java	2012-01-06 04:56:54 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004-2012, University of Oslo
+ * Copyright (c) 2004-2010, University of Oslo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java	2012-01-04 04:55:19 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java	2012-01-06 04:56:54 +0000
@@ -169,9 +169,14 @@
     {
         return programStageInstanceStore.getProgramStageInstances( patient, completed );
     }
-    
-    public List<ProgramStageInstance> getProgramStageInstances( ProgramInstance programInstance, int min, int max )
-    {
-        return programStageInstanceStore.getProgramStageInstances( programInstance, min, max );
+
+    public List<ProgramStageInstance> getProgramStageInstances( ProgramInstance programInstance, Date executionDate, int min, int max )
+    {
+        return programStageInstanceStore.getProgramStageInstances( programInstance, executionDate, min, max );
+    }
+
+    public int countProgramStageInstances( ProgramInstance programInstance, Date executionDate )
+    {
+        return programStageInstanceStore.countProgramStageInstances( programInstance, executionDate );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2012-01-04 04:55:19 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2012-01-06 04:56:54 +0000
@@ -32,7 +32,7 @@
 import java.util.List;
 
 import org.hibernate.Query;
-import org.hibernate.criterion.Order;
+import org.hibernate.criterion.Projections;
 import org.hibernate.criterion.Restrictions;
 import org.hisp.dhis.hibernate.HibernateGenericStore;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
@@ -144,12 +144,20 @@
 
         return getQuery( hql ).setEntity( "patient", patient ).setBoolean( "completed", completed ).list();
     }
-    
+
     @SuppressWarnings( "unchecked" )
-    public List<ProgramStageInstance> getProgramStageInstances( ProgramInstance programInstance, int min, int max )
-    {
-        return getCriteria( Restrictions.eq( "programInstance.id", programInstance.getId() ) )
-            .addOrder(Order.desc("id")).setFirstResult( min )
-            .setMaxResults( max ).list();
+    public List<ProgramStageInstance> getProgramStageInstances( ProgramInstance programInstance, Date executionDate,
+        int min, int max )
+    {
+        return getCriteria( Restrictions.eq( "programInstance.id", programInstance.getId() ),
+            Restrictions.eq( "executionDate", executionDate ) ).setFirstResult( min ).setMaxResults( max ).list();
+    }
+
+    public int countProgramStageInstances( ProgramInstance programInstance, Date executionDate )
+    {
+        Number rs = (Number) getCriteria( Restrictions.eq( "programInstance.id", programInstance.getId() ),
+            Restrictions.eq( "executionDate", executionDate ) ).setProjection( Projections.rowCount() ).uniqueResult();
+
+        return rs != null ? rs.intValue() : 0;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetEventsByProgramAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetEventsByProgramAction.java	2012-01-04 04:55:19 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetEventsByProgramAction.java	2012-01-06 04:56:54 +0000
@@ -28,7 +28,9 @@
 package org.hisp.dhis.caseentry.action.caseentry;
 
 import java.util.Collection;
+import java.util.Date;
 
+import org.hisp.dhis.i18n.I18nFormat;
 import org.hisp.dhis.paging.ActionPagingSupport;
 import org.hisp.dhis.program.ProgramInstance;
 import org.hisp.dhis.program.ProgramInstanceService;
@@ -73,6 +75,20 @@
         this.programInstanceId = programInstanceId;
     }
 
+    private String executionDate;
+
+    public void setExecutionDate( String executionDate )
+    {
+        this.executionDate = executionDate;
+    }
+
+    private I18nFormat format;
+
+    public void setFormat( I18nFormat format )
+    {
+        this.format = format;
+    }
+
     private Collection<ProgramStageInstance> programStageInstances;
 
     public Collection<ProgramStageInstance> getProgramStageInstances()
@@ -96,12 +112,14 @@
     {
         ProgramInstance programInstance = programInstanceService.getProgramInstance( programInstanceId );
 
-        total = programInstance.getProgramStageInstances().size();
+        Date dateValue = format.parseDate( executionDate );
+
+        total = programStageInstanceService.countProgramStageInstances( programInstance, dateValue );
 
         this.paging = createPaging( total );
 
-        programStageInstances = programStageInstanceService.getProgramStageInstances( programInstance, paging
-            .getStartPos(), paging.getPageSize() );
+        programStageInstances = programStageInstanceService.getProgramStageInstances( programInstance, dateValue,
+            paging.getStartPos(), paging.getPageSize() );
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm	2012-01-04 04:55:19 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm	2012-01-06 04:56:54 +0000
@@ -37,7 +37,6 @@
 #parse( "dhis-web-commons/loader/loader.vm" )
 
 <div id="dataEntryFormDiv"> </div>
-<div id='viewEventDiv'></div>
 
 <script>
 	var i18n_please_select = '[ ' + '$encoder.jsEscape( $i18n.getString( "please_select" ) , "'" )' + ' ]';

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/historyAnonymousEvents.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/historyAnonymousEvents.vm	2012-01-04 04:55:19 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/historyAnonymousEvents.vm	2012-01-06 04:56:54 +0000
@@ -1,18 +1,26 @@
 <h2>$i18n.getString('history_events')</h2>
-<table>
+
+<table width='100%'>
 	#foreach( $programStageInstance in $programStageInstances)
-	<tr>	
+	<tr>
+		<td id='td$programStageInstance.id'></td>
+	</tr>
+	#end
+	
+	<tr>
+		<td>&nbsp;</td>
+	</tr>
+	<tr>
 		<td>
-			<a href="javascript:viewRecords( $programStageInstance.id )">
-				$format.formatDate( $programStageInstance.executionDate )
-			</a>
+			<div class="paging-container">
+				#parse( "/dhis-web-commons/paging/paging.vm" )
+			</div>
 		</td>
 	</tr>
+</table>
+
+<script>
+	#foreach( $programStageInstance in $programStageInstances)
+		viewRecords( '$programStageInstance.id', 'td$programStageInstance.id' );
 	#end
-	
-	<tr>
-		<div class="paging-container">
-			#parse( "/dhis-web-commons/paging/paging.vm" )
-		</div>
-	</tr>
-</table>
\ No newline at end of file
+</script>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2012-01-04 04:55:19 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2012-01-06 04:56:54 +0000
@@ -57,6 +57,7 @@
 	if( programId == '' )
 	{
 		disable('showEventBtn');
+		$('#executionDate').unbind('change');
 		return;
 	}
 	
@@ -71,6 +72,7 @@
 			enable('showEventBtn');
 			setFieldValue( 'programStageId', json.programStages[0].id );
 			setFieldValue( 'selectedProgramId', programId );
+			$('#executionDate').bind('change');
 			
 			if( json.programStageInstances.length > 0 )
 			{
@@ -199,27 +201,24 @@
 isAjax = true;
 function showHistoryEvents()
 {
+	$('#executionDate').unbind('change');
 	contentDiv = 'dataEntryFormDiv';
 	$( '#dataEntryFormDiv' ).load( "getEventsByProgram.action", 
 		{ 
-			programInstanceId: jQuery('select[id=programId] option:selected').attr('programInstanceId')
+			programInstanceId: jQuery('select[id=programId] option:selected').attr('programInstanceId'),
+			executionDate: getFieldValue('executionDate')
 		},function( )
 		{
 		});
 }
 
 
-function viewRecords( programStageInstanceId ) 
+function viewRecords( programStageInstanceId, div ) 
 {
-	$('#viewEventDiv' )
-		.load( 'viewAnonymousEvents.action?programStageInstanceId=' + programStageInstanceId )
-		.dialog({
-			title: i18n_event_information,
-			maximize: true, 
-			closable: true,
-			modal:true,
-			overlay:{background:'#000000', opacity:0.1},
-			width: 800,
-			height: 400
+	$( '#' + div )
+		.load( 'viewAnonymousEvents.action?programStageInstanceId=' + programStageInstanceId ,{}
+		,function( )
+		{
+			$('#executionDate').unbind('change');
 		});
 }
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js	2012-01-03 02:47:19 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js	2012-01-06 04:56:54 +0000
@@ -80,7 +80,6 @@
 function showCriteria()
 {
 	$( "#criteria" ).show( "fast" );
-	$( "#content" ).hide();
 }
 
 function hideCriteria()