=== modified file 'local/vn/dhis-service-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/ExportReport.java' --- local/vn/dhis-service-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/ExportReport.java 2012-04-26 18:25:07 +0000 +++ local/vn/dhis-service-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/ExportReport.java 2012-11-16 11:04:48 +0000 @@ -34,6 +34,7 @@ import java.util.Set; import org.hisp.dhis.common.BaseIdentifiableObject; +import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.user.UserAuthorityGroup; @@ -56,11 +57,15 @@ private Set organisationAssocitions; + private Set dataSets; + + private Collection userRoles; + private String group; private String excelTemplateFile; - private Collection userRoles; + private String createdBy = "[unknown]"; // ------------------------------------------------------------------------- // Constructors @@ -122,7 +127,7 @@ // ------------------------------------------------------------------------- public abstract String getReportType(); - + public abstract List getItemTypes(); // ------------------------------------------------------------------------- @@ -236,6 +241,19 @@ return items; } + public void updateDataSetMembers( Set dataSetList ) + { + for ( DataSet ds : new HashSet( dataSets ) ) + { + if ( !dataSetList.contains( ds ) ) + { + dataSets.remove( ds ); + } + } + + dataSets.addAll( dataSetList ); + } + // ------------------------------------------------------------------------- // Getters and setters // ------------------------------------------------------------------------- @@ -320,6 +338,26 @@ this.organisationAssocitions = organisationAssocitions; } + public Set getDataSets() + { + return dataSets == null ? new HashSet() : dataSets; + } + + public void setDataSets( Set dataSets ) + { + this.dataSets = dataSets; + } + + public Collection getUserRoles() + { + return userRoles; + } + + public void setUserRoles( Collection userRoles ) + { + this.userRoles = userRoles; + } + public String getGroup() { return group; @@ -340,14 +378,13 @@ this.excelTemplateFile = excelTemplateFile; } - public Collection getUserRoles() - { - return userRoles; - } - - public void setUserRoles( Collection userRoles ) - { - this.userRoles = userRoles; - } - + public String getCreatedBy() + { + return createdBy; + } + + public void setCreatedBy( String createdBy ) + { + this.createdBy = createdBy; + } } === modified file 'local/vn/dhis-service-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/hibernate/ExportReport.hbm.xml' --- local/vn/dhis-service-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/hibernate/ExportReport.hbm.xml 2012-07-04 10:12:19 +0000 +++ local/vn/dhis-service-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/hibernate/ExportReport.hbm.xml 2012-11-16 11:04:48 +0000 @@ -15,6 +15,7 @@ + @@ -24,13 +25,19 @@ + column="organisationid" foreign-key="fk_reportexcel_organisation"/> + + + + + + column="userroleid" foreign-key="fk_reportexcel_userroles"/> === modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/action/GenerateReportOrgGroupListingAction.java' --- local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/action/GenerateReportOrgGroupListingAction.java 2012-11-01 07:20:12 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/action/GenerateReportOrgGroupListingAction.java 2012-11-16 11:04:48 +0000 @@ -31,11 +31,13 @@ import java.util.Collection; import java.util.Collections; import java.util.HashMap; +import java.util.Iterator; import java.util.List; import java.util.Map; import org.apache.poi.ss.usermodel.Sheet; import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator; +import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.organisationunit.OrganisationUnitGroup; import org.hisp.dhis.organisationunit.OrganisationUnitLevel; @@ -139,6 +141,7 @@ Collection membersOfGroup = null; Collection organisationUnitsAtLevel = null; Collection childrens = organisationUnit.getChildren(); + Collection dataSets = exportReport.getDataSets(); for ( OrganisationUnitGroup organisationUnitGroup : exportReport.getOrganisationUnitGroups() ) { @@ -165,6 +168,16 @@ organisationUnits.retainAll( childrens ); } + Iterator iterater = organisationUnits.iterator(); + + while ( iterater.hasNext() ) + { + if ( !iterater.next().getDataSets().retainAll( dataSets ) ) + { + iterater.remove(); + } + } + Collections.sort( organisationUnits, new IdentifiableObjectNameComparator() ); childrenGroupMap.put( organisationUnitGroup.getId(), organisationUnits ); @@ -173,6 +186,7 @@ /** * Garbage */ + dataSets = null; childrens = null; membersOfGroup = null; organisationUnitLevel = null; === modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exportreport/action/AddExportReportAction.java' --- local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exportreport/action/AddExportReportAction.java 2012-04-28 16:58:08 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exportreport/action/AddExportReportAction.java 2012-11-16 11:04:48 +0000 @@ -26,14 +26,20 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import java.util.HashSet; +import java.util.Set; + +import org.hisp.dhis.dataset.DataSet; +import org.hisp.dhis.dataset.DataSetService; +import org.hisp.dhis.reportsheet.ExportReport; import org.hisp.dhis.reportsheet.ExportReportAttribute; -import org.hisp.dhis.reportsheet.ExportReportService; -import org.hisp.dhis.reportsheet.ExportReport; import org.hisp.dhis.reportsheet.ExportReportCategory; import org.hisp.dhis.reportsheet.ExportReportNormal; import org.hisp.dhis.reportsheet.ExportReportOrganizationGroupListing; import org.hisp.dhis.reportsheet.ExportReportPeriodColumnListing; +import org.hisp.dhis.reportsheet.ExportReportService; import org.hisp.dhis.reportsheet.ExportReportVerticalCategory; +import org.hisp.dhis.user.CurrentUserService; import com.opensymphony.xwork2.Action; @@ -56,6 +62,20 @@ this.exportReportService = exportReportService; } + private CurrentUserService currentUserService; + + public void setCurrentUserService( CurrentUserService currentUserService ) + { + this.currentUserService = currentUserService; + } + + private DataSetService dataSetService; + + public void setDataSetService( DataSetService dataSetService ) + { + this.dataSetService = dataSetService; + } + // ------------------------------------------------------------------------- // Input & Output // ------------------------------------------------------------------------- @@ -78,6 +98,8 @@ private String group; + private Set dataSetIds = new HashSet(); + // ------------------------------------------------------------------------- // Getter & Setter // ------------------------------------------------------------------------- @@ -127,6 +149,15 @@ this.organisationCol = organisationCol; } + public void setDataSetIds( Set dataSetIds ) + { + this.dataSetIds = dataSetIds; + } + + // ------------------------------------------------------------------------- + // Action implementation + // ------------------------------------------------------------------------- + public String execute() throws Exception { @@ -176,6 +207,20 @@ exportReport.setOrganisationRow( this.organisationRow ); } + if ( dataSetIds != null && !dataSetIds.isEmpty() ) + { + exportReport.setDataSets( new HashSet( dataSetService.getDataSets( dataSetIds ) ) ); + } + + String createdBy = currentUserService.getCurrentUsername(); + + if ( createdBy == null ) + { + createdBy = "[unknown]"; + } + + exportReport.setCreatedBy( createdBy ); + exportReportService.addExportReport( exportReport ); return SUCCESS; === added file 'local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exportreport/action/CheckPermissionAction.java' --- local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exportreport/action/CheckPermissionAction.java 1970-01-01 00:00:00 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exportreport/action/CheckPermissionAction.java 2012-11-16 11:04:48 +0000 @@ -0,0 +1,124 @@ +package org.hisp.dhis.reportsheet.exportreport.action; + +/* + * Copyright (c) 2004-2012, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +import org.hisp.dhis.reportsheet.ExportReport; +import org.hisp.dhis.reportsheet.ExportReportService; +import org.hisp.dhis.reportsheet.action.ActionSupport; +import org.hisp.dhis.user.CurrentUserService; +import org.hisp.dhis.user.User; +import org.hisp.dhis.user.UserCredentials; +import org.hisp.dhis.user.UserService; + +/** + * @author Dang Duy Hieu + * @version $Id$ + */ +public class CheckPermissionAction + extends ActionSupport +{ + // ------------------------------------------------------------------------- + // Dependency + // ------------------------------------------------------------------------- + + private ExportReportService exportReportService; + + public void setExportReportService( ExportReportService exportReportService ) + { + this.exportReportService = exportReportService; + } + + private CurrentUserService currentUserService; + + public void setCurrentUserService( CurrentUserService currentUserService ) + { + this.currentUserService = currentUserService; + } + + private UserService userService; + + public void setUserService( UserService userService ) + { + this.userService = userService; + } + + // ------------------------------------------------------------------------- + // Input & Output + // ------------------------------------------------------------------------- + + private Integer id; + + public void setId( Integer id ) + { + this.id = id; + } + + public Integer getId() + { + return id; + } + + // ------------------------------------------------------------------------- + // Execute method + // ------------------------------------------------------------------------- + + public String execute() + throws Exception + { + message = ""; + + if ( id == null ) + { + message = i18n.getString( "the_specified_report_is_not_exist" ); + + return ERROR; + } + else + { + ExportReport report = exportReportService.getExportReport( id ); + + UserCredentials ownerCredentials = userService.getUserCredentialsByUsername( report.getCreatedBy() ); + UserCredentials userCredentials = currentUserService.getCurrentUser().getUserCredentials(); + User owner = (ownerCredentials != null) ? ownerCredentials.getUser() : null; + + if ( userCredentials.isSuper() + || (ownerCredentials != null && ownerCredentials.getUsername().equals( userCredentials.getUsername() )) ) + { + message = "granted"; + } + else if ( !userCredentials.isSuper() ) + { + message = i18n.getString( "permission_notification" ) + " \"" + owner.getName() + "\""; + message += (owner != null && owner.getEmail() != null && !owner.getEmail().trim().isEmpty()) ? " <" + + owner.getEmail() + ">" : ""; + } + } + + return SUCCESS; + } +} === modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exportreport/action/GetExportReportAction.java' --- local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exportreport/action/GetExportReportAction.java 2012-05-09 05:19:35 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exportreport/action/GetExportReportAction.java 2012-11-16 11:04:48 +0000 @@ -1,7 +1,7 @@ package org.hisp.dhis.reportsheet.exportreport.action; /* - * Copyright (c) 2004-2011, University of Oslo + * Copyright (c) 2004-2012, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -30,8 +30,8 @@ import java.util.List; import org.hisp.dhis.reportsheet.ExportItem; +import org.hisp.dhis.reportsheet.ExportReport; import org.hisp.dhis.reportsheet.ExportReportService; -import org.hisp.dhis.reportsheet.ExportReport; import org.hisp.dhis.reportsheet.action.ActionSupport; import org.hisp.dhis.reportsheet.state.SelectionManager; === modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exportreport/action/UpdateExportReportAction.java' --- local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exportreport/action/UpdateExportReportAction.java 2011-08-04 08:39:55 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exportreport/action/UpdateExportReportAction.java 2012-11-16 11:04:48 +0000 @@ -27,8 +27,13 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import java.util.HashSet; +import java.util.Set; + +import org.hisp.dhis.dataset.DataSet; +import org.hisp.dhis.dataset.DataSetService; +import org.hisp.dhis.reportsheet.ExportReport; import org.hisp.dhis.reportsheet.ExportReportService; -import org.hisp.dhis.reportsheet.ExportReport; import com.opensymphony.xwork2.Action; @@ -50,6 +55,13 @@ this.exportReportService = exportReportService; } + private DataSetService dataSetService; + + public void setDataSetService( DataSetService dataSetService ) + { + this.dataSetService = dataSetService; + } + // ------------------------------------------------------------------------- // Input & Output // ------------------------------------------------------------------------- @@ -72,6 +84,8 @@ private String group; + private Set dataSetIds = new HashSet(); + // ------------------------------------------------------------------------- // Getter & Setter // ------------------------------------------------------------------------- @@ -121,6 +135,11 @@ this.organisationCol = organisationCol; } + public void setDataSetIds( Set dataSetIds ) + { + this.dataSetIds = dataSetIds; + } + // ------------------------------------------------------------------------- // Action implement // ------------------------------------------------------------------------- @@ -155,6 +174,11 @@ exportReport.setOrganisationRow( organisationRow ); } + if ( dataSetIds != null && !dataSetIds.isEmpty() ) + { + exportReport.updateDataSetMembers( new HashSet( dataSetService.getDataSets( dataSetIds ) ) ); + } + exportReportService.updateExportReport( exportReport ); return SUCCESS; === modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/resources/META-INF/dhis/beans.xml' --- local/vn/dhis-web-spreadsheet-reporting/src/main/resources/META-INF/dhis/beans.xml 2012-09-19 02:22:55 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/resources/META-INF/dhis/beans.xml 2012-11-16 11:04:48 +0000 @@ -111,9 +111,18 @@ + + + + + + + + - + - + + + + /main.vm + /dhis-web-spreadsheet-reporting/viewAdministrator.vm + /dhis-web-spreadsheet-reporting/menu.vm + F_EXCEL_REPORT_ADMINISTRATION + + /main.vm @@ -65,14 +73,6 @@ F_EXCEL_REPORT_ADMINISTRATION - - /main.vm - /dhis-web-spreadsheet-reporting/viewAdministrator.vm - /dhis-web-spreadsheet-reporting/menu.vm - F_EXCEL_REPORT_ADMINISTRATION - - + + + /dhis-web-commons/ajax/jsonResponseSuccess.vm + + /dhis-web-commons/ajax/jsonResponseError.vm + plainTextError + + /main.vm /dhis-web-spreadsheet-reporting/report/addExportReportForm.vm - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_EXPORT_REPORT_ADD listAllExportReport.action - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_EXPORT_REPORT_ADD /dhis-web-commons/ajax/jsonResponseError.vm plainTextError - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_EXPORT_REPORT_DELETE /main.vm /dhis-web-spreadsheet-reporting/report/exportReports.vm /dhis-web-spreadsheet-reporting/menu.vm - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_EXPORT_REPORT_MANAGEMENT /main.vm /dhis-web-spreadsheet-reporting/report/updateExportReportForm.vm - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_EXPORT_REPORT_UPDATE - listAllExportReport.action - - F_EXCEL_REPORT_ADMINISTRATION + listAllExportReport.action + F_EXCEL_EXPORT_REPORT_UPDATE /dhis-web-spreadsheet-reporting/exportReportAssociation.vm /dhis-web-spreadsheet-reporting/menu.vm ../dhis-web-commons/oust/oust.js,javascript/associations.js - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_REPORT_DEFINE_ASSOCIATION /dhis-web-spreadsheet-reporting/report/exportItems.vm /dhis-web-spreadsheet-reporting/menu.vm javascript/exportItems.js - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_EXPORT_ITEM_MANAGEMENT /main.vm /dhis-web-spreadsheet-reporting/report/addExportItemForm.vm javascript/exportItems.js - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_EXPORT_ITEM_ADD listExportItemAction.action?exportReportId=${exportReportId} - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_EXPORT_ITEM_ADD /main.vm /dhis-web-spreadsheet-reporting/report/updateExportItemForm.vm javascript/exportItems.js - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_EXPORT_ITEM_UPDATE listExportItemAction.action?exportReportId=${exportReportId} - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_EXPORT_ITEM_UPDATE /dhis-web-commons/ajax/jsonResponseError.vm plainTextError - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_EXPORT_ITEM_DELETE /dhis-web-commons/ajax/jsonResponseError.vm plainTextError - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_EXPORT_ITEM_DELETE /dhis-web-commons/ajax/jsonResponseSuccess.vm - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_EXPORT_ITEM_COPY /dhis-web-commons/ajax/jsonResponseSuccess.vm - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_EXPORT_ITEM_COPY 400 + + /main.vm + /dhis-web-spreadsheet-reporting/addDataStatus.vm + /dhis-web-spreadsheet-reporting/menu.vm + F_EXCEL_ENTRY_STATUS_ADD + + listDataEntryStatus.action - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_ENTRY_STATUS_ADD + + + + /main.vm + /dhis-web-spreadsheet-reporting/updateDataStatus.vm + /dhis-web-spreadsheet-reporting/menu.vm + F_EXCEL_ENTRY_STATUS_UPDATE listDataEntryStatus.action - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_ENTRY_STATUS_UPDATE listDataEntryStatus.action - F_EXCEL_REPORT_ADMINISTRATION - - - - /main.vm - /dhis-web-spreadsheet-reporting/addDataStatus.vm - /dhis-web-spreadsheet-reporting/menu.vm - F_EXCEL_REPORT_ADMINISTRATION - - - - /main.vm - /dhis-web-spreadsheet-reporting/updateDataStatus.vm - /dhis-web-spreadsheet-reporting/menu.vm - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_ENTRY_STATUS_DELETE - + + + /main.vm + /dhis-web-spreadsheet-reporting/import/importReports.vm + /dhis-web-spreadsheet-reporting/menu.vm + 220 + ../dhis-web-commons/ouwt/ouwt.js + F_EXCEL_IMPORT_REPORT_MANAGEMENT + + /main.vm /dhis-web-spreadsheet-reporting/import/addImportReport.vm - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_IMPORT_REPORT_ADD - - listAllImportReport.action - + listAllImportReport.action + F_EXCEL_IMPORT_REPORT_ADD /dhis-web-commons/ajax/jsonResponseError.vm plainTextError - F_EXCEL_REPORT_ADMINISTRATION - - - - /main.vm - /dhis-web-spreadsheet-reporting/import/importReports.vm - /dhis-web-spreadsheet-reporting/menu.vm - 220 - ../dhis-web-commons/ouwt/ouwt.js + F_EXCEL_IMPORT_REPORT_DELETE /main.vm /dhis-web-spreadsheet-reporting/import/updateImportReport.vm - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_IMPORT_REPORT_UPDATE /main.vm /dhis-web-spreadsheet-reporting/import/addImportItem.vm javascript/importItems.js - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_IMPORT_ITEM_ADD /dhis-web-commons/ajax/jsonResponseError.vm plainTextError - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_IMPORT_ITEM_DELETE /main.vm /dhis-web-spreadsheet-reporting/import/updateImportItem.vm javascript/importItems.js - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_IMPORT_ITEM_UPDATE /dhis-web-commons/ajax/jsonResponseSuccess.vm - F_COPY_IMPORT_ITEM_ADMINISTRATION + F_EXCEL_IMPORT_ITEM_COPY /dhis-web-commons/ajax/jsonResponseSuccess.vm - F_COPY_IMPORT_ITEM_ADMINISTRATION + F_EXCEL_IMPORT_ITEM_COPY @@ -1469,7 +1477,7 @@ /dhis-web-spreadsheet-reporting/excelTemplateList.vm /dhis-web-spreadsheet-reporting/menu.vm javascript/exceltemplate.js - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_TEMPLATE_MANAGEMENT /dhis-web-commons/ajax/jsonResponseError.vm plainTextError - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_TEMPLATE_DELETE listAllExcelTemplates.action - F_EXCEL_REPORT_ADMINISTRATION + F_EXCEL_TEMPLATE_UPLOAD @@ -1497,7 +1505,7 @@ /dhis-web-commons/ajax/jsonResponseError.vm /dhis-web-commons/ajax/jsonResponseInput.vm - F_EXCEL_TEMPLATE_MANAGEMENT_RENAME + F_EXCEL_TEMPLATE_RENAME /dhis-web-commons/ajax/xmlResponseError.vm - F_EXCEL_TEMPLATE_MANAGEMENT_RENAME + F_EXCEL_TEMPLATE_UPLOAD jQuery(document).ready( function(){ - validation( 'addExportReportForm', function( form ){ form.submit() } ); + validation( 'addExportReportForm', function( form ){ + selectAllById( "selectedDataSetsList" ); + form.submit(); + }); checkValueIsExist( "name", "validateExportReportAction.action" ); + + jQuery( "#availableDataSetsList" ).dhisAjaxSelect({ + source: "../dhis-web-commons-ajax-json/getDataSets.action", + iterator: "dataSets", + connectedTo: "selectedDataSetsList", + handler: function( item ) { + var option = jQuery( "