=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/cancel.png' Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/cancel.png 1970-01-01 00:00:00 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/cancel.png 2011-03-23 04:38:39 +0000 differ === added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/edit_add.png' Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/edit_add.png 1970-01-01 00:00:00 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/edit_add.png 2011-03-23 04:38:39 +0000 differ === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/DefinedAssociationsEditorAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/DefinedAssociationsEditorAction.java 2011-03-21 14:30:16 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/DefinedAssociationsEditorAction.java 2011-03-23 04:38:39 +0000 @@ -29,6 +29,7 @@ import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.dataset.DataSetService; +import org.hisp.dhis.i18n.I18n; import org.hisp.dhis.organisationunit.OrganisationUnitService; import org.hisp.dhis.source.Source; @@ -41,6 +42,8 @@ public class DefinedAssociationsEditorAction implements Action { + private static final String SEPERATE = " - "; + // ------------------------------------------------------------------------- // Dependencies // ------------------------------------------------------------------------- @@ -60,6 +63,17 @@ } // ------------------------------------------------------------------------- + // I18n + // ------------------------------------------------------------------------- + + private I18n i18n; + + public void setI18n( I18n i18n ) + { + this.i18n = i18n; + } + + // ------------------------------------------------------------------------- // Input // ------------------------------------------------------------------------- @@ -119,20 +133,25 @@ { DataSet dataSet = dataSetService.getDataSet( dataSetId ); Source source = organisationUnitService.getOrganisationUnit( orgUnitId ); - - title = source.getName() + " ( " + dataSet.getName() + " )"; - + + title = SEPERATE + dataSet.getName() + SEPERATE + source.getName(); + if ( assigned ) { dataSet.getSources().add( source ); + + title = i18n.getString( "assigned" ) + SEPERATE + title; } else { dataSet.getSources().remove( source ); + + title = i18n.getString( "unassigned" ) + SEPERATE + title; } dataSetService.updateDataSet( dataSet ); - + return SUCCESS; } + } === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/ShowedAssociationsEditorAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/ShowedAssociationsEditorAction.java 2011-03-21 14:30:16 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/ShowedAssociationsEditorAction.java 2011-03-23 04:38:39 +0000 @@ -115,6 +115,20 @@ return maps; } + + public List getHeaderIds() + { + List ids = new ArrayList(); + + for ( GridHeader header : grid.getVisibleHeaders() ) + { + ids.add( header.getColumn() ); + } + + ids.remove( 0 ); + + return ids; + } // ------------------------------------------------------------------------- // Action implement === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/htmlGrid.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/htmlGrid.vm 2011-03-21 14:30:16 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/htmlGrid.vm 2011-03-23 04:38:39 +0000 @@ -1,35 +1,25 @@ - +#set( $headers = $grid.getVisibleHeaders() ) +#set( $i18nAssigned = $i18n.getString( "assigned" ) ) +#set( $i18nUnassigned = $i18n.getString( "unassigned" ) )

$!encoder.htmlEncode( $grid.title )

$!encoder.htmlEncode( $grid.subtitle )
- - -#set( $headers = $grid.getVisibleHeaders() ) +
+++#foreach( $header in $headers ) +#if ( $velocityCount > 1 ) ++#end +#end + #foreach( $header in $headers ) - + #end @@ -38,18 +28,35 @@ #foreach( $meta in $!MetaValues ) #set( $list = $!MetaValueMaps.get( $meta.id ) ) + - #foreach( $item in $list ) - #set( $title = $meta + " ( " + $headers.get( $velocityCount ).name + " )" ) + #foreach( $item in $list ) + #set( $title = " - " + $headers.get( $velocityCount ).name + " - " + $meta ) + #if( $item.metaValue == "true" ) + #set( $title = $i18nAssigned + $title ) + #else + #set( $title = $i18nUnassigned + $title ) + #end - #end + #end #end - -
$!encoder.htmlEncode( $header.name )$!encoder.htmlEncode( $header.name )
$meta -
- - #if ( $item.metaValue == "true" ) $i18n.getString( "assigned" ) #else $i18n.getString( "unassigned" ) #end +
+ +
\ No newline at end of file + + + \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/editor.js' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/editor.js 2011-03-21 14:30:16 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/editor.js 2011-03-23 04:38:39 +0000 @@ -1,4 +1,9 @@ +// Global variables: + +arrayIds = new Array(); + + function displayAssociatedForm() { var url = "showedAssociationsEditor.action"; @@ -16,6 +21,14 @@ url += "orgUnitId=" + orgunitId ; url += "&dataSetId=" + dataSetId; url += "&assigned=" + !assigned; - + $( "#div" + orgunitId + dataSetId ).load( url ); +} + +function assignAll( orgunitId ) +{ + for ( var i = 0 ; i < arrayIds.length ; i++ ) + { + changeAssociatedStatus( orgunitId, arrayIds[i], eval($("#div" + orgunitId + arrayIds[i] + " input[type='hidden']").val()) ); + } } \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/loadIcon.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/loadIcon.vm 2011-03-21 14:30:16 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/loadIcon.vm 2011-03-23 04:38:39 +0000 @@ -1,2 +1,2 @@ - -#if ( $assigned ) $i18n.getString( 'assigned' ) #else $i18n.getString( 'unassigned' ) #end \ No newline at end of file + + \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewEditorForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewEditorForm.vm 2011-03-21 14:30:16 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewEditorForm.vm 2011-03-23 04:38:39 +0000 @@ -27,4 +27,5 @@ }); var i18n_processing = '$encoder.jsEscape( $i18n.getString( "processing" ) , "'")'; - + + \ No newline at end of file