← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 587: Improved validation rule details box.

 

------------------------------------------------------------
revno: 587
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Sat 2009-09-05 11:34:43 +0200
message:
  Improved validation rule details box.
modified:
  dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/general.js
  dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/responseDataElementList.vm
  dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/responseValidationRule.vm
  dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/responseValidationRuleGroup.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-validationrule/src/main/webapp/dhis-web-validationrule/javascript/general.js'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/general.js	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/general.js	2009-09-05 09:34:43 +0000
@@ -10,12 +10,18 @@
 function validationRuleReceived( validationElement )
 {
     setFieldValue( 'nameField', getElementValue( validationElement, 'name' ) );
+    
     var description = getElementValue( validationElement, 'description' );
     setFieldValue( 'descriptionField', description ? description : '[' + i18n_none + ']' );
-    setFieldValue( 'leftSideDescriptionField', getElementValue( validationElement, 'leftSideDescription' ) );
+    
+    var leftSideDescription = getElementValue( validationElement, 'leftSideDescription' );
+    setFieldValue( 'leftSideDescriptionField', leftSideDescription ? leftSideDescription : '[' + i18n_none + ']' );
+    
     var operator = getElementValue( validationElement, 'operator' );
     setFieldValue( 'operatorField', i18nalizeOperator( operator ) );
-	setFieldValue( 'rightSideDescriptionField', getElementValue( validationElement, 'rightSideDescription' ) );
+	
+    var rightSideDescription = getElementValue( validationElement, 'rightSideDescription' );
+    setFieldValue( 'rightSideDescriptionField', rightSideDescription ? rightSideDescription : '[' + i18n_none + ']' );
 
     showDetails();
 }

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/responseDataElementList.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/responseDataElementList.vm	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/responseDataElementList.vm	2009-09-05 09:34:43 +0000
@@ -3,8 +3,8 @@
 #foreach ( $dataElement in $dataElements )
 	<dataElement>
 		<id>$dataElement.id</id>
-		<name>$encoder.xmlEncode( $dataElement.name )</name>
-		<shortName>$encoder.xmlEncode( $dataElement.shortName )</shortName>
+		<name>$!encoder.xmlEncode( $dataElement.name )</name>
+		<shortName>$!encoder.xmlEncode( $dataElement.shortName )</shortName>
 		<alternativeName>$!encoder.xmlEncode( $dataElement.alternativeName )</alternativeName>
 		<code>$!encoder.xmlEncode( $dataElement.code )</code>
 		<description>$!encoder.xmlEncode( $dataElement.description )</description>

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/responseValidationRule.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/responseValidationRule.vm	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/responseValidationRule.vm	2009-09-05 09:34:43 +0000
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <validationRule>
-  <name>$encoder.xmlEncode( $validationRule.name )</name>
+  <name>$!encoder.xmlEncode( $validationRule.name )</name>
   <description>$!encoder.xmlEncode( $validationRule.description )</description>
-  <type>$encoder.xmlEncode( $validationRule.type )</type>
-  <operator>$encoder.xmlEncode( $validationRule.operator )</operator>
-  <leftSideDescription>$encoder.xmlEncode( $validationRule.leftSide.description )</leftSideDescription>
-  <rightSideDescription>$encoder.xmlEncode( $validationRule.rightSide.description )</rightSideDescription>  
+  <type>$!encoder.xmlEncode( $validationRule.type )</type>
+  <operator>$!encoder.xmlEncode( $validationRule.operator )</operator>
+  <leftSideDescription>$!encoder.xmlEncode( $validationRule.leftSide.description )</leftSideDescription>
+  <rightSideDescription>$!encoder.xmlEncode( $validationRule.rightSide.description )</rightSideDescription>  
 </validationRule>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/responseValidationRuleGroup.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/responseValidationRuleGroup.vm	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/responseValidationRuleGroup.vm	2009-09-05 09:34:43 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <validationRuleGroup>
-    <id>$validationRuleGroup.id</id>
-    <name>$encoder.xmlEncode( $validationRuleGroup.name )</name>
-    <description>$encoder.xmlEncode( $validationRuleGroup.description )</description>
+    <id>$!validationRuleGroup.id</id>
+    <name>$!encoder.xmlEncode( $validationRuleGroup.name )</name>
+    <description>$!encoder.xmlEncode( $validationRuleGroup.description )</description>
     <memberCount>$memberCount</memberCount>
 </validationRuleGroup>