← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20011: misc fixes for type => valueType

 

------------------------------------------------------------
revno: 20011
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-09-07 10:11:39 +0700
message:
  misc fixes for type => valueType
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElementOperands.vm
  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/xmlDataElement.vm
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElements.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/edit-sms-command.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/viewDataEntryForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/jsonTrackedEntityDataElements.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/responseSelDataElementList.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.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-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElementOperands.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElementOperands.vm	2013-11-04 19:39:52 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElementOperands.vm	2015-09-07 03:11:39 +0000
@@ -6,7 +6,7 @@
     "dataElement": {
     	"id": "$!{operand.dataElement.uid}",
     	"name": "$!encoder.jsonEncode( ${operand.dataElement.name} )",
-    	"type": "$!encoder.jsonEncode( ${operand.dataElement.type} )"
+    	"valueType": "$!encoder.jsonEncode( ${operand.dataElement.valueType} )"
     },
     "categoryOptionCombo": {
     	"id": "$!{operand.categoryOptionCombo.uid}",

=== 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	2013-09-06 15:53:07 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElements.vm	2015-09-07 03:11:39 +0000
@@ -10,7 +10,7 @@
 	"alternativeName": "$!encoder.jsonEncode( ${dataElement.alternativeNamee} )",
 	"shortName": "$!encoder.jsonEncode( ${dataElement.displayShortName} )",
 	"code": "$!encoder.jsonEncode( ${dataElement.code} )",
-	"type": "$!{dataElement.type}",
+	"valueType": "$!{dataElement.valueType}",
 	"optionSet": #if($!dataElement.optionSet) "true"  #else "false" #end,
 	"aggregationOperator": "$!{dataElement.aggregationOperator}",
 	"zeroIsSignificant": "$!{dataElement.zeroIsSignificant}",

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElement.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElement.vm	2014-06-26 09:29:30 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElement.vm	2015-09-07 03:11:39 +0000
@@ -7,7 +7,7 @@
 	<code>$!encoder.xmlEncode( $dataElement.code )</code>
 	<description>$!encoder.xmlEncode( $dataElement.displayDescription )</description>
 	<domainType>$dataElement.getDomainTypeNullSafe()</domainType>
-	<valueType>$dataElement.type</valueType>
+	<valueType>$dataElement.valueType</valueType>
 	<aggregationOperator>$dataElement.aggregationOperator</aggregationOperator>
 	<url>$!encoder.xmlEncode( $dataElement.url )</url>
 	<lastUpdated>$!format.formatDate( $dataElement.lastUpdated )</lastUpdated>

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElements.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElements.vm	2014-06-26 09:29:30 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/xmlDataElements.vm	2015-09-07 03:11:39 +0000
@@ -9,7 +9,7 @@
 		<code>$!encoder.xmlEncode( $dataElement.code )</code>
 		<description>$!encoder.xmlEncode( $dataElement.displayDescription )</description>
 		<domainType>$dataElement.getDomainTypeNullSafe()</domainType>
-		<type>$dataElement.type</type>
+		<valueType>$dataElement.valueType</valueType>
 		<aggregationOperator>$dataElement.aggregationOperator</aggregationOperator>
 		<categoryCombo>$!encoder.xmlEncode( $dataElement.categoryCombo )</categoryCombo>
 	</dataElement>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js	2014-06-26 21:14:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js	2015-09-07 03:11:39 +0000
@@ -144,7 +144,7 @@
 			option.text( item.operandName );
 			option.data( "dataelement-id", item.dataElement.id );
 			option.data( "dataelement-name", item.dataElement.name );
-			option.data( "dataelement-type", item.dataElement.type );
+			option.data( "dataelement-type", item.dataElement.valueType );
 			option.data( "optioncombo-id", item.categoryOptionCombo.id );
 			option.data( "optioncombo-name", item.categoryOptionCombo.name );
 			option.dblclick(insertDataElement);

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/edit-sms-command.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/edit-sms-command.vm	2015-01-15 15:11:38 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/edit-sms-command.vm	2015-09-07 03:11:39 +0000
@@ -245,7 +245,7 @@
 								<input type="text" id="codeValue$index" name="codeValue$index" class="{validate:{required:true}}" value='$!codes[$str]' onblur="checkDuplicatedCode(this.value, $index)"/>
 						   </td>
 						   <td>
-								#if($dataElement.type == "int" || $dataElement.type == "number")
+								#if( $dataElement.valueType.isNumeric() )
 									#if ($formulas[$str])
 										<input type="button" name="addFormula$index" id="addFormula$index" value="Edit Formula" onclick="openFormulaForm('$dataElement.name $x.name', '$index')"/>
 									#else
@@ -289,7 +289,7 @@
 	    </thead>
 	    #set($index = 0)
     	#foreach($attribute in $trackedEntityAttributeList)
-    		
+    		
 	    #set ($index = $index + 1)
 	    
     		 <tr class="trackedEntityAttribute">
@@ -298,8 +298,8 @@
 				   <input type="hidden" id="attId$index" name="attId$index" value="$attribute.id"/>
 			   </td>
                <td><input type="text" name="attCode$index" id="attCode$index" class="{validate:{required:true}}" value='$!codes["$attribute.id"]'></td>   
-            </tr>      
-	    #end
+            </tr>      
+	    #end
     #end
 
 </table>
@@ -333,7 +333,7 @@
 	<select id="targetDataElement">
 		<option value="">Please select</option>
 		#foreach( $dataElement in $dataElements)
-			#if($dataElement.type == "int" || $dataElement.type == "number")
+			#if($dataElement.valueType.isNumeric() )
 				<option value="$dataElement.id">$dataElement.name</option>
 			#end
 		#end

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/viewDataEntryForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/viewDataEntryForm.js	2015-01-14 14:41:31 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/viewDataEntryForm.js	2015-09-07 03:11:39 +0000
@@ -166,7 +166,7 @@
 
 	var dataElementUid = dataElement.uid;	
 	var dataElementName = dataElement.name;	
-	var dataElementType = dataElement.type;
+	var dataElementValueType = dataElement.valueType;
 	
 	var htmlCode = "";
 	var id = programStageUid + "-" + dataElementUid + "-val" ;
@@ -174,19 +174,19 @@
 	{
 		id = dataElementUid;
 	}	
-	var titleValue = dataElementUid + " - " + dataElementName + " - " + dataElementType;
+	var titleValue = dataElementUid + " - " + dataElementName + " - " + dataElementValueType;
 	
-	if ( dataElementType == "bool" )
+	if ( dataElementValueType == "BOOLEAN" )
 	{
 		var displayName = dataElementName;
 		htmlCode = "<input title=\"" + titleValue + "\" name=\"entryselect\" id=\"" + id + "\" value=\"[" + displayName + "]\" title=\"" + displayName + "\">";
 	} 
-	else if ( dataElementType == "trueOnly" )
+	else if ( dataElementValueType == "TRUE_ONLY" )
 	{
 		var displayName = dataElementName;
 		htmlCode = "<input type=\"checkbox\" title=\"" + titleValue + "\" name=\"entryselect\" id=\"" + id + "\" title=\"" + displayName + "\">";
 	} 
-	else if ( dataElementType == "username" )
+	else if ( dataElementValueType == "USERNAME" )
 	{
 		var displayName = dataElementName;
 		htmlCode = "<input title=\"" + titleValue + "\" value=\"[" + displayName + "]\" name=\"entryfield\" id=\"" + id + "\" username=\"true\" />";

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/jsonTrackedEntityDataElements.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/jsonTrackedEntityDataElements.vm	2015-02-26 13:29:03 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/jsonTrackedEntityDataElements.vm	2015-09-07 03:11:39 +0000
@@ -6,7 +6,7 @@
 	"localid": "${dataElement.id}",
 	"name": "$!encoder.jsonEncode( ${dataElement.name} )",
 	"code": "$!encoder.jsonEncode( ${dataElement.code} )",
-	"type": "${dataElement.type}",
+	"valueType": "${dataElement.valueType}",
 	"optionset": #if( $!dataElement.optionSet ) "$!dataElement.optionSet.uid" #else "" #end
 		
   }#if( $velocityCount < $size ),#end

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/responseSelDataElementList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/responseSelDataElementList.vm	2013-05-27 04:33:25 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/responseSelDataElementList.vm	2015-09-07 03:11:39 +0000
@@ -8,7 +8,7 @@
 			<name>$encoder.xmlEncode( $dataElement.name )</name>
 			<code>$!encoder.xmlEncode( $dataElement.code )</code>
 			<shortName>$encoder.xmlEncode( $dataElement.shortName )</shortName>
-			<type>$dataElement.type</type>
+			<valueType>$dataElement.valueType</valueType>
 			#set($deJSON = '{' + '"id"' + ":" + $dataElement.id + "," + '"uid"' + ':"' + $dataElement.uid + '",' + '"name"' + ':"' + "$dataElement.name" + '",' + '"shortName"' + ':"' + "$dataElement.shortName" + '",' + '"type"' + ':"' + "$dataElement.getDetailedTextType()"  + '"}' )
 			<json>$deJSON</json>
 			<optionCombos> 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.vm	2015-07-02 07:05:55 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.vm	2015-09-07 03:11:39 +0000
@@ -338,7 +338,7 @@
 									<td align="center"><input type="checkbox" name="allowProvided" value="$programStageDataElement.dataElement.id" #if($programStageDataElement.allowProvidedElsewhere == true ) checked #end /></td>
 									<td align="center"><input type="checkbox" name="displayInReport" value="$programStageDataElement.dataElement.id" #if($programStageDataElement.displayInReports == 'true' ) checked #end /></td>
 									<td align="center">
-										#if($programStageDataElement.dataElement.type=='date')
+										#if($programStageDataElement.dataElement.valueType=='DATE')
 										<input type="checkbox" name="allowFutureDate" value="$programStageDataElement.dataElement.id" #if($programStageDataElement.allowFutureDate == 'true' ) checked #end />
 										#else
 										<input type="hidden" name="allowFutureDate" />