=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonAccessDenied.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonAccessDenied.vm 2010-05-26 14:45:10 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonAccessDenied.vm 2011-01-22 20:56:30 +0000 @@ -1,4 +1,4 @@ { "response": "error", - "message": "$!encoder.jsEncode( $i18n.getString( 'access_denied' ) ) - $!encoder.jsEncode( $i18n.getString( 'access_denied_message' ) )" + "message": "$!encoder.jsonEncode( $i18n.getString( 'access_denied' ) ) - $!encoder.jsonEncode( $i18n.getString( 'access_denied_message' ) )" } \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonCategoryOptionCombos.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonCategoryOptionCombos.vm 2010-10-14 08:14:12 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonCategoryOptionCombos.vm 2011-01-22 20:56:30 +0000 @@ -3,7 +3,7 @@ #foreach( $coc in $categoryOptionCombos ) { "id": $!{coc.id}, - "name": "$!encoder.jsEncode( ${coc.name} )", + "name": "$!encoder.jsonEncode( ${coc.name} )", "default": "$coc.isDefault()" }#if( $velocityCount < $size ),#end #end === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOperands.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOperands.vm 2011-01-12 11:07:48 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOperands.vm 2011-01-22 20:56:30 +0000 @@ -8,6 +8,8 @@ "operandName": "$!encoder.jsonEncode( ${operand.operandName} )" }#if( $velocityCount < $size ),#end #end -] , +] +#if( $usePaging ), "paging":#parse( "/dhis-web-commons/ajax/jsonPaging.vm" ) +#end } \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOperandsAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOperandsAction.java 2011-01-13 12:12:41 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOperandsAction.java 2011-01-22 20:56:30 +0000 @@ -77,7 +77,7 @@ } // ------------------------------------------------------------------------- - // Output & Input + // Input // ------------------------------------------------------------------------- private Integer id; @@ -115,6 +115,22 @@ this.includeTotals = includeTotals; } + private boolean usePaging = false; + + public boolean isUsePaging() + { + return usePaging; + } + + public void setUsePaging( boolean usePaging ) + { + this.usePaging = usePaging; + } + + // ------------------------------------------------------------------------- + // Output + // ------------------------------------------------------------------------- + public List operands; public List getOperands() @@ -156,7 +172,7 @@ Collections.sort( operands, new DataElementOperandNameComparator() ); - if ( this.usepaging ) + if ( usePaging ) { this.paging = createPaging( operands.size() ); === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/paging/ActionPagingSupport.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/paging/ActionPagingSupport.java 2011-01-20 08:39:49 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/paging/ActionPagingSupport.java 2011-01-22 20:56:30 +0000 @@ -66,18 +66,6 @@ return paging; } - protected boolean usepaging; - - public boolean isUsepaging() - { - return usepaging; - } - - public void setUsepaging( boolean usepaging ) - { - this.usepaging = usepaging; - } - @SuppressWarnings( "unchecked" ) private String getCurrentLink() { === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorExpressionBuilderForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorExpressionBuilderForm.vm 2011-01-13 12:12:41 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorExpressionBuilderForm.vm 2011-01-22 20:56:30 +0000 @@ -133,7 +133,7 @@ var key = getFieldValue( "indicator-expression-container input[id=filter]"); - dataDictionary.loadOperands( "#indicator-expression-container select[id=dataElementId]", {id: id, aggregationOperator: aggregationOperator, usepaging: true, key: key } ); + dataDictionary.loadOperands( "#indicator-expression-container select[id=dataElementId]", {id: id, aggregationOperator: aggregationOperator, usePaging: true, key: key } ); checkAggregationOperator(); } === modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/expressionBuilderForm.vm' --- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/expressionBuilderForm.vm 2010-12-10 07:45:59 +0000 +++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/expressionBuilderForm.vm 2011-01-22 20:56:30 +0000 @@ -1,10 +1,10 @@
- +
- + @@ -38,7 +38,7 @@ + @@ -86,7 +86,7 @@ loadDataElements( dataSets.val() ); }); } - + function getExpressionText() { if( hasText('expression') ){ @@ -104,22 +104,21 @@ jQuery( "#formulaText").html( '' ); } } - + function insertText( inputAreaName, inputText, radioGroupName ) { insertTextCommon( inputAreaName, inputText ); getExpressionText(); } - + function cleanExpression() { checAggregationOperator(); getExpressionText(); } - - + function insertExpression() { var expression = getFieldValue( 'expression-container textarea[id=expression]' ); @@ -142,16 +141,12 @@ dialog.dialog( "close" ); } - - - }); - + }); } - jQuery( function(){ - validation( 'expression-form', insertExpression ); - }); - +jQuery( function(){ + validation( 'expression-form', insertExpression ); +}); @@ -205,8 +200,4 @@ dialog.dialog("open"); } - - - -
$i18n.getString( "description" )