=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.utils.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.utils.js 2012-03-26 18:11:26 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.utils.js 2012-04-30 20:10:16 +0000 @@ -12,5 +12,16 @@ $.ajax( { url:url, data:data, type:'get', dataType:'html', success:function( data ) { $( '#' + elementId ).html( data ); } } ); + }, + + toggleCss: function( elementId, property, value1, value2 ) { + var id = '#' + elementId; + var curValue = $( id ).css( property ); + if ( curValue == value1 ) { + $( id ).css( property, value2 ); + } + else { + $( id ).css( property, value1 ); + } } } ); \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/datavalue/ImportDataValueAction.java' --- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/datavalue/ImportDataValueAction.java 2012-04-18 13:51:28 +0000 +++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/datavalue/ImportDataValueAction.java 2012-04-30 20:10:16 +0000 @@ -36,6 +36,8 @@ import java.io.InputStreamReader; import java.io.Reader; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.hisp.dhis.common.IdentifiableObject.IdentifiableProperty; import org.hisp.dhis.dxf2.datavalueset.DataValueSetService; import org.hisp.dhis.dxf2.metadata.ImportOptions; @@ -56,6 +58,8 @@ public class ImportDataValueAction implements Action { + private static final Log log = LogFactory.getLog( ImportDataValueAction.class ); + @Autowired private DataValueSetService dataValueSetService; @@ -89,7 +93,21 @@ { this.strategy = ImportStrategy.valueOf( stgy ); } + + private IdentifiableProperty dataElementIdScheme; + + public void setDataElementIdScheme( IdentifiableProperty dataElementIdScheme ) + { + this.dataElementIdScheme = dataElementIdScheme; + } + + private IdentifiableProperty orgUnitIdScheme; + public void setOrgUnitIdScheme( IdentifiableProperty orgUnitIdScheme ) + { + this.orgUnitIdScheme = orgUnitIdScheme; + } + private String importFormat; public void setImportFormat( String importFormat ) @@ -109,6 +127,10 @@ public String execute() throws Exception { + strategy = strategy != null ? strategy : ImportStrategy.NEW_AND_UPDATES; + dataElementIdScheme = dataElementIdScheme != null ? dataElementIdScheme : IdentifiableProperty.UID; + orgUnitIdScheme = orgUnitIdScheme != null ? orgUnitIdScheme : IdentifiableProperty.UID; + InputStream in = new FileInputStream( upload ); in = StreamUtils.wrapAndCheckZip( in ); @@ -117,7 +139,9 @@ TaskId taskId = new TaskId( TaskCategory.DATAVALUE_IMPORT, currentUserService.getCurrentUser() ); - ImportOptions options = new ImportOptions( IdentifiableProperty.UID, IdentifiableProperty.UID, dryRun, strategy ); + ImportOptions options = new ImportOptions( dataElementIdScheme, orgUnitIdScheme, dryRun, strategy ); + + log.info( options ); scheduler.executeTask( new ImportDataValueTask( dataValueSetService, in, reader, options, taskId, importFormat ) ); === modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties 2013-01-01 02:14:39 +0000 +++ dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties 2012-04-30 20:10:16 +0000 @@ -297,4 +297,10 @@ integration=Integration add_route=Add route route=Route -integration_configuration=Integration Configuration \ No newline at end of file +integration_configuration=Integration Configuration +data_element_id_scheme=Data element ID scheme +org_unit_id_scheme=Org unit ID scheme +uid=UID +name=Name +code=Code +more_options=More options \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/importDataValue.vm' --- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/importDataValue.vm 2012-04-15 19:45:25 +0000 +++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/importDataValue.vm 2012-04-30 20:10:16 +0000 @@ -1,14 +1,14 @@

$!i18n.getString( $importFormat ) $i18n.getString( "data_import" )

-
+
-+ - + @@ -27,6 +27,26 @@ + + + + + + + + + + + +
$i18n.getString( "file" )
$i18n.getString( "dry_run" )
$i18n.getString( "more_options" )
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/importSummary.vm' --- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/importSummary.vm 2012-04-15 20:21:18 +0000 +++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/importSummary.vm 2012-04-30 20:10:16 +0000 @@ -8,8 +8,8 @@

$i18n.getString( "import_count" )

#if( $summary.dataValueCount ) --++ @@ -34,6 +34,8 @@

$i18n.getString( "conflicts" )

#if( $summary.conflicts.size() > 0 )
$i18n.getString( "type" ) $i18n.getString( "count" )
++ === modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/importDataValue.js' --- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/importDataValue.js 2012-04-14 21:03:54 +0000 +++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/importDataValue.js 2012-04-30 20:10:16 +0000 @@ -12,6 +12,12 @@ $( "#importForm" ).submit(); } +function toggleOptions() +{ + $( ".moreOptions" ).toggle(); + $.toggleCss( "inputCriteria", "height", "144px", "200px" ); +} + function pingNotificationsTimeout() { pingNotifications( 'DATAVALUE_IMPORT', 'notificationTable', displaySummaryLink );
$i18n.getString( "element" ) $i18n.getString( "description" )