← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13827: Changed the key for positive integers from positiveNumber to posInt. Changed the key for negative...

 

------------------------------------------------------------
revno: 13827
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-01-23 16:09:55 +0200
message:
  Changed the key for positive integers from positiveNumber to posInt. Changed the key for negative integers from negativeNumber to getInt. Moved validation javascript functions from commons.js into a new file dhis2.validation.js and put functions inside namespace.
added:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.validation.js
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleDataEntryForm.vm
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.array.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.select.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm
  dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/org/hisp/dhis/de/i18n_module.properties
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/history.js
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntrySection.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_es.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_fr.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_id.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_lo.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_my.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_pt.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_pt_BR.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_ru.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_tg.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_vi.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_zh.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementForm.vm
  dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/dataEntrySection.vm
  dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/editDataValue.js


--
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-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2014-01-07 19:29:07 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2014-01-23 14:09:55 +0000
@@ -88,10 +88,11 @@
     public static final String VALUE_TYPE_BOOL = "bool";
     public static final String VALUE_TYPE_TRUE_ONLY = "trueOnly";
     public static final String VALUE_TYPE_DATE = "date";
+    public static final String VALUE_TYPE_UNIT_INTERVAL = "unitInterval";
 
     public static final String VALUE_TYPE_ZERO_OR_POSITIVE_INT = "zeroPositiveInt";
-    public static final String VALUE_TYPE_POSITIVE_INT = "positiveNumber";
-    public static final String VALUE_TYPE_NEGATIVE_INT = "negativeNumber";
+    public static final String VALUE_TYPE_POSITIVE_INT = "posInt";
+    public static final String VALUE_TYPE_NEGATIVE_INT = "negInt";
     public static final String VALUE_TYPE_TEXT = "text";
     public static final String VALUE_TYPE_LONG_TEXT = "longText";
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2014-01-23 11:54:46 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2014-01-23 14:09:55 +0000
@@ -264,6 +264,8 @@
         executeSql( "ALTER TABLE section DROP CONSTRAINT section_name_key" );
         executeSql( "UPDATE patientattribute set inheritable=false where inheritable is null" );
         executeSql( "UPDATE dataelement SET numbertype='number' where numbertype is null and valuetype='int'" );
+        executeSql( "UPDATE dataelement SET valuetype='posInt' where valuetype='positiveNumber'" );
+        executeSql( "UPDATE dataelement SET valuetype='negInt' where valuetype='negativeNumber'" );
 
         // revert prepare aggregate*Value tables for offline diffs
 

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2014-01-05 14:04:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2014-01-23 14:09:55 +0000
@@ -63,9 +63,9 @@
 intro_manual_person_aggregation=Generate routine data values from patient data by month (or other intervals if desired) and organisation unit.
 from=From
 to=To
-value_must_number=Value must be an number
+value_must_number=Value must be a number
 value_must_positive_integer=Value must be a positive integer
-value_must_zero_or_positive_integer=Value must be a positive integer or zero.
+value_must_zero_or_positive_integer=Value must be a positive integer or zero
 value_must_negative_integer=Value must be a negative integer
 days=days
 please_select=Please select

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2014-01-08 05:12:20 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2014-01-23 14:09:55 +0000
@@ -2472,7 +2472,7 @@
 			{
 				return 'float';
 			}
-			if( type == 'int' || type == 'positiveNumber'  || type == 'negativeNumber' || type == 'zeroPositiveInt' )
+			if( type == 'int' || type == 'posInt'  || type == 'negInt' || type == 'zeroPositiveInt' )
 			{
 				return 'numeric';
 			}
@@ -2492,7 +2492,7 @@
 			{
 				return 'datefield';
 			}
-			if( type == 'number' || type == 'int' || type == 'positiveNumber'  || type == 'negativeNumber' || type == 'zeroPositiveInt' )
+			if( type == 'number' || type == 'int' || type == 'posInt'  || type == 'negInt' || type == 'zeroPositiveInt' )
 			{
 				return 'numberfield';
 			}

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2014-01-08 15:08:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2014-01-23 14:09:55 +0000
@@ -1887,12 +1887,12 @@
 		alert(i18n_enter_values_for_longitude_and_latitude_fields);
 		isValid = false;
 	}	
-	else if(!isNumber(longitude)){
+	else if(!dhis2.validation.isNumber(longitude)){
 		byId('longitude').style.backgroundColor = '#ffcc00';
 		alert(i18n_enter_a_valid_number);
 		isValid = false;
 	}
-	else if(!isNumber(latitude)){
+	else if(!dhis2.validation.isNumber(latitude)){
 		byId('latitude').style.backgroundColor = '#ffcc00';
 		alert(i18n_enter_a_valid_number);
 		isValid = false;

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js	2013-11-07 17:24:50 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js	2014-01-23 14:09:55 +0000
@@ -28,8 +28,8 @@
     field.style.backgroundColor = SAVING_COLOR;
 
     if ( fieldValue != '' ) {
-        if ( type == 'int' || type == 'number' || type == 'positiveNumber' || type == 'negativeNumber' || type == 'zeroPositiveInt' ) {
-            if ( type == 'int' && !isInt( fieldValue ) ) {
+        if ( type == 'int' || type == 'number' || type == 'posInt' || type == 'negInt' || type == 'zeroPositiveInt' ) {
+            if ( type == 'int' && !dhis2.validation.isInt( fieldValue ) ) {
                 field.style.backgroundColor = '#ffcc00';
 
                 window.alert( i18n_value_must_integer + '\n\n' + dataElementName );
@@ -38,28 +38,28 @@
 
                 return;
             }
-            else if ( type == 'number' && !isNumber( fieldValue ) ) {
+            else if ( type == 'number' && !dhis2.validation.isNumber( fieldValue ) ) {
                 field.style.backgroundColor = '#ffcc00';
                 window.alert( i18n_value_must_number + '\n\n' + dataElementName );
                 field.focus();
 
                 return;
             }
-            else if ( type == 'positiveNumber' && !isPositiveInt( fieldValue ) ) {
+            else if ( type == 'posInt' && !dhis2.validation.isPositiveInt( fieldValue ) ) {
                 field.style.backgroundColor = '#ffcc00';
                 window.alert( i18n_value_must_positive_integer + '\n\n' + dataElementName );
                 field.focus();
 
                 return;
             }
-            else if ( type == 'negativeNumber' && !isNegativeInt( fieldValue ) ) {
+            else if ( type == 'negInt' && !dhis2.validation.isNegativeInt( fieldValue ) ) {
                 field.style.backgroundColor = '#ffcc00';
                 window.alert( i18n_value_must_negative_integer + '\n\n' + dataElementName );
                 field.focus();
 
                 return;
             }
-            else if ( type == 'zeroPositiveInt' && !isZeroOrPositiveInt( fieldValue ) ) {
+            else if ( type == 'zeroPositiveInt' && !dhis2.validation.isZeroOrPositiveInt( fieldValue ) ) {
                 field.style.backgroundColor = '#ffcc00';
                 window.alert( i18n_value_must_zero_or_positive_integer + '\n\n' + dataElementName );
                 field.focus();

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleDataEntryForm.vm	2013-10-16 17:29:40 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleDataEntryForm.vm	2014-01-23 14:09:55 +0000
@@ -87,9 +87,9 @@
 											#set($validate = '')
 											#if( $type=='number' ) 
 												#set($validate="number:true") 
-											#elseif( $type=='positiveNumber' )
+											#elseif( $type=='posInt' )
 												#set($validate="positive_integer:true") 
-											#elseif( $type=='negativeNumber' )
+											#elseif( $type=='negInt' )
 												#set($validate="negative_integer:true")
 											#elseif( $type=='zeroPositiveInt' )
 												#set($validate="zeroPositiveInt:true")
@@ -219,9 +219,9 @@
 			#set($validate = '')
 			#if( $type=='number' ) 
 				#set($validate="number:true") 
-			#elseif( $type=='positiveNumber' )
+			#elseif( $type=='posInt' )
 				#set($validate="positive_integer:true") 
-			#elseif( $type=='negativeNumber' )
+			#elseif( $type=='negInt' )
 				#set($validate="negative_integer:true")
 			#elseif( $type=='zeroPositiveInt' )
 				#set($validate="zeroPositiveInt:true")

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2013-12-08 22:46:57 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2014-01-23 14:09:55 +0000
@@ -26,7 +26,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-
 dhis2.util.namespace( 'dhis2.commons' );
 
 dhis2.commons.getCurrentPage = function() {
@@ -1659,85 +1658,11 @@
     return false;
 }
 
-// -----------------------------------------------------------------------------
-// Math methods
-// -----------------------------------------------------------------------------
-
-/**
- * Allow Zero likes 0 and 0.0x In which, x is Multiple leading zero.
- */
-function isValidZeroNumber( value )
-{
-	var regex = /^0(\.0*)?$/;
-	return regex.test( value );
-}
-
-/**
- * Allow only integers or a single Zero. No thousands seperators
- */
-function isInt(value)
-{
-	var regex = /^(0|-?[1-9]\d*)$/;
-	return regex.test( value );
-}
-
-/**
- * Allow only positive integers, not Zero and no thousands seperators
- */
-function isPositiveInt( value )
-{
-	var regex = /^[1-9]\d*$/;
-	return regex.test( value );
-}
-
-/**
- * Allow only zero or positive integers, no thousands seperators
- */
-function isZeroOrPositiveInt( value )
-{
-	var regex = /(^0$)|(^[1-9]\d*$)/;
-	return regex.test( value );
-}
-
-/**
- * Allow only negative integers, not Zero and no thousands seperators
- */
-function isNegativeInt( value )
-{
-	var regex = /^-[1-9]\d*$/;
-	return regex.test( value );
-}
-
-/**
- * Allow any real number,optionally with a sign, no thousands seperators and a
- * single decimal point.
- */
-function isNumber( value )
-{
-	var regex = /^(-?0|-?[1-9]\d*)(\.\d+)?(E\d+)?$/;
-	return regex.test( value );
-}
-
 function startsWith( string, substring )
 {
 	return ( string && string.lastIndexOf( substring, 0 ) === 0 ) ? true : false;
 }
 
-function isPositiveNumber( value )
-{
-	return isNumber( value ) && parseFloat( value ) > 0;
-}
-
-function isNegativeNumber( value )
-{
-	return isNumber( value ) && parseFloat( value ) < 0;
-}
-
-function isZeroNumber( value )
-{
-	return isNumber( value ) && parseFloat( value ) == 0;
-}
-
 function getRandomNumber()
 {
 	return Math.floor( 100000000 * Math.random() );

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.array.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.array.js	2013-08-23 16:11:13 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.array.js	2014-01-23 14:09:55 +0000
@@ -26,7 +26,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-
 dhis2.util.namespace( 'dhis2.array' );
 
 /**

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.select.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.select.js	2013-08-23 16:11:13 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.select.js	2014-01-23 14:09:55 +0000
@@ -26,7 +26,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-
 dhis2.util.namespace( 'dhis2.select' );
 
 /**

=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.validation.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.validation.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.validation.js	2014-01-23 14:09:55 +0000
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2004-2013, 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.
+ */
+
+dhis2.util.namespace( 'dhis2.validation' );
+
+/**
+ * Checks if the given value is valid zero.
+ */
+dhis2.validation.isValidZeroNumber = function( value )
+{
+	var regex = /^0(\.0*)?$/;
+	return regex.test( value );
+};
+
+/**
+ * Allow only integers or a single zero and no thousands separators.
+ */
+dhis2.validation.isInt = function(value)
+{
+	var regex = /^(0|-?[1-9]\d*)$/;
+	return regex.test( value );
+};
+
+/**
+ * Allow only positive integers, not zero, no thousands separators.
+ */
+dhis2.validation.isPositiveInt = function( value )
+{
+	var regex = /^[1-9]\d*$/;
+	return regex.test( value );
+};
+
+/**
+ * Allow only zero or positive integers, no thousands separators.
+ */
+dhis2.validation.isZeroOrPositiveInt = function( value )
+{
+	var regex = /(^0$)|(^[1-9]\d*$)/;
+	return regex.test( value );
+};
+
+/**
+ * Allow only negative integers, not zero and no thousands separators.
+ */
+dhis2.validation.isNegativeInt = function( value )
+{
+	var regex = /^-[1-9]\d*$/;
+	return regex.test( value );
+};
+
+/**
+ * Allow any real number,optionally with a sign, no thousands separators and a
+ * single decimal point.
+ */
+dhis2.validation.isNumber = function( value )
+{
+	var regex = /^(-?0|-?[1-9]\d*)(\.\d+)?(E\d+)?$/;
+	return regex.test( value );
+};
+
+/**
+ * Checks if the given value is a valid positive number.
+ */
+dhis2.validation.isPositiveNumber = function( value )
+{
+	return dhis2.validation.isNumber( value ) && parseFloat( value ) > 0;
+};
+
+/**
+ * Checks if the given value is a valid negative number.
+ */
+dhis2.validation.isNegativeNumber = function( value )
+{
+	return dhis2.validation.isNumber( value ) && parseFloat( value ) < 0;
+};

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js	2013-09-20 15:13:05 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js	2014-01-23 14:09:55 +0000
@@ -417,23 +417,23 @@
 });
 
 jQuery.validator.addMethod("number", function(value, element, param) {
-    return this.optional(element) || isNumber(value);
+    return this.optional(element) || dhis2.validation.isNumber(value);
 });
 
 jQuery.validator.addMethod("integer", function(value, element, param) {
-    return this.optional(element) || isInt(value);
+    return this.optional(element) || dhis2.validation.isInt(value);
 });
 
 jQuery.validator.addMethod("positive_integer", function(value, element, param) {
-    return this.optional(element) || isPositiveInt(value);
+    return this.optional(element) || dhis2.validation.isPositiveInt(value);
 });
 
 jQuery.validator.addMethod("negative_integer", function(value, element, param) {
-    return this.optional(element) || isNegativeInt(value);
+    return this.optional(element) || dhis2.validation.isNegativeInt(value);
 });
 
 jQuery.validator.addMethod("zero_positive_int", function(value, element, param) {
-    return this.optional(element) || isZeroOrPositiveInt(value);
+    return this.optional(element) || dhis2.validation.isZeroOrPositiveInt(value);
 });
 
 // Support method for date

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm	2014-01-22 12:06:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm	2014-01-23 14:09:55 +0000
@@ -57,6 +57,7 @@
     <script type="text/javascript" src="../dhis-web-commons/javascripts/dhis2/dhis2.availability.js?_rev=$!{buildRevision}"></script>
     <script type="text/javascript" src="../dhis-web-commons/javascripts/dhis2/dhis2.trigger.js?_rev=$!{buildRevision}"></script>
     <script type="text/javascript" src="../dhis-web-commons/javascripts/dhis2/dhis2.sharing.js?_rev=$!{buildRevision}"></script>
+    <script type="text/javascript" src="../dhis-web-commons/javascripts/dhis2/dhis2.validation.js?_rev=$!{buildRevision}"></script>
     <script type="text/javascript" src="../dhis-web-commons/javascripts/dhis2/dhis2.storage.ss.js?_rev=$!{buildRevision}"></script>
     <script type="text/javascript" src="../dhis-web-commons/javascripts/dhis2/dhis2.storage.ls.js?_rev=$!{buildRevision}"></script>
     <script type="text/javascript" src="../dhis-web-commons/javascripts/dhis2/dhis2.storage.idb.js?_rev=$!{buildRevision}"></script>

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/org/hisp/dhis/de/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/org/hisp/dhis/de/i18n_module.properties	2014-01-23 11:54:46 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/org/hisp/dhis/de/i18n_module.properties	2014-01-23 14:09:55 +0000
@@ -22,7 +22,7 @@
 later_periods=Later periods
 value_of_data_element_less=The value of the following data element is less than the minimum accepted value
 value_of_data_element_greater=The value of the following data element is greater than the maximum accepted value
-value_must_integer=Value must be an integer and maximum length not exceeds 255 characters
+value_must_integer=Value must be an integer
 saving_value_failed_status_code=Saving value failed with status code
 saving_value_failed_dataset_is_locked=Data set is locked, please contact admin
 saving_comment_failed_status_code=Saving comment failed with status code
@@ -62,9 +62,9 @@
 datavalue_history=Data value history
 enter_digits=Enter digit only.
 value_must_number=Value must be an number
-value_must_positive_integer=Value must be an positive integer
-value_must_negative_integer=Value must be an negative integer
-value_must_zero_or_positive_integer=Value must be zero or positive integer
+value_must_positive_integer=Value must be a positive integer
+value_must_negative_integer=Value must be a negative integer
+value_must_zero_or_positive_integer=Value must be zero or a positive integer
 value_is_too_long=Value is too long
 field_unallowed_save_zero=This element does not permit 0 values. The original value will not be affected.
 datavalue_history=Data value history

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js	2014-01-23 09:31:23 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js	2014-01-23 14:09:55 +0000
@@ -140,33 +140,33 @@
 	
     if ( value != '' )
     {
-        if ( type == 'string' || type == 'int' || type == 'number' || type == 'positiveNumber' || type == 'negativeNumber' || type == 'zeroPositiveInt' )
+        if ( type == 'string' || type == 'int' || type == 'number' || type == 'posInt' || type == 'negInt' || type == 'zeroPositiveInt' )
         {
             if ( value.length > 255 )
             {
-                return alertField( fieldId, i18n_value_too_long + ': ' + dataElementName );
-            }
-            if ( type == 'int' && !isInt( value ) )
-            {
-                return alertField( fieldId, i18n_value_must_integer + ': ' + dataElementName );
-            }
-            if ( type == 'number' && !isNumber( value ) )
-            {
-                return alertField( fieldId, i18n_value_must_number + ': ' + dataElementName );
-            }
-            if ( type == 'positiveNumber' && !isPositiveInt( value ) )
-            {
-                return alertField( fieldId, i18n_value_must_positive_integer + ': ' + dataElementName );
-            }
-            if ( type == 'negativeNumber' && !isNegativeInt( value ) )
-            {
-                return alertField( fieldId, i18n_value_must_negative_integer + ': ' + dataElementName );
-            }
-            if ( type == 'zeroPositiveInt' && !isZeroOrPositiveInt( value ) )
-            {
-                return alertField( fieldId, i18n_value_must_zero_or_positive_integer + ': ' + dataElementName );
-            }
-            if ( isValidZeroNumber( value ) )
+                return alertField( fieldId, i18n_value_too_long + '\n\n' + dataElementName );
+            }
+            if ( type == 'int' && !dhis2.validation.isInt( value ) )
+            {
+                return alertField( fieldId, i18n_value_must_integer + '\n\n' + dataElementName );
+            }
+            if ( type == 'number' && !dhis2.validation.isNumber( value ) )
+            {
+                return alertField( fieldId, i18n_value_must_number + '\n\n' + dataElementName );
+            }
+            if ( type == 'posInt' && !dhis2.validation.isPositiveInt( value ) )
+            {
+                return alertField( fieldId, i18n_value_must_positive_integer + '\n\n' + dataElementName );
+            }
+            if ( type == 'negInt' && !dhis2.validation.isNegativeInt( value ) )
+            {
+                return alertField( fieldId, i18n_value_must_negative_integer + '\n\n' + dataElementName );
+            }
+            if ( type == 'zeroPositiveInt' && !dhis2.validation.isZeroOrPositiveInt( value ) )
+            {
+                return alertField( fieldId, i18n_value_must_zero_or_positive_integer + '\n\n' + dataElementName );
+            }
+            if ( dhis2.validation.isValidZeroNumber( value ) )
             {
                 // If value = 0 and zero not significant for data element, skip
 

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/history.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/history.js	2014-01-03 09:14:06 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/history.js	2014-01-23 14:09:55 +0000
@@ -92,7 +92,7 @@
     {
         return;
     }
-    else if ( !isInt( minValue ) )
+    else if ( !dhis2.validation.isInt( minValue ) )
     {
         $( '#minSpan' ).html( i18n_enter_digits );
         return;
@@ -106,7 +106,7 @@
     {
         return;
     }
-    else if ( !isInt( maxValue ) )
+    else if ( !dhis2.validation.isInt( maxValue ) )
     {
         $( '#maxSpan' ).html( i18n_enter_digits );
         return;

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntrySection.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntrySection.vm	2013-10-07 17:58:57 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntrySection.vm	2014-01-23 14:09:55 +0000
@@ -80,9 +80,9 @@
 					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
 				#elseif( $dataElement.type == "int" && $dataElement.numberType == "int" )
 					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
-				#elseif( $dataElement.type == "int" && $dataElement.numberType == "positiveNumber" )
+				#elseif( $dataElement.type == "int" && $dataElement.numberType == "posInt" )
 					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
-				#elseif( $dataElement.type == "int" && $dataElement.numberType == "negativeNumber" )
+				#elseif( $dataElement.type == "int" && $dataElement.numberType == "negInt" )
 					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
 				#elseif( $dataElement.type == "int" && $dataElement.numberType == "zeroPositiveInt" )
 					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties	2013-12-30 09:44:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties	2014-01-23 14:09:55 +0000
@@ -183,9 +183,9 @@
 move_selected=Move selected
 number_value_type=Number type
 int=Integer
-positiveNumber=Positive Integer
-zeroPositiveInt=Positive or Zero Integer
-negativeNumber=Negative Integer
+positive_integer=Positive Integer
+zero_positive_int=Positive or Zero Integer
+negative_integer=Negative Integer
 view_1=View 1
 view_2=View 2
 store_zero_data_values=Store Zero Data Value

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_es.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_es.properties	2013-10-15 10:49:14 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_es.properties	2014-01-23 14:09:55 +0000
@@ -37,12 +37,12 @@
 intro_indicator_type=Crear, modificar, ver y eliminar tipos de Indicadores. Un tipo de Indicador es un factor para el mismo, como por ejemplo porcentaje.
 must_include_category_option=Por favor, incluya una o m\u00e1s opciones de categor\u00eda
 name_aldready_exists=\u00a1El nombre ya existe!
-negativeNumber=Entero Negativo
+negative_integer=Entero Negativo
 no_of_days=N\u00famero de d\u00edas
 number_value_type=Tipo de n\u00famero
 option_rename_successfully=Opci\u00f3n renombrada
 patient=Paciente
-positiveNumber=Entero positivo
+positive_integer=Entero positivo
 saving_concept_failed=Fallo al guardar el concepto
 select_dataelement=Seleccione un elemento de datos
 selected_aggregation_levels=Niveles de agregaci\u00f3n seleccionados

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_fr.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_fr.properties	2013-12-19 08:19:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_fr.properties	2014-01-23 14:09:55 +0000
@@ -39,7 +39,7 @@
 edit_data_element_group=Modifier un groupe d'\u00E9l\u00E9ments de donn\u00E9es
 update_dataelement_group_members=Mise \u00E0 jour le membre du groupe d'\u00E9l\u00E9ment de donn\u00E9es
 name_aldready_exists=Le nom existe d\u00E9j\u00E0\!
-zeroPositiveInt=Entier positif ou nul
+zero_positive_int=Entier positif ou nul
 data_element_category_option=Option de cat\u00E9gorie d'\u00E9l\u00E9ment de donn\u00E9e
 data_element_category_combo_management=Gestion de combinaison de cat\u00E9gories d'\u00E9l\u00E9ment de donn\u00E9e
 available_dataelementgroup=Groupes d'\u00E9l\u00E9ments de donn\u00E9es disponibles
@@ -158,7 +158,7 @@
 select_data_dictionary=Selectionner un dictionnaire de donn\u00E9es
 confirm_delete_data_element_category_option=Etes-vous s\u00FBr de vouloir supprimer cette option de cat\u00E9gorie d'\u00E9l\u00E9ment de donn\u00E9e?
 text_type=Type de texte
-negativeNumber=Entier n\u00E9gatif
+negative_integer=Entier n\u00E9gatif
 domain_type=Type de domaine
 add_dataelementgroupset=Ajouter un ensemble de groupes d'\u00E9l\u00E9ments de donn\u00E9es
 indicator_group_management=Gestion groupes d'indicateurs
@@ -206,6 +206,6 @@
 code_in_use=Le code de l'\u00E9l\u00E9ment de donn\u00E9e existe d\u00E9j\u00E0. Veuillez choisir un autre
 intro_data_element=Cr\u00E9er, modifier, voir et supprimer des \u00E9l\u00E9ments de donn\u00E9es.Les \u00E9l\u00E9ments de donn\u00E9es sont des ph\u00E9nom\u00E8nes pour lesquels les donn\u00E9es seront collect\u00E9es et analys\u00E9es
 data_element=\u00C9l\u00E9ment de donn\u00E9e
-positiveNumber=Entier positif
+positive_integer=Entier positif
 available_aggregation_levels=Niveaux d'agr\u00E9gation disponibles
 indicator_group_set=Ensemble de groupes d'indicateurs

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_id.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_id.properties	2013-07-02 15:58:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_id.properties	2014-01-23 14:09:55 +0000
@@ -182,8 +182,8 @@
 move_selected=Move selected
 number_value_type=Number type
 int=Integer
-positiveNumber=Positive Integer
-negativeNumber=Negative Integer
+positive_integer=Positive Integer
+negative_integer=Negative Integer
 view_1=View 1
 view_2=View 2
 store_zero_data_values=Store Zero Data Value

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_lo.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_lo.properties	2013-12-11 13:39:15 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_lo.properties	2014-01-23 14:09:55 +0000
@@ -182,9 +182,9 @@
 move_selected=Move selected
 number_value_type=Number type
 int=Integer
-positiveNumber=Positive Integer
-zeroPositiveInt=Positive or Zero Integer
-negativeNumber=Negative Integer
+positive_integer=Positive Integer
+zero_positive_int=Positive or Zero Integer
+negative_integer=Negative Integer
 view_1=View 1
 view_2=View 2
 store_zero_data_values=Store Zero Data Value

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_my.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_my.properties	2013-07-02 15:58:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_my.properties	2014-01-23 14:09:55 +0000
@@ -183,8 +183,8 @@
 move_selected=\u101b\u103d\u1031\u1038\u1001\u103b\u101a\u103a\u1019\u103e\u102f\u1000\u102d\u102f \u101b\u103d\u1031\u1038\u1015\u102b\u104b
 number_value_type=\u1000\u102d\u1014\u103a\u1038\u1002\u100f\u1014\u103a\u1038\u1021\u101b\u1031\u1010\u103d\u1000\u103a
 int=\u1000\u102d\u1014\u103a\u1038\u1002\u100f\u1014\u103a\u1038
-positiveNumber=\u1021\u1015\u1031\u102b\u1004\u103a\u1038 \u1000\u102d\u1014\u103a\u1038\u1002\u100f\u1014\u103a\u1038
-negativeNumber=\u1021\u1014\u102f\u1010\u103a \u1000\u102d\u1014\u103a\u1038\u1002\u100f\u1014\u103a\u1038
+positive_integer=\u1021\u1015\u1031\u102b\u1004\u103a\u1038 \u1000\u102d\u1014\u103a\u1038\u1002\u100f\u1014\u103a\u1038
+negative_integer=\u1021\u1014\u102f\u1010\u103a \u1000\u102d\u1014\u103a\u1038\u1002\u100f\u1014\u103a\u1038
 view_1=\u1019\u103c\u1004\u103a\u1000\u103d\u1004\u103a\u1038 \u1041
 view_2=\u1019\u103c\u1004\u103a\u1000\u103d\u1004\u103a\u1038 \u1042
 store_zero_data_values=data \u1010\u1014\u103a\u1016\u102d\u102f\u1038\u1017\u101c\u102c\u1000\u102d\u102f \u101e\u102d\u1019\u103a\u1038\u101e\u100a\u103a\u104b

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_pt.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_pt.properties	2013-12-01 20:40:15 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_pt.properties	2014-01-23 14:09:55 +0000
@@ -39,7 +39,7 @@
 edit_data_element_group=Editar grupo de elementos de dados
 update_dataelement_group_members=Adicionar conjunto de grupo de elemento de dado
 name_aldready_exists=Nome j\u00E1 existe\!
-zeroPositiveInt=Inteiro positivo ou zero
+zero_positive_int=Inteiro positivo ou zero
 data_element_category_option=Elemento de dados Op\u00E7\u00E3o da categoria de Elementos de Dados
 data_element_category_combo_management=Gest\u00E3o de combina\u00E7\u00E3o de categoria de elemento de dado
 available_dataelementgroup=Grupos Elemento de dados dispon\u00EDveis
@@ -157,7 +157,7 @@
 select_data_dictionary=Seleccione dicion\u00E1rio de dados
 text_type=Tipo de texto
 confirm_delete_data_element_category_option=Tem certeza de que deseja excluir esta op\u00E7\u00E3o de categoria de elemento dados?
-negativeNumber=Inteiro negativo
+negative_integer=Inteiro negativo
 domain_type=Tipo de dom\u00EDnio
 add_dataelementgroupset=Adicionar conjunto de grupo de elemento de dado
 indicator_group_management=Gest\u00E3o de grupo de indicador
@@ -206,5 +206,5 @@
 intro_data_element=Criar, modificar, exibir e excluir elementos de dados. Elementos de dados s\u00E3o fen\u00F4menos para os quais ser\u00E3o capturados e analisados.
 data_element=Elemento de Dados
 available_aggregation_levels=N\u00EDveis de agrega\u00E7\u00E3o dispon\u00EDvel
-positiveNumber=Inteiro positivo
+positive_integer=Inteiro positivo
 indicator_group_set=Conjunto de grupo de indicador

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_pt_BR.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_pt_BR.properties	2013-10-07 17:59:52 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_pt_BR.properties	2014-01-23 14:09:55 +0000
@@ -155,7 +155,7 @@
 select_data_dictionary=Selecione dicion\u00E1rio de dados
 confirm_delete_data_element_category_option=Tem certeza de que deseja excluir esta op\u00E7\u00E3o de categoria de elemento dados?
 text_type=Tipo de texto
-negativeNumber=Inteiro negativo
+negative_integer=Inteiro negativo
 domain_type=Tipo de dom\u00EDnio
 add_dataelementgroupset=Adicionar conjunto de grupo de elemento de dado
 indicator_group_management=Gest\u00E3o de grupo de indicador
@@ -202,7 +202,7 @@
 code_in_use=O c\u00F3digo de elemento de dados j\u00E1 est\u00E1 em uso. Por favor, escolha um c\u00F3digo de elemento de dados diferentes
 intro_data_element=Criar, modificar, exibir e excluir elementos de dados. Elementos de dados s\u00E3o fen\u00F4menos para os quais ser\u00E3o capturados e analisados.
 data_element=Elemento de Dados
-positiveNumber=Inteiro posetivo
-zeroPositiveInt=Inteiro posetivo ou zero
+positive_integer=Inteiro posetivo
+zero_positive_int=Inteiro posetivo ou zero
 available_aggregation_levels=N\u00EDveis de agrega\u00E7\u00E3o dispon\u00EDvel
 indicator_group_set=Conjunto de grupo de indicador

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_ru.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_ru.properties	2013-09-27 05:25:22 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_ru.properties	2014-01-23 14:09:55 +0000
@@ -1,4 +1,4 @@
-aggregate = \u0410\u0433\u0433\u0440\u0435\u0433\u0438\u0440\u043E\u0432\u0430\u0442\u044C
+aggregate = \u0410\u0433\u0433\u0440\u0435\u0433\u0438\u0440\u043E\u0432\u0430\u0442\u044C
 patient = \u041B\u0438\u0446\u043E
 no_option_assigned = \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435 \u043A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u0438 \u0441 \u043F\u0443\u0441\u0442\u044B\u043C\u0438 \u043E\u043F\u0446\u0438\u044F\u043C\u0438 \u043D\u0435 \u0434\u043E\u043F\u0443\u0441\u043A\u0430\u0435\u0442\u0441\u044F
 number_of_category_options = \u0427\u0438\u0441\u043B\u043E \u043E\u043F\u0446\u0438\u0439 \u043F\u043E \u043A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u0438
@@ -182,8 +182,8 @@
 move_selected = \u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0435
 number_value_type = \u0422\u0438\u043F \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u0430
 int = \u0427\u0438\u0441\u043B\u043E
-positiveNumber = \u041F\u043E\u043B\u043E\u0436\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0446\u0435\u043B\u043E\u0435 \u0447\u0438\u0441\u043B\u043E
-negativeNumber = \u041E\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0446\u0435\u043B\u043E\u0435 \u0447\u0438\u0441\u043B\u043E
+positive_integer = \u041F\u043E\u043B\u043E\u0436\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0446\u0435\u043B\u043E\u0435 \u0447\u0438\u0441\u043B\u043E
+negative_integer = \u041E\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0446\u0435\u043B\u043E\u0435 \u0447\u0438\u0441\u043B\u043E
 view_1 = \u0412\u0438\u0434 1
 view_2 = \u0412\u0438\u0434 2
 store_zero_data_values = \u0425\u0440\u0430\u043D\u0438\u0442\u044C \u043D\u0443\u043B\u0435\u0432\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0434\u0430\u043D\u043D\u044B\u0445

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_tg.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_tg.properties	2013-09-27 05:25:22 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_tg.properties	2014-01-23 14:09:55 +0000
@@ -1,4 +1,4 @@
-aggregate = \u04B2\u0430\u043C\u0440\u043E\u04B3\u043A\u0443\u043D\u04E3
+aggregate = \u04B2\u0430\u043C\u0440\u043E\u04B3\u043A\u0443\u043D\u04E3
 patient = \u0428\u0430\u0445\u0441
 no_option_assigned = \u0418\u0441\u0442\u0438\u0444\u043E\u0434\u0430\u0438 \u043A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u044F \u0431\u043E \u0438\u043C\u043A\u043E\u043D\u0438 \u0445\u043E\u043B\u04E3 \u0438\u04B7\u043E\u0437\u0430\u0442 \u043D\u0435\u0441\u0442!
 number_of_category_options = \u0428\u0443\u043C\u043E\u0440\u0430\u0438 \u0438\u043C\u043A\u043E\u043D\u043E\u0442\u0438 \u043A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u044F
@@ -182,8 +182,8 @@
 move_selected = \u0418\u043D\u0442\u0438\u049B\u043E\u043B\u0438 \u0438\u043D\u0442\u0438\u0445\u043E\u0431\u0448\u0443\u0434\u0430\u04B3\u043E
 number_value_type = \u041D\u0430\u0432\u044A\u0438 \u0430\u0434\u0430\u0434
 int = \u0420\u0430\u049B\u0430\u043C
-positiveNumber = \u0410\u0434\u0430\u0434\u0438 \u0431\u0443\u0442\u0443\u043D\u0438 \u043C\u0443\u0441\u0431\u04E3
-negativeNumber = \u0410\u0434\u0430\u0434\u0438 \u0431\u0443\u0442\u0443\u043D\u0438 \u043C\u0430\u043D\u0444\u04E3
+positive_integer = \u0410\u0434\u0430\u0434\u0438 \u0431\u0443\u0442\u0443\u043D\u0438 \u043C\u0443\u0441\u0431\u04E3
+negative_integer = \u0410\u0434\u0430\u0434\u0438 \u0431\u0443\u0442\u0443\u043D\u0438 \u043C\u0430\u043D\u0444\u04E3
 view_1 = \u041D\u0430\u043C\u0443\u0434\u0438 1
 view_2 = \u041D\u0430\u043C\u0443\u0434\u0438 2
 store_zero_data_values = \u04B2\u0438\u0444\u0437 \u043A\u0430\u0440\u0434\u0430\u043D\u0438 \u049B\u0438\u043C\u0430\u0442\u04B3\u043E\u0438 \u0441\u0438\u0444\u0440\u04E3

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_vi.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_vi.properties	2013-07-02 15:58:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_vi.properties	2014-01-23 14:09:55 +0000
@@ -101,7 +101,7 @@
 update=C\u1eadp nh\u1eadt
 available_data_elements=Ph\u1ea7n t\u1eed d\u1eef li\u1ec7u c\u00f3 s\u1eb5n
 location=\u0110\u1ecbnh v\u1ecb
-positiveNumber=S\u1ed1 nguy\u00ean d\u01b0\u01a1ng
+positive_integer=S\u1ed1 nguy\u00ean d\u01b0\u01a1ng
 add_dataelementgroupset=Th\u00eam t\u1eadp h\u1ee3p nh\u00f3m ph\u1ea7n t\u1eed d\u1eef li\u1ec7u
 create_new_data_element=T\u1ea1o ph\u1ea7n t\u1eed d\u1eef li\u1ec7u m\u1edbi
 create_new_indicator=T\u1ea1o m\u1edbi ch\u1ec9 s\u1ed1
@@ -176,7 +176,7 @@
 adding_indicator_failed=Adding indicator failed
 saving_data_element_group_failed=L\u01b0u nh\u00f3m ph\u1ea7n t\u1eed d\u1eef li\u1ec7u kh\u00f4ng th\u00e0nh c\u00f4ng v\u1edbi th\u00f4ng b\u00e1o l\u1ed7i
 intro_data_element_category=T\u1ea1o, ch\u1ec9nh s\u1eeda, xem v\u00e0 x\u00f3a c\u00e1c m\u1ee5c ch\u1ecdn ph\u1ea7n t\u1eed d\u1eef li\u1ec7u. C\u00e1c ph\u00e2n lo\u1ea1i l\u00e0 s\u1ef1 chia nh\u1ecf h\u1ec7 th\u1ed1ng c\u00e1c ph\u1ea7n t\u1eed d\u1eef li\u1ec7u.
-negativeNumber=S\u1ed1 nguy\u00ean \u00e2m
+negative_integer=S\u1ed1 nguy\u00ean \u00e2m
 operations=C\u00e1c thao t\u00e1c
 indicator_groups=Nh\u00f3m ch\u1ec9 s\u1ed1
 data_element_category=Ph\u00e2n lo\u1ea1i ph\u1ea7n t\u1eed d\u1eef li\u1ec7u

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_zh.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_zh.properties	2013-07-02 15:58:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_zh.properties	2014-01-23 14:09:55 +0000
@@ -211,7 +211,7 @@
 update=\u66F4\u65B0 
 available_data_elements=\u53EF\u7528\u6570\u636E\u5143 
 location=\u4F4D\u7F6E
-positiveNumber=\u6B63\u6570
+positive_integer=\u6B63\u6570
 alphanumeric=\u5B57\u6BCD
 data_element_indicator_group=\u6570\u636E\u5143\u548C\u6307\u6807\u7EC4
 add_dataelementgroupset=\u6DFB\u52A0\u6570\u636E\u5143\u7EC4\u96C6
@@ -359,7 +359,7 @@
 saving_data_element_group_failed=\u4FDD\u5B58\u6570\u636E\u5143\u7EC4\u5931\u8D25
 intro_data_element_category=\u65B0\u5EFA\u3001\u66F4\u6539\u3001\u67E5\u770B\u548C\u5220\u9664\u6570\u636E\u5143\u5206\u7C7B\u3002\u5206\u7C7B\u662F\u5BF9\u6570\u636E\u5143\u66F4\u7EC6\u5316\u7684\u5206\u89E3
 adding_target_failed=\u6DFB\u52A0\u76EE\u6807\u5931\u8D25
-negativeNumber=\u8D1F\u6574\u6570
+negative_integer=\u8D1F\u6574\u6570
 operations=\u64CD\u4F5C
 specify_integer_factor=\u8BF7\u6307\u5B9A\u6574\u6570\u56E0\u5B50 
 indicator_groups=\u6307\u6807\u7EC4

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementForm.vm	2013-12-11 17:40:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementForm.vm	2014-01-23 14:09:55 +0000
@@ -118,9 +118,9 @@
             <select id="numberType" name="numberType">
 				<option value="number" #if( $!dataElement.numberType == 'number' ) selected="selected" #end style="min-width:246px;">$i18n.getString( "number" )</option>
 				<option value="int" #if( $!dataElement.numberType == 'int' ) selected="selected" #end>$i18n.getString( "int" )</option>
-				<option value="positiveNumber" #if( $!dataElement.numberType == 'positiveNumber' ) selected="selected" #end>$i18n.getString( "positiveNumber" )</option>
-				<option value="negativeNumber" #if( $!dataElement.numberType == 'negativeNumber' ) selected="selected" #end>$i18n.getString( "negativeNumber" )</option>
-				<option value="zeroPositiveInt" #if( $!dataElement.numberType == 'zeroPositiveInt' ) selected="selected" #end>$i18n.getString( "zeroPositiveInt" )</option>
+				<option value="posInt" #if( $!dataElement.numberType == 'posInt' ) selected="selected" #end>$i18n.getString( "positive_integer" )</option>
+				<option value="negInt" #if( $!dataElement.numberType == 'negInt' ) selected="selected" #end>$i18n.getString( "negative_integer" )</option>
+				<option value="zeroPositiveInt" #if( $!dataElement.numberType == 'zeroPositiveInt' ) selected="selected" #end>$i18n.getString( "zero_positive_int" )</option>
 			</select>
 			<script>
 			</script>

=== modified file 'dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/dataEntrySection.vm'
--- dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/dataEntrySection.vm	2013-09-20 15:13:05 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/dataEntrySection.vm	2014-01-23 14:09:55 +0000
@@ -89,11 +89,11 @@
 					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
 				#elseif( $dataElement.type == "int" && $dataElement.numberType == "int" )
 					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
-				#elseif( $dataElement.type == "int" && $dataElement.numberType == "positiveNumber" )
+				#elseif( $dataElement.type == "int" && $dataElement.numberType == "posInt" )
 					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
 				#elseif( $dataElement.type == "int" && $dataElement.numberType == "zeroPositiveInt" )
 					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
-				#elseif( $dataElement.type == "int" && $dataElement.numberType == "negativeNumber" )
+				#elseif( $dataElement.type == "int" && $dataElement.numberType == "negInt" )
 					<input type="text" maxlength="255" size="24" name="$key" value="$!dataValues.get($key)" />
 				#end
 				#end

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/editDataValue.js'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/editDataValue.js	2012-02-22 17:36:22 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/editDataValue.js	2014-01-23 14:09:55 +0000
@@ -10,7 +10,7 @@
 	
 	if ( field.value != '' )
 	{
-		if ( !isInt( field.value ) )
+		if ( !dhis2.validation.isInt( field.value ) )
 		{
 			alert( i18n_value_must_be_a_number );
 			
@@ -55,18 +55,6 @@
     valueSaver.save();
 }
 
-function isInt( value )
-{
-    var number = new Number( value );
-    
-    if ( isNaN( number ))
-    {
-        return false;
-    }
-    
-    return true;
-}
-
 function markFollowUp( valueId )
 {	
     var dataElementId = $( '#value-' + valueId + '-de' ).val();