=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ta/action/GenerateTabularAnalysisResultAction.java' --- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ta/action/GenerateTabularAnalysisResultAction.java 2010-09-08 08:13:41 +0000 +++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ta/action/GenerateTabularAnalysisResultAction.java 2010-09-08 12:56:29 +0000 @@ -288,7 +288,7 @@ int startCol = 0; int headerRow = 1; int headerCol = 0; - + String raFolderName = configurationService.getConfigurationByKey( Configuration_IN.KEY_REPORTFOLDER ).getValue(); String outputReportPath = System.getenv( "DHIS2_HOME" ) + File.separator + raFolderName + File.separator + "output" + File.separator + UUID.randomUUID().toString() + ".xls"; WritableWorkbook outputReportWorkbook = Workbook.createWorkbook( new File( outputReportPath ) ); === modified file 'local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/SelectAction.java' --- local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/SelectAction.java 2010-09-01 09:05:14 +0000 +++ local/in/dhis-web-dataentry-linelisting/src/main/java/org/hisp/dhis/den/action/SelectAction.java 2010-09-08 12:56:29 +0000 @@ -280,7 +280,8 @@ // --------------------------------------------------------------------- dataSets = new ArrayList( dataSetService.getDataSetsBySource( organisationUnit ) ); - +System.out.println("\n\n\n +++++++++++++ \n organisationUnit : " + organisationUnit); +System.out.println("\n dataSets : " + dataSets); // --------------------------------------------------------------------- // Remove DataSets which don't have a CalendarPeriodType or are locked // --------------------------------------------------------------------- === modified file 'local/in/dhis-web-dataentry-linelisting/src/main/webapp/dhis-web-dataentry-national/javascript/form.js' --- local/in/dhis-web-dataentry-linelisting/src/main/webapp/dhis-web-dataentry-national/javascript/form.js 2010-06-04 11:50:05 +0000 +++ local/in/dhis-web-dataentry-linelisting/src/main/webapp/dhis-web-dataentry-national/javascript/form.js 2010-09-08 12:56:29 +0000 @@ -166,7 +166,10 @@ for ( var i = 0, input; input = inputs[i]; i++ ) { - input.addEventListener('focus', valueFocus, false); + $('#'+ input.name).focus(function() { + valueFocus(input); + }); + //input.addEventListener('focus', valueFocus, false); } var selects = document.getElementsByName( "entryselect" ); @@ -180,7 +183,6 @@ function viewHistory( dataElementId ) { - window.open( 'viewHistory.action?dataElementId=' + dataElementId + '&optionComboId=' + ocId, '_blank', 'width=560,height=550,scrollbars=yes' ); } @@ -195,7 +197,8 @@ function valueFocus(e) { //Retrieve the data element id from the id of the field - var baseId = e.target.id; + //var baseId = e.target.id; + var baseId = e.id; var opId = baseId; var str = baseId; === modified file 'local/in/dhis-web-excelimport/src/main/resources/struts.xml' --- local/in/dhis-web-excelimport/src/main/resources/struts.xml 2010-08-17 08:35:20 +0000 +++ local/in/dhis-web-excelimport/src/main/resources/struts.xml 2010-09-08 12:56:29 +0000 @@ -48,21 +48,21 @@ - + /dhis-web-excelimport/responseDataElement.vm plainTextError - + /dhis-web-excelimport/responsePeriod.vm plainTextError - + /dhis-web-excelimport/responseImportReport.vm ../dhis-web-commons/ouwt/ouwt.js,javascript/reports.js,../dhis-web-commons/lists/lists.js,javascript/hashtable.js @@ -71,7 +71,7 @@ - + /dhis-web-excelimport/responseOrgUnit.vm plainTextError === modified file 'local/in/dhis-web-excelimport/src/main/webapp/dhis-web-excelimport/css/lists.js' --- local/in/dhis-web-excelimport/src/main/webapp/dhis-web-excelimport/css/lists.js 2010-06-04 11:50:05 +0000 +++ local/in/dhis-web-excelimport/src/main/webapp/dhis-web-excelimport/css/lists.js 2010-09-08 12:56:29 +0000 @@ -10,12 +10,22 @@ if ( dataElementGroupId != null ) { - var url = "../dhis-web-commons-ajax/getDataElements.action?id=" + dataElementGroupId + "&aggregate=true"; + /* var url = "../dhis-web-commons-ajax/getDataElements.action?id=" + dataElementGroupId + "&aggregate=true"; var request = new Request(); request.setResponseTypeXML( 'dataElement' ); request.setCallbackSuccess( getDataElementsReceived ); - request.send( url ); + request.send( url ); */ + + $.post("../dhis-web-commons-ajax/getDataElements.action", + { + id :dataElementGroupId, + aggregate : "true" + }, + function (data) + { + getDataElementsReceived(data); + },'xml'); } } @@ -50,12 +60,22 @@ if ( categoryComboId != null ) { - var url = "../dhis-web-commons-ajax/getDataElements.action?categoryComboId=" + categoryComboId + "&aggregate=true"; + /* var url = "../dhis-web-commons-ajax/getDataElements.action?categoryComboId=" + categoryComboId + "&aggregate=true"; var request = new Request(); request.setResponseTypeXML( 'dataElement' ); request.setCallbackSuccess( getCategoryComboDataElementsReceived ); - request.send( url ); + request.send( url ); */ + + $.post("../dhis-web-commons-ajax/getDataElements.action", + { + categoryComboId :categoryComboId, + aggregate : "true" + }, + function (data) + { + getCategoryComboDataElementsReceived(data); + },'xml'); } } @@ -88,12 +108,22 @@ if ( indicatorGroupId != null ) { - var url = "../dhis-web-commons-ajax/getIndicators.action?id=" + indicatorGroupId; + /* var url = "../dhis-web-commons-ajax/getIndicators.action?id=" + indicatorGroupId; var request = new Request(); request.setResponseTypeXML( 'indicator' ); request.setCallbackSuccess( getIndicatorsReceived ); - request.send( url ); + request.send( url ); */ + + $.post("../dhis-web-commons-ajax/getIndicators.action", + { + id :indicatorGroupId + }, + function (data) + { + getIndicatorsReceived(data); + },'xml'); + } } @@ -128,12 +158,22 @@ if ( organisationUnitLevel != null ) { - var url = "../dhis-web-commons-ajax/getOrganisationUnits.action?level=" + organisationUnitLevel; + /* var url = "../dhis-web-commons-ajax/getOrganisationUnits.action?level=" + organisationUnitLevel; var request = new Request(); request.setResponseTypeXML( 'organisationUnit' ); request.setCallbackSuccess( getOrganisationUnitsReceived ); - request.send( url ); + request.send( url ); */ + + $.post("../dhis-web-commons-ajax/getOrganisationUnits.action", + { + level :organisationUnitLevel + }, + function (data) + { + getOrganisationUnitsReceived(data); + },'xml'); + } } @@ -168,12 +208,22 @@ if ( organisationUnitLevel != null ) { - var url = "../dhis-web-commons-ajax/getOrganisationUnits.action?level=" + organisationUnitLevel; + /* var url = "../dhis-web-commons-ajax/getOrganisationUnits.action?level=" + organisationUnitLevel; var request = new Request(); request.setResponseTypeXML( 'organisationUnit' ); request.setCallbackSuccess( getOrganisationUnitsToSelectedReceived ); - request.send( url ); + request.send( url ); */ + + $.post("../dhis-web-commons-ajax/getOrganisationUnits.action", + { + level :organisationUnitLevel + }, + function (data) + { + getOrganisationUnitsToSelectedReceived(data); + },'xml'); + } } @@ -204,12 +254,22 @@ if ( organisationUnitId != null ) { - var url = "../dhis-web-commons-ajax/getOrganisationUnitChildren.action?id=" + organisationUnitId; + /* var url = "../dhis-web-commons-ajax/getOrganisationUnitChildren.action?id=" + organisationUnitId; var request = new Request(); request.setResponseTypeXML( 'organisationUnit' ); request.setCallbackSuccess( getOrganisationUnitChildrenReceived ); - request.send( url ); + request.send( url ); */ + + $.post("../dhis-web-commons-ajax/getOrganisationUnitChildren.action", + { + id :organisationUnitId + }, + function (data) + { + getOrganisationUnitChildrenReceived(data); + },'xml'); + } } @@ -242,12 +302,21 @@ if ( periodTypeId != null ) { - var url = "../dhis-web-commons-ajax/getPeriods.action?name=" + periodTypeId; + /* var url = "../dhis-web-commons-ajax/getPeriods.action?name=" + periodTypeId; var request = new Request(); request.setResponseTypeXML( 'period' ); request.setCallbackSuccess( getPeriodsReceived ); - request.send( url ); + request.send( url ); */ + + $.post("../dhis-web-commons-ajax/getPeriods.action", + { + name : periodTypeId + }, + function (data) + { + getPeriodsReceived(data); + },'xml'); } } @@ -282,12 +351,21 @@ if ( periodTypeId != null ) { - var url = "../dhis-web-commons-ajax/getPeriods.action?name=" + periodTypeId; + /* var url = "../dhis-web-commons-ajax/getPeriods.action?name=" + periodTypeId; var request = new Request(); request.setResponseTypeXML( 'period' ); request.setCallbackSuccess( getPeriodsToSelectedReceived ); - request.send( url ); + request.send( url ); */ + + $.post("../dhis-web-commons-ajax/getPeriods.action", + { + name : periodTypeId + }, + function (data) + { + getPeriodsToSelectedReceived(data); + },'xml'); } } === 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-08-17 08:35:20 +0000 +++ local/in/dhis-web-excelimport/src/main/webapp/dhis-web-excelimport/excelImportForm.vm 2010-09-08 12:56:29 +0000 @@ -45,7 +45,21 @@ jQuery("#name").focus(); } ); - + + +function orgUnitHasBeenSelected( orgUnitIds ) +{ + if(orgUnitIds == null || orgUnitIds == "" ) + { + return; + } + + if(orgUnitIds != null) + getOUDetails(orgUnitIds); +} + +selection.setListenerFunction( orgUnitHasBeenSelected ); +

Excel Import Form

=== modified file 'local/in/dhis-web-excelimport/src/main/webapp/dhis-web-excelimport/javascript/lists.js' --- local/in/dhis-web-excelimport/src/main/webapp/dhis-web-excelimport/javascript/lists.js 2010-06-04 11:50:05 +0000 +++ local/in/dhis-web-excelimport/src/main/webapp/dhis-web-excelimport/javascript/lists.js 2010-09-08 12:56:29 +0000 @@ -10,12 +10,22 @@ if ( dataElementGroupId != null ) { - var url = "../dhis-web-commons-ajax/getDataElements.action?id=" + dataElementGroupId + "&aggregate=true"; + /* var url = "../dhis-web-commons-ajax/getDataElements.action?id=" + dataElementGroupId + "&aggregate=true"; var request = new Request(); request.setResponseTypeXML( 'dataElement' ); request.setCallbackSuccess( getDataElementsReceived ); - request.send( url ); + request.send( url ); */ + + $.post("../dhis-web-commons-ajax/getDataElements.action", + { + id : dataElementGroupId, + aggregate : "true" + }, + function (data) + { + getDataElementsReceived(data); + },'xml'); } } @@ -50,12 +60,22 @@ if ( categoryComboId != null ) { - var url = "../dhis-web-commons-ajax/getDataElements.action?categoryComboId=" + categoryComboId + "&aggregate=true"; + /* var url = "../dhis-web-commons-ajax/getDataElements.action?categoryComboId=" + categoryComboId + "&aggregate=true"; var request = new Request(); request.setResponseTypeXML( 'dataElement' ); request.setCallbackSuccess( getCategoryComboDataElementsReceived ); - request.send( url ); + request.send( url ); */ + + $.post("../dhis-web-commons-ajax/getDataElements.action", + { + categoryComboId : categoryComboId, + aggregate : "true" + }, + function (data) + { + getCategoryComboDataElementsReceived(data); + },'xml'); } } @@ -88,12 +108,21 @@ if ( indicatorGroupId != null ) { - var url = "../dhis-web-commons-ajax/getIndicators.action?id=" + indicatorGroupId; + /* var url = "../dhis-web-commons-ajax/getIndicators.action?id=" + indicatorGroupId; var request = new Request(); request.setResponseTypeXML( 'indicator' ); request.setCallbackSuccess( getIndicatorsReceived ); - request.send( url ); + request.send( url ); */ + + $.post("../dhis-web-commons-ajax/getIndicators.action", + { + id : indicatorGroupId + }, + function (data) + { + getIndicatorsReceived(data); + },'xml'); } } @@ -128,12 +157,22 @@ if ( organisationUnitLevel != null ) { - var url = "../dhis-web-commons-ajax/getOrganisationUnits.action?level=" + organisationUnitLevel; + /* var url = "../dhis-web-commons-ajax/getOrganisationUnits.action?level=" + organisationUnitLevel; var request = new Request(); request.setResponseTypeXML( 'organisationUnit' ); request.setCallbackSuccess( getOrganisationUnitsReceived ); - request.send( url ); + request.send( url ); */ + + $.post("../dhis-web-commons-ajax/getOrganisationUnits.action", + { + level : organisationUnitLevel + }, + function (data) + { + getOrganisationUnitsReceived(data); + },'xml'); + } } @@ -168,12 +207,22 @@ if ( organisationUnitLevel != null ) { - var url = "../dhis-web-commons-ajax/getOrganisationUnits.action?level=" + organisationUnitLevel; + /* var url = "../dhis-web-commons-ajax/getOrganisationUnits.action?level=" + organisationUnitLevel; var request = new Request(); request.setResponseTypeXML( 'organisationUnit' ); request.setCallbackSuccess( getOrganisationUnitsToSelectedReceived ); - request.send( url ); + request.send( url ); */ + + $.post("../dhis-web-commons-ajax/getOrganisationUnits.action", + { + level : organisationUnitLevel + }, + function (data) + { + getOrganisationUnitsToSelectedReceived(data); + },'xml'); + } } @@ -204,12 +253,21 @@ if ( organisationUnitId != null ) { - var url = "../dhis-web-commons-ajax/getOrganisationUnitChildren.action?id=" + organisationUnitId; + /* var url = "../dhis-web-commons-ajax/getOrganisationUnitChildren.action?id=" + organisationUnitId; var request = new Request(); request.setResponseTypeXML( 'organisationUnit' ); request.setCallbackSuccess( getOrganisationUnitChildrenReceived ); - request.send( url ); + request.send( url ); */ + + $.post("../dhis-web-commons-ajax/getOrganisationUnitChildren.action", + { + id : organisationUnitId + }, + function (data) + { + getOrganisationUnitChildrenReceived(data); + },'xml'); } } @@ -242,12 +300,21 @@ if ( periodTypeId != null ) { - var url = "../dhis-web-commons-ajax/getPeriods.action?name=" + periodTypeId; + /* var url = "../dhis-web-commons-ajax/getPeriods.action?name=" + periodTypeId; var request = new Request(); request.setResponseTypeXML( 'period' ); request.setCallbackSuccess( getPeriodsReceived ); - request.send( url ); + request.send( url ); */ + + $.post("../dhis-web-commons-ajax/getPeriods.action", + { + name : periodTypeId + }, + function (data) + { + getPeriodsReceived(data); + },'xml'); } } @@ -282,12 +349,21 @@ if ( periodTypeId != null ) { - var url = "../dhis-web-commons-ajax/getPeriods.action?name=" + periodTypeId; + /* var url = "../dhis-web-commons-ajax/getPeriods.action?name=" + periodTypeId; var request = new Request(); request.setResponseTypeXML( 'period' ); request.setCallbackSuccess( getPeriodsToSelectedReceived ); - request.send( url ); + request.send( url ); */ + + $.post("../dhis-web-commons-ajax/getPeriods.action", + { + name : periodTypeId + }, + function (data) + { + getPeriodsToSelectedReceived(data); + },'xml'); } } === 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-08-17 08:35:20 +0000 +++ local/in/dhis-web-excelimport/src/main/webapp/dhis-web-excelimport/javascript/reports.js 2010-09-08 12:56:29 +0000 @@ -2,19 +2,27 @@ function getOUDetails(orgUnitIds) { - var url = "getOrgUnitDetails.action?orgUnitId=" + orgUnitIds; + /* var url = "getOrgUnitDetails.action?orgUnitId=" + orgUnitIds; var request = new Request(); request.setResponseTypeXML( 'orgunit' ); request.setCallbackSuccess( getOUDetailsRecevied ); - request.send( url ); + request.send( url ); */ + + $.post("getOrgUnitDetails.action", + { + orgUnitId : orgUnitIds + }, + function (data) + { + getOUDetailsRecevied(data); + },'xml'); getReports(); } function getOUDetailsRecevied(xmlObject) -{ - +{ var orgUnits = xmlObject.getElementsByTagName("orgunit"); for ( var i = 0; i < orgUnits.length; i++ ) @@ -23,9 +31,8 @@ var orgUnitName = orgUnits[ i ].getElementsByTagName("name")[0].firstChild.nodeValue; var level = orgUnits[ i ].getElementsByTagName("level")[0].firstChild.nodeValue; - document.reportForm.ouNameTB.value = orgUnitName; - document.reportForm.ouLevelTB.value = level; + //document.reportForm.ouLevelTB.value = level; } } @@ -39,11 +46,20 @@ if ( dataElementGroupId != null ) { - var url = "getDataElements.action?id=" + dataElementGroupId; + /* var url = "getDataElements.action?id=" + dataElementGroupId; var request = new Request(); request.setResponseTypeXML('dataElement'); request.setCallbackSuccess(getDataElementsReceived); - request.send(url); + request.send(url); */ + + $.post("getDataElements.action", + { + id : dataElementGroupId + }, + function (data) + { + getDataElementsReceived(data); + },'xml'); } }// getDataElements end @@ -84,12 +100,21 @@ if ( periodTypeId != "NA" ) { - var url = "getPeriods.action?id=" + periodTypeId; + /* var url = "getPeriods.action?id=" + periodTypeId; var request = new Request(); request.setResponseTypeXML( 'period' ); request.setCallbackSuccess( getPeriodsReceived ); - request.send( url ); + request.send( url ); */ + + $.post("getPeriods.action", + { + id : periodTypeId + }, + function (data) + { + getPeriodsReceived(data); + },'xml'); } else { @@ -110,22 +135,37 @@ if ( periodType != "NA" && ouId != null && ouId != "" ) { - var url = "getReports.action?periodType=" + periodType + "&ouId="+ouId + "&reportListFileName="+reportListFileName+"&autogenrep="+autogenvalue; + /* var url = "getReports.action?periodType=" + periodType + "&ouId="+ouId + "&reportListFileName="+reportListFileName+"&autogenrep="+autogenvalue; var request = new Request(); request.setResponseTypeXML( 'report' ); request.setCallbackSuccess( getReportsReceived ); - request.send( url ); + request.send( url ); */ + + $.post("getReports.action", + { + periodType : periodType, + ouId : ouId, + reportListFileName : reportListFileName, + autogenrep : autogenvalue + }, + function (data) + { + getReportsReceived(data); + },'xml'); } } function getReportsReceived( xmlObject ) { - var reportsList = document.getElementById( "reportList" ); - var orgUnitName = document.getElementById( "ouNameTB" ); + var reportsList = byId( "reportList" ); + var orgUnitName = byId( "ouNameTB" ); clearList( reportsList ); + if(xmlObject == null){ + return; + } var reports = xmlObject.getElementsByTagName( "report" ); for ( var i = 0; i < reports.length; i++) {