=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java 2010-09-20 08:49:55 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java 2010-09-23 07:35:25 +0000 @@ -249,11 +249,11 @@ public void setZeroIsSignificantForDataElements( Collection dataElementIds ) { - String sql = "update dataelement d set d.zeroissignificant=false"; + String sql = "update dataelement set zeroissignificant=false"; statementManager.getHolder().executeUpdate( sql ); - sql = "update dataelement d set d.zeroissignificant=true where d.dataelementid in (" + TextUtils.getCommaDelimitedString( dataElementIds ) + ")"; + sql = "update dataelement set zeroissignificant=true where dataelementid in (" + TextUtils.getCommaDelimitedString( dataElementIds ) + ")"; statementManager.getHolder().executeUpdate( sql ); } === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElements.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElements.vm 2010-05-27 11:06:26 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElements.vm 2010-09-23 07:35:25 +0000 @@ -8,7 +8,8 @@ "shortName": "$!encoder.jsEncode( ${dataElement.shortName} )", "code": "$!encoder.jsEncode( ${dataElement.code} )", "type": "$!{dataElement.type}", - "aggregationOperator": "$!{dataElement.aggregationOperator}" + "aggregationOperator": "$!{dataElement.aggregationOperator}", + "zeroIsSignificant": "$!{dataElement.zeroIsSignificant}" }#if( $velocityCount < $size ),#end #end ] } === removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/zerovaluestorage/GetDataElementsByZeroIsSignificantAndGroupAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/zerovaluestorage/GetDataElementsByZeroIsSignificantAndGroupAction.java 2010-08-27 12:08:17 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/zerovaluestorage/GetDataElementsByZeroIsSignificantAndGroupAction.java 1970-01-01 00:00:00 +0000 @@ -1,110 +0,0 @@ -package org.hisp.dhis.dataadmin.action.zerovaluestorage; - -/* - * Copyright (c) 2004-2010, 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 java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.hisp.dhis.dataelement.DataElement; -import org.hisp.dhis.dataelement.DataElementGroup; -import org.hisp.dhis.dataelement.DataElementService; -import org.hisp.dhis.dataelement.comparator.DataElementNameComparator; - -import com.opensymphony.xwork2.Action; - -/** - * @author Tran Thanh Tri - * @version $Id$ - */ - -public class GetDataElementsByZeroIsSignificantAndGroupAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private DataElementService dataElementService; - - public void setDataElementService( DataElementService dataElementService ) - { - this.dataElementService = dataElementService; - } - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private boolean saveZeroValue; - - public void setSaveZeroValue( boolean saveZeroValue ) - { - this.saveZeroValue = saveZeroValue; - } - - private Integer dataElementGroupId; - - public void setDataElementGroupId( Integer dataElementGroupId ) - { - this.dataElementGroupId = dataElementGroupId; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List dataElements; - - public List getDataElements() - { - return dataElements; - } - - @Override - public String execute() - throws Exception - { - if ( dataElementGroupId == null ) - { - dataElements = new ArrayList( dataElementService - .getDataElementsByZeroIsSignificant( saveZeroValue ) ); - } - else - { - DataElementGroup dataElementGroup = dataElementService.getDataElementGroup( dataElementGroupId ); - - dataElements = new ArrayList( dataElementService.getDataElementsByZeroIsSignificantAndGroup( - saveZeroValue, dataElementGroup ) ); - } - - Collections.sort( dataElements, new DataElementNameComparator() ); - - return SUCCESS; - } -} === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml 2010-09-21 12:42:34 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml 2010-09-23 07:35:25 +0000 @@ -174,14 +174,6 @@ - - - - - /main.vm /dhis-web-maintenance-dataadmin/zeroValueStorageManagement.vm - /dhis-web-maintenance-dataadmin/menu.vm - - javascript/zeroValueStorageManagement.js - - - - - /dhis-web-maintenance-dataadmin/responseDataElements.vm - + /dhis-web-maintenance-dataadmin/menu.vm + === removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/zeroValueStorageManagement.js' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/zeroValueStorageManagement.js 2010-09-20 08:49:55 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/zeroValueStorageManagement.js 1970-01-01 00:00:00 +0000 @@ -1,147 +0,0 @@ -function init() -{ - var id; - for ( id in ignoreZeroValueDataElements ) - { - $("#ignoreZeroValueDataElements").append( $( "" ).attr( "value",id ).text( ignoreZeroValueDataElements[id] )) ; - } - - for ( id in zeroDataValueElements ) - { - $("#zeroDataValueElements").append( $( "" ).attr( "value",id ).text( zeroDataValueElements[id] )) ; - } -} - -function getDataElementsByGroupIgnoreZeroValue ( dataElementGroupId ) -{ - var request = new Request(); - request.setResponseTypeXML( 'dataElements' ); - request.setCallbackSuccess( getDataElementsByGroupIgnoreZeroValueCompleted ); - request.send( 'getDataElementsByZeroIsSignificantAndGroup.action?dataElementGroupId=' + dataElementGroupId + - '&saveZeroValue=false' ); -} - -function getDataElementsByGroupIgnoreZeroValueCompleted( dataElements ) -{ - ignoreZeroValueDataElements = new Object(); - var dataElementTags = dataElements.getElementsByTagName( 'dataElement' ); - for(var i=0;i$i18n.getString( "zero_storage_management" ) #openHelp( "zeroValueStorage" )
-
+ @@ -13,10 +12,10 @@ @@ -24,43 +23,56 @@ - + - +
- + #foreach( $dataElementGroup in $dataElementGroups ) - + #end
- + #foreach( $zero in $ignoreZeroValueDataElements ) + + #end -
-
-
- +
+
+
+
- + #foreach( $zero in $zeroDataValueElements ) + + #end

- + +

\ No newline at end of file