dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32343
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16505: Data entry, json encoding indicator formulas to avoid trouble e.g. with line breaks inside formulas
------------------------------------------------------------
revno: 16505
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-08-25 16:39:44 +0200
message:
Data entry, json encoding indicator formulas to avoid trouble e.g. with line breaks inside formulas
modified:
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/responseMetaData.vm
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/responseMetaData.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/responseMetaData.vm 2014-06-02 15:29:13 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/responseMetaData.vm 2014-08-25 14:39:44 +0000
@@ -28,7 +28,8 @@
"indicatorFormulas": {
#set( $size = $indicators.size() )
#foreach( $indicator in $indicators )
-"${indicator.uid}":"($!{indicator.explodedNumerator})/($!{indicator.explodedDenominator})*($!{indicator.indicatorType.factor})"#if( $velocityCount < $size ),#end
+#set( $formula = "($!{indicator.explodedNumerator})/($!{indicator.explodedDenominator})*($!{indicator.indicatorType.factor})" )
+"${indicator.uid}":"$encoder.jsonEncode( $formula )"#if( $velocityCount < $size ),#end
#end },
"dataSets": {