← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2206: Bug Fixed in Dhis-web-Excel-Import

 

------------------------------------------------------------
revno: 2206
committer: Mithilesh Kumar Thakur<mithilesh.hisp@xxxxxxxxx>
branch nick: trunk
timestamp: Thu 2010-09-23 13:57:50 +0530
message:
  Bug Fixed in Dhis-web-Excel-Import
modified:
  local/in/dhis-web-excelimport/src/main/java/org/hisp/dhis/excelimport/action/GetReportsAction.java
  local/in/dhis-web-excelimport/src/main/resources/struts.xml
  local/in/dhis-web-excelimport/src/main/webapp/dhis-web-excelimport/excelImportForm.vm
  local/in/dhis-web-excelimport/src/main/webapp/dhis-web-excelimport/javascript/reports.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/in/dhis-web-excelimport/src/main/java/org/hisp/dhis/excelimport/action/GetReportsAction.java'
--- local/in/dhis-web-excelimport/src/main/java/org/hisp/dhis/excelimport/action/GetReportsAction.java	2010-08-17 08:35:20 +0000
+++ local/in/dhis-web-excelimport/src/main/java/org/hisp/dhis/excelimport/action/GetReportsAction.java	2010-09-23 08:27:50 +0000
@@ -127,6 +127,7 @@
                 ouName = orgUnit.getShortName();
                 System.out.println( ouName );
                 getSelectedReportList( reportListFileName );
+                //System.out.println("\n\n Report File Name:" + reportListFileName );
             }
             catch ( Exception e )
             {

=== modified file 'local/in/dhis-web-excelimport/src/main/resources/struts.xml'
--- local/in/dhis-web-excelimport/src/main/resources/struts.xml	2010-09-08 12:56:29 +0000
+++ local/in/dhis-web-excelimport/src/main/resources/struts.xml	2010-09-23 08:27:50 +0000
@@ -64,8 +64,7 @@
 			class="org.hisp.dhis.excelimport.action.GetReportsAction">
 			<result name="success" type="velocity-xml">
 				/dhis-web-excelimport/responseImportReport.vm</result>
-			<param name="javascripts">
-				../dhis-web-commons/ouwt/ouwt.js,javascript/reports.js,../dhis-web-commons/lists/lists.js,javascript/hashtable.js</param>
+			<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/reports.js,../dhis-web-commons/lists/lists.js,javascript/hashtable.js</param>
 			<param name="onExceptionReturn">plainTextError</param>
 		</action>
 		

=== modified file 'local/in/dhis-web-excelimport/src/main/webapp/dhis-web-excelimport/excelImportForm.vm'
--- local/in/dhis-web-excelimport/src/main/webapp/dhis-web-excelimport/excelImportForm.vm	2010-09-08 12:56:29 +0000
+++ local/in/dhis-web-excelimport/src/main/webapp/dhis-web-excelimport/excelImportForm.vm	2010-09-23 08:27:50 +0000
@@ -46,7 +46,7 @@
             }
     );
 	
-	
+/*	
 function orgUnitHasBeenSelected( orgUnitIds )
 {    
 	if(orgUnitIds == null || orgUnitIds == "" )
@@ -57,8 +57,8 @@
 	if(orgUnitIds != null)
 		getOUDetails(orgUnitIds);	
 }
-
-selection.setListenerFunction( orgUnitHasBeenSelected );
+*/
+//selection.setListenerFunction( orgUnitHasBeenSelected );
 
 </script>
 
@@ -101,6 +101,7 @@
             <td class="NormalB">
                 Reports :<br />
                 <select id="reportList" name="reportList" style="width:200px" class="{validate:{required:true}}">
+                	
                 </select>
             </td>
         </tr>

=== modified file 'local/in/dhis-web-excelimport/src/main/webapp/dhis-web-excelimport/javascript/reports.js'
--- local/in/dhis-web-excelimport/src/main/webapp/dhis-web-excelimport/javascript/reports.js	2010-09-10 11:35:58 +0000
+++ local/in/dhis-web-excelimport/src/main/webapp/dhis-web-excelimport/javascript/reports.js	2010-09-23 08:27:50 +0000
@@ -104,6 +104,7 @@
   var ouId = document.reportForm.ouIDTB.value;
   var reportListFileName = document.reportForm.reportListFileNameTB.value;
   
+  
   getReports(ouId, reportListFileName);
 }
 
@@ -111,11 +112,13 @@
 { 
   var periodTypeList = document.getElementById( "periodTypeId" );
   var periodType = periodTypeList.options[ periodTypeList.selectedIndex ].value;
+  //var reportListFileName = document.reportForm.reportListFileNameTB.value;
   var autogenvalue = document.getElementById( "autogen" ).value;
+ // alert("file:" +reportListFileName + ", periodType :" + periodType + ", ouid:" + ouId);
           
   if ( periodType != "NA" && ouId != null && ouId != "" )
   { 
-	   $.post("getReports.action",
+	  $.post("getReports.action",
 		{
 			periodType : periodType,
 			ouId : ouId,
@@ -127,6 +130,7 @@
 			getReportsReceived(data);
 		},'xml');
   }
+
 }
 
 function getReportsReceived( xmlObject )
@@ -156,7 +160,8 @@
 		option.value = id;
 		option.text = name;
 		reportsList.add( option, null );
-		
+	
+		//$("#reportList").append("<option value='"+ id +"'>" + name + "</option>");
 		reportModels.put( id, model );
 		reportFileNames.put( id, fileName );
 		checkerFileNames.put( id, checkerFileName );