← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3953: indentation fixes

 

------------------------------------------------------------
revno: 3953
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2011-06-19 14:30:00 +0300
message:
  indentation fixes
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js
  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.select.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.util.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisAjaxSelect.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/lists.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.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-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js	2011-06-16 06:33:06 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js	2011-06-19 11:30:00 +0000
@@ -4,283 +4,306 @@
 
 function DataDictionary()
 {
-	var ALL_KEY = 'all';
-	
-	var dataElementsGroups = new Array();
-	
-	var dataElementGroupList = new Array();	
-	
-	var indicatorGroups = new Array();
-	
-	var indicatorGroupList = new Array();	
-	
-	var categoryOptionComboList = new Array();
-	
-	var operandsByDataElementGroup = new Array();
-	
-	var params = {};
-	
-	var jQuerySelectionString;
-	
-	var url;
-	
-	this.loadDataElementGroups = function( jQuerySelectionString )
-	{
-		var target = jQuery( jQuerySelectionString );
-		
-		target.children().remove();
-		
-		if( dataElementsGroups.length == 0 )
-		{
-			jQuery.getJSON('../dhis-web-commons-ajax-json/getDataElementGroups.action',
-				function( json )
-				{
-					target.append('<option value="' + ALL_KEY + '">ALL</option>');
-					dataElementsGroups.push( new DataElementGroup(ALL_KEY, 'ALL') );
-
-					jQuery.each( json.dataElementGroups, function(i, item){
-						dataElementsGroups.push( new DataElementGroup(item.id, item.name) );
-						target.append('<option value="' + item.id + '">' + item.name + '</option>');
-					});					
-				}
-			);
-		} else {
-			jQuery.each( dataElementsGroups, function(i, item){
-				target.append('<option value="' + item.id + '">' + item.name + '</option>');
-			});		
-		}
-	}
-
-	this.loadAllDataElements = function( jQuerySelectionString )
-	{
-		this.loadDataElementsByGroup( '0', jQuerySelectionString);
-	}
-	
-	this.loadDataElementsByGroup = function( id, jQuerySelectionString )
-	{
-		var target = jQuery( jQuerySelectionString );
-
-		target.children().remove();
-
-		var des = dataElementGroupList[id];
-
-		if( des == null )
-		{	
-			des = new Array();
-
-			jQuery.getJSON('../dhis-web-commons-ajax-json/getDataElements.action',
-				{id:id},
-				function( json )
-				{
-					jQuery.each( json.dataElements, function(i, item) {
-						des.push( new DataElement(item.id, item.name) );
-						target.append('<option value="' + item.id + '">' + item.name + '</option>');
-					});
-
-					dataElementGroupList[id] = des;
-				}
-			);
-		} else {
-			jQuery.each( des, function(i, item) {
-				target.append('<option value="' + item.id + '">' + item.name + '</option>');
-			});		
-		}
-	}
-	
-	this.loadIndicatorGroups = function( jQuerySelectionString )
-	{
-		var target = jQuery( jQuerySelectionString );
-		
-		target.children().remove();
-		
-		if( indicatorGroups.length == 0 )
-		{
-			jQuery.getJSON('../dhis-web-commons-ajax-json/getIndicatorGroups.action',
-				function( json )
-				{
-					target.append('<option value="' + ALL_KEY + '">ALL</option>');
-					indicatorGroups.push( new IndicatorGroup( ALL_KEY, 'ALL') );
-					jQuery.each( json.indicatorGroups, function(i, item){
-						indicatorGroups.push( new IndicatorGroup(item.id, item.name) );
-						target.append('<option value="' + item.id + '">' + item.name + '</option>');
-					});					
-				}
-			);
-		} else {
-			jQuery.each( indicatorGroups, function(i, item){
-				target.append('<option value="' + item.id + '">' + item.name + '</option>');
-			});		
-		}	
-	}
-
-	this.loadAllIndicators = function( jQuerySelectionString )
-	{		
-		this.loadIndicatorsByGroup( ALL_KEY, jQuerySelectionString );
-	}
-
-	this.loadIndicatorsByGroup = function( id, jQuerySelectionString )
-	{
-		var target = jQuery( jQuerySelectionString );
-		
-		target.children().remove();
-		
-		var ins = indicatorGroupList[id];
-		
-		if( ins == null )
-		{	
-			ins = new Array();
-			
-			jQuery.getJSON('../dhis-web-commons-ajax-json/getIndicators.action',
-				{id:id},
-				function( json )
-				{
-					jQuery.each( json.indicators, function(i, item){
-						ins.push( new Indicator(item.id, item.name) );
-						target.append('<option value="' + item.id + '">' + item.name + '</option>');
-					});
-
-					indicatorGroupList[id] = ins;
-				}
-			);
-		} else {
-			jQuery.each( ins, function(i, item){
-				target.append('<option value="' + item.id + '">' + item.name + '</option>');
-			});		
-		}
-	}	
-	
-	this.loadCategoryOptionComboByDE = function( id, jQuerySelectionString )
-	{
-		var target = jQuery( jQuerySelectionString );
-		
-		target.children().remove();
-		
-		var options = categoryOptionComboList[id];
-		
-		if( options == null )
-		{	
-			options = new Array();
-
-			jQuery.getJSON('../dhis-web-commons-ajax-json/getCategoryOptionCombos.action',
-				{id:id},
-				function( json )
-				{
-					jQuery.each( json.categoryOptionCombos, function(i, item) {
-						options.push( new OptionCombo(item.id, item.name) );
-						target.append('<option value="' + item.id + '">' + item.name + '</option>');
-					});
-
-					categoryOptionComboList[id] = options;
-				}
-			);
-		} else {
-			jQuery.each( options, function(i, item) {
-				target.append('<option value="' + item.id + '">' + item.name + '</option>');
-			});		
-		}
-	}
-	
-	this.reloadOperands = function( currentpage )
-	{
-		this.params.currentPage = currentpage;
-		this.loadOperands( this.jQuerySelectionString, this.params );
-	}
-	
-	this.changeOperandsPageSize = function( pagesize )
-	{
-		this.params.pageSize = pagesize;
-		this.loadOperands( this.jQuerySelectionString, this.params );
-	}	
-	
-	this.loadOperands = function ( jQuerySelectionString, params )
-	{
-		var target = jQuery( jQuerySelectionString );
-		target.children().remove();	
-
-		this.params = params;
-		this.jQuerySelectionString = jQuerySelectionString;
-
-		jQuery.postJSON(	'../dhis-web-commons-ajax-json/getOperands.action',
-			this.params,
-			function( json )
-			{
-				if( json.operands.length == 0 )
-				{
-					setInnerHTML( 'formulaText', "<i style='color:red'>No dataelements to select</i>" );
-					return;
-				}
-				
-				jQuery.each( json.operands, function(i, item){					
-					target.append('<option value="[' + item.operandId + ']">' + item.operandName + '</option>');
-				});
-
-				if( params.usePaging ) {
-					var numberOfPages = json.paging.numberOfPages;
-					var currentPage = json.paging.currentPage;
-					var baseLink = json.paging.baseLink;
-					var pageSize = json.paging.pageSize;
-					var startPage = json.paging.startPage;
-
-					var html = '<div id="operandPaging_div">';
-
-					if( numberOfPages > 1 ) {
-						html += 'Page: <select onchange="dataDictionary.reloadOperands( this.value )">';
-
-						for(var i=1;i<=numberOfPages;i++) {
-							html += '<option value="' + i + '"' + ( currentPage==i?'selected=true':'' ) + '>' + i + '</option>';
-						}
-
-						html += '</select>';
-
-						if(currentPage == startPage) {
-							html += '<button type="button" disabled="disabled">Previous page</button>';
-							html += '<button type="button" onclick="dataDictionary.reloadOperands( ' + (parseInt( currentPage ) + 1) + ' )">Next page</button>';
-						} else if(currentPage == numberOfPages) {
-							html += '<button type="button" onclick="dataDictionary.reloadOperands( ' + (parseInt( currentPage ) - 1) + ' )">Previous page</button>';
-							html += '<button type="button" disabled="disabled">Next page</button>';
-						} else {
-							html += '<button type="button" onclick="dataDictionary.reloadOperands( ' + (parseInt( currentPage ) - 1) + ')">Previous page</button>';
-							html += '<button type="button" onclick="dataDictionary.reloadOperands( ' + (parseInt( currentPage ) + 1) + ')">Next page</button>';
-						}
-					}
-					
-					html += 'Size: <input type="text" style="width:50px" onchange="dataDictionary.changeOperandsPageSize( this.value )" value="' + pageSize + '"/></div>';
-					jQuery( '#operandPaging_div' ).remove();
-					jQuery( html ).insertAfter( target );
-				}
-			}
-		);
-	}	
+    var ALL_KEY = 'all';
+
+    var dataElementsGroups = new Array();
+
+    var dataElementGroupList = new Array();
+
+    var indicatorGroups = new Array();
+
+    var indicatorGroupList = new Array();
+
+    var categoryOptionComboList = new Array();
+
+    var operandsByDataElementGroup = new Array();
+
+    var params = {};
+
+    var jQuerySelectionString;
+
+    var url;
+
+    this.loadDataElementGroups = function( jQuerySelectionString )
+    {
+        var target = jQuery( jQuerySelectionString );
+
+        target.children().remove();
+
+        if ( dataElementsGroups.length == 0 )
+        {
+            jQuery.getJSON( '../dhis-web-commons-ajax-json/getDataElementGroups.action', function( json )
+            {
+                target.append( '<option value="' + ALL_KEY + '">ALL</option>' );
+                dataElementsGroups.push( new DataElementGroup( ALL_KEY, 'ALL' ) );
+
+                jQuery.each( json.dataElementGroups, function( i, item )
+                {
+                    dataElementsGroups.push( new DataElementGroup( item.id, item.name ) );
+                    target.append( '<option value="' + item.id + '">' + item.name + '</option>' );
+                } );
+            } );
+        } else
+        {
+            jQuery.each( dataElementsGroups, function( i, item )
+            {
+                target.append( '<option value="' + item.id + '">' + item.name + '</option>' );
+            } );
+        }
+    }
+
+    this.loadAllDataElements = function( jQuerySelectionString )
+    {
+        this.loadDataElementsByGroup( '0', jQuerySelectionString );
+    }
+
+    this.loadDataElementsByGroup = function( id, jQuerySelectionString )
+    {
+        var target = jQuery( jQuerySelectionString );
+
+        target.children().remove();
+
+        var des = dataElementGroupList[id];
+
+        if ( des == null )
+        {
+            des = new Array();
+
+            jQuery.getJSON( '../dhis-web-commons-ajax-json/getDataElements.action', {
+                id : id
+            }, function( json )
+            {
+                jQuery.each( json.dataElements, function( i, item )
+                {
+                    des.push( new DataElement( item.id, item.name ) );
+                    target.append( '<option value="' + item.id + '">' + item.name + '</option>' );
+                } );
+
+                dataElementGroupList[id] = des;
+            } );
+        } else
+        {
+            jQuery.each( des, function( i, item )
+            {
+                target.append( '<option value="' + item.id + '">' + item.name + '</option>' );
+            } );
+        }
+    }
+
+    this.loadIndicatorGroups = function( jQuerySelectionString )
+    {
+        var target = jQuery( jQuerySelectionString );
+
+        target.children().remove();
+
+        if ( indicatorGroups.length == 0 )
+        {
+            jQuery.getJSON( '../dhis-web-commons-ajax-json/getIndicatorGroups.action', function( json )
+            {
+                target.append( '<option value="' + ALL_KEY + '">ALL</option>' );
+                indicatorGroups.push( new IndicatorGroup( ALL_KEY, 'ALL' ) );
+                jQuery.each( json.indicatorGroups, function( i, item )
+                {
+                    indicatorGroups.push( new IndicatorGroup( item.id, item.name ) );
+                    target.append( '<option value="' + item.id + '">' + item.name + '</option>' );
+                } );
+            } );
+        } else
+        {
+            jQuery.each( indicatorGroups, function( i, item )
+            {
+                target.append( '<option value="' + item.id + '">' + item.name + '</option>' );
+            } );
+        }
+    }
+
+    this.loadAllIndicators = function( jQuerySelectionString )
+    {
+        this.loadIndicatorsByGroup( ALL_KEY, jQuerySelectionString );
+    }
+
+    this.loadIndicatorsByGroup = function( id, jQuerySelectionString )
+    {
+        var target = jQuery( jQuerySelectionString );
+
+        target.children().remove();
+
+        var ins = indicatorGroupList[id];
+
+        if ( ins == null )
+        {
+            ins = new Array();
+
+            jQuery.getJSON( '../dhis-web-commons-ajax-json/getIndicators.action', {
+                id : id
+            }, function( json )
+            {
+                jQuery.each( json.indicators, function( i, item )
+                {
+                    ins.push( new Indicator( item.id, item.name ) );
+                    target.append( '<option value="' + item.id + '">' + item.name + '</option>' );
+                } );
+
+                indicatorGroupList[id] = ins;
+            } );
+        } else
+        {
+            jQuery.each( ins, function( i, item )
+            {
+                target.append( '<option value="' + item.id + '">' + item.name + '</option>' );
+            } );
+        }
+    }
+
+    this.loadCategoryOptionComboByDE = function( id, jQuerySelectionString )
+    {
+        var target = jQuery( jQuerySelectionString );
+
+        target.children().remove();
+
+        var options = categoryOptionComboList[id];
+
+        if ( options == null )
+        {
+            options = new Array();
+
+            jQuery.getJSON( '../dhis-web-commons-ajax-json/getCategoryOptionCombos.action', {
+                id : id
+            }, function( json )
+            {
+                jQuery.each( json.categoryOptionCombos, function( i, item )
+                {
+                    options.push( new OptionCombo( item.id, item.name ) );
+                    target.append( '<option value="' + item.id + '">' + item.name + '</option>' );
+                } );
+
+                categoryOptionComboList[id] = options;
+            } );
+        } else
+        {
+            jQuery.each( options, function( i, item )
+            {
+                target.append( '<option value="' + item.id + '">' + item.name + '</option>' );
+            } );
+        }
+    }
+
+    this.reloadOperands = function( currentpage )
+    {
+        this.params.currentPage = currentpage;
+        this.loadOperands( this.jQuerySelectionString, this.params );
+    }
+
+    this.changeOperandsPageSize = function( pagesize )
+    {
+        this.params.pageSize = pagesize;
+        this.loadOperands( this.jQuerySelectionString, this.params );
+    }
+
+    this.loadOperands = function( jQuerySelectionString, params )
+    {
+        var target = jQuery( jQuerySelectionString );
+        target.children().remove();
+
+        this.params = params;
+        this.jQuerySelectionString = jQuerySelectionString;
+
+        jQuery
+                .postJSON(
+                        '../dhis-web-commons-ajax-json/getOperands.action',
+                        this.params,
+                        function( json )
+                        {
+                            if ( json.operands.length == 0 )
+                            {
+                                setInnerHTML( 'formulaText', "<i style='color:red'>No dataelements to select</i>" );
+                                return;
+                            }
+
+                            jQuery.each( json.operands, function( i, item )
+                            {
+                                target.append( '<option value="[' + item.operandId + ']">' + item.operandName
+                                        + '</option>' );
+                            } );
+
+                            if ( params.usePaging )
+                            {
+                                var numberOfPages = json.paging.numberOfPages;
+                                var currentPage = json.paging.currentPage;
+                                var baseLink = json.paging.baseLink;
+                                var pageSize = json.paging.pageSize;
+                                var startPage = json.paging.startPage;
+
+                                var html = '<div id="operandPaging_div">';
+
+                                if ( numberOfPages > 1 )
+                                {
+                                    html += 'Page: <select onchange="dataDictionary.reloadOperands( this.value )">';
+
+                                    for ( var i = 1; i <= numberOfPages; i++ )
+                                    {
+                                        html += '<option value="' + i + '"' + (currentPage == i ? 'selected=true' : '')
+                                                + '>' + i + '</option>';
+                                    }
+
+                                    html += '</select>';
+
+                                    if ( currentPage == startPage )
+                                    {
+                                        html += '<button type="button" disabled="disabled">Previous page</button>';
+                                        html += '<button type="button" onclick="dataDictionary.reloadOperands( '
+                                                + (parseInt( currentPage ) + 1) + ' )">Next page</button>';
+                                    } else if ( currentPage == numberOfPages )
+                                    {
+                                        html += '<button type="button" onclick="dataDictionary.reloadOperands( '
+                                                + (parseInt( currentPage ) - 1) + ' )">Previous page</button>';
+                                        html += '<button type="button" disabled="disabled">Next page</button>';
+                                    } else
+                                    {
+                                        html += '<button type="button" onclick="dataDictionary.reloadOperands( '
+                                                + (parseInt( currentPage ) - 1) + ')">Previous page</button>';
+                                        html += '<button type="button" onclick="dataDictionary.reloadOperands( '
+                                                + (parseInt( currentPage ) + 1) + ')">Next page</button>';
+                                    }
+                                }
+
+                                html += 'Size: <input type="text" style="width:50px" onchange="dataDictionary.changeOperandsPageSize( this.value )" value="'
+                                        + pageSize + '"/></div>';
+                                jQuery( '#operandPaging_div' ).remove();
+                                jQuery( html ).insertAfter( target );
+                            }
+                        } );
+    }
 }
 
 var dataDictionary = new DataDictionary();
 
 function DataElementGroup( id_, name_ )
 {
-	this.id = id_;
-	this.name = name_;		
-}	
+    this.id = id_;
+    this.name = name_;
+}
 
 function DataElement( id_, name_ )
 {
-	this.id = id_;
-	this.name = name_;
+    this.id = id_;
+    this.name = name_;
 }
 
 function OptionCombo( id_, name_ )
 {
-	this.id = id_;
-	this.name = name_;
+    this.id = id_;
+    this.name = name_;
 }
 
 function IndicatorGroup( id_, name_ )
 {
-	this.id = id_;
-	this.name = name_;		
-}	
+    this.id = id_;
+    this.name = name_;
+}
 
 function Indicator( id_, name_ )
 {
-	this.id = id_;
-	this.name = name_;	
+    this.id = id_;
+    this.name = name_;
 }

=== 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	2011-06-17 09:07:15 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2011-06-19 11:30:00 +0000
@@ -10,8 +10,7 @@
 /**
  * Go back using the document.referrer.
  * 
- * @param defaultUrl
- *            if there is not document.referrer, use this url
+ * @param defaultUrl if there is not document.referrer, use this url
  */
 function referrerBack( defaultUrl ) {
 	if(document.referrer !== undefined && document.referrer != "") {
@@ -27,10 +26,8 @@
 /**
  * Redirects to the translate GUI.
  * 
- * @param className
- *            the name of the object class.
- * @param objectId
- *            the identifier of the object.
+ * @param className the name of the object class.
+ * @param objectId the identifier of the object.
  */
 function translate( className, objectId )
 {
@@ -43,8 +40,7 @@
  * Gets help content for the given id. Opens the right bar and puts the content
  * inside. Reads data from an underlying docbook file.
  * 
- * @param id
- *            the content id, refers to the section id in the docbook file.
+ * @param id the content id, refers to the section id in the docbook file.
  */
 function getHelpContent( id )
 {
@@ -69,8 +65,7 @@
 /**
  * Filters values in a html table with tbody id "list".
  * 
- * @param filter
- *            the filter.
+ * @param filter the filter.
  */
 function filterValues( filter, columnIndex )
 {
@@ -101,8 +96,7 @@
  * Returns the value of the selected option in the list with the given
  * identifier.
  * 
- * @param listId
- *            the list identifier.
+ * @param listId the list identifier.
  */
 function getListValue( listId )
 {
@@ -115,8 +109,7 @@
 /**
  * Hides the document element with the given identifier.
  * 
- * @param id
- *            the element identifier.
+ * @param id the element identifier.
  */
 function hideById( id )
 {
@@ -126,8 +119,7 @@
 /**
  * Shows the document element with the given identifier.
  * 
- * @param id
- *            the element identifier.
+ * @param id the element identifier.
  */
 function showById( id )
 {
@@ -137,8 +129,7 @@
 /**
  * Returns true if the element with the given identifier has text, false if not.
  * 
- * @param inputId
- *            the identifier of the input element.
+ * @param inputId the identifier of the input element.
  */
 function hasText( inputId )
 {
@@ -154,8 +145,7 @@
  * Returns true if the element with the given identifier is checked, false if
  * not or if it does not exist.
  * 
- * @param checkboxId
- *            the identifier of the checkbox element.
+ * @param checkboxId the identifier of the checkbox element.
  */
 function isChecked( checkboxId )
 {
@@ -267,8 +257,7 @@
  * Returns true if the element with the given identifier has selected elements
  * associated with it, false if not.
  * 
- * @param listId
- *            the identifier of the list element.
+ * @param listId the identifier of the list element.
  */
 function hasElements( listId )
 {
@@ -278,8 +267,7 @@
 /**
  * Returns true if the element with the given identifier exists, false if not.
  * 
- * @param elementId
- *            the identifier of the element.
+ * @param elementId the identifier of the element.
  */
 function isNotNull( elementId )
 {
@@ -289,8 +277,7 @@
 /**
  * HTML encodes the given string.
  * 
- * @param str
- *            the input string.
+ * @param str the input string.
  * @return the HTML encoded string.
  */
 function htmlEncode( str )
@@ -326,10 +313,8 @@
 /**
  * Gets the value for the element with the given name from the DOM object.
  * 
- * @param parentElement
- *            the DOM object.
- * @param childElementName
- *            the name of the element.
+ * @param parentElement the DOM object.
+ * @param childElementName the name of the element.
  */
 function getElementValue( parentElement, childElementName )
 {
@@ -341,10 +326,8 @@
 /**
  * Gets the attribute value from the given DOM element.
  * 
- * @param parentElement
- *            the DOM object.
- * @param attributeName
- *            the name of the attribute.
+ * @param parentElement the DOM object.
+ * @param attributeName the name of the attribute.
  */
 function getElementAttribute( parentElement, childElementName, childAttributeName )
 {
@@ -356,8 +339,7 @@
 /**
  * Gets the value from the given DOM element.
  * 
- * @param rootElement
- *            the DOM object.
+ * @param rootElement the DOM object.
  */
 function getRootElementValue( rootElement )
 {
@@ -370,10 +352,8 @@
  * Gets the value of the attribute with the given name from the given DOM
  * element.
  * 
- * @param rootElement
- *            the DOM object.
- * @param attributeName
- *            the name of the attribute.
+ * @param rootElement the DOM object.
+ * @param attributeName the name of the attribute.
  */
 function getRootElementAttribute( rootElement, attributeName )
 {
@@ -383,10 +363,8 @@
 /**
  * Sets a value on the given element.
  * 
- * @param fieldId
- *            the identifier of the element.
- * @param value
- *            the value to set.
+ * @param fieldId the identifier of the element.
+ * @param value the value to set.
  */
 function setInnerHTML( fieldId, value )
 {
@@ -396,8 +374,7 @@
 /**
  * Gets a value from the given element and HTML encodes it.
  * 
- * @param fieldId
- *            the identifier of the element.
+ * @param fieldId the identifier of the element.
  * @return the HTML encoded value of the element with the given identifier.
  */
 function getInnerHTML( fieldId )
@@ -408,10 +385,8 @@
 /**
  * Sets a value on the given element.
  * 
- * @param fieldId
- *            the identifier of the element.
- * @param value
- *            the value to set.
+ * @param fieldId the identifier of the element.
+ * @param value the value to set.
  */
 function setFieldValue( fieldId, value )
 {
@@ -421,8 +396,7 @@
 /**
  * Gets a value from the given element and HTML encodes it.
  * 
- * @param fieldId
- *            the identifier of the element.
+ * @param fieldId the identifier of the element.
  * @return the HTML encoded value of the element with the given identifier.
  */
 function getFieldValue( fieldId )
@@ -438,8 +412,7 @@
 /**
  * Gets a value from the given element and HTML encodes it.
  * 
- * @param fieldId
- *            the identifier of the element.
+ * @param fieldId the identifier of the element.
  * @return the type of the element with the given identifier.
  */
 function getTypeById( fieldId, attribute )
@@ -450,8 +423,7 @@
 /**
  * get value of input radio with name
  * 
- * @param radioName
- *            name of input radio
+ * @param radioName name of input radio
  */
 function getRadioValue( radioName )
 {
@@ -470,8 +442,7 @@
 /**
  * set value for input radio with name
  * 
- * @param radioName
- *            name of input radio
+ * @param radioName name of input radio
  */
 function setRadioValue( radioName, value )
 {
@@ -491,8 +462,7 @@
 /**
  * Shows the message span and sets the message as text.
  * 
- * @param message
- *            the message.
+ * @param message the message.
  */
 function setMessage( message )
 {
@@ -507,8 +477,7 @@
  * Shows the message span and sets the message as text together with a wait
  * animation.
  * 
- * @param message
- *            the message.
+ * @param message the message.
  */
 function setWaitMessage( message )
 {
@@ -526,8 +495,7 @@
 /**
  * Slides down the header message div and sets the message as text.
  * 
- * @param message
- *            the message.
+ * @param message the message.
  */
 function setHeaderMessage( message )
 {
@@ -538,8 +506,7 @@
 /**
  * Updates the text in the header message div with the message.
  * 
- * @param message
- *            the message.
+ * @param message the message.
  */
 function updateHeaderMessage( message )
 {
@@ -550,8 +517,7 @@
  * Slides down the header message div and sets the message as text together with
  * a wait animation.
  * 
- * @param message
- *            the message.
+ * @param message the message.
  */
 function setHeaderWaitMessage( message )
 {
@@ -562,8 +528,7 @@
 /**
  * Updates the text in the header message div with the message.
  * 
- * @param message
- *            the message.
+ * @param message the message.
  */
 function updateHeaderWaitMessage( message )
 {
@@ -619,8 +584,7 @@
 /**
  * Slides down the info message div and sets the message as text.
  * 
- * @param message
- *            the message.
+ * @param message the message.
  */
 function setInfo( message )
 {
@@ -674,8 +638,7 @@
 /**
  * Convenience method for getting a document element.
  * 
- * @param id
- *            id of the element to get.
+ * @param id id of the element to get.
  */
 function byId( elementId )
 {
@@ -685,10 +648,8 @@
 /**
  * Toggles visibility for an element.
  * 
- * @param id
- *            the identifier of the element.
- * @param display
- *            boolean indicator.
+ * @param id the identifier of the element.
+ * @param display boolean indicator.
  */
 function toggleByIdAndFlag( id, display )
 {
@@ -705,8 +666,7 @@
 /**
  * Toggles visibility for an element.
  * 
- * @param id
- *            the identifier of the element.
+ * @param id the identifier of the element.
  */
 function toggleById( id )
 {
@@ -754,10 +714,8 @@
  * Returns a query string on the form <paramName>=<listValue> based on the
  * options in the list with the given identifier.
  * 
- * @param listId
- *            the list identifier.
- * @param paramName
- *            the name of the query param.
+ * @param listId the list identifier.
+ * @param paramName the name of the query param.
  * @return a query string.
  */
 function getQueryStringFromList( listId, paramName )
@@ -797,14 +755,10 @@
  * Deletes and removes an item from a table. The table row to be removed must
  * have an identifier on the form "tr[itemId]".
  * 
- * @param itemId
- *            the item identifier.
- * @param itemName
- *            the item name.
- * @param message
- *            the confirmation message.
- * @param action
- *            the server action url for deleting the item.
+ * @param itemId the item identifier.
+ * @param itemName the item name.
+ * @param message the confirmation message.
+ * @param action the server action url for deleting the item.
  */
 function removeItem( itemId, itemName, confirmation, action, success )
 {                
@@ -847,8 +801,7 @@
 /**
  * Create jQuery datepicker for input text with id * *
  * 
- * @param id
- *            the id of input field which you want enter date *
+ * @param id the id of input field which you want enter date *
  */
 function datePicker( id )
 {
@@ -913,8 +866,7 @@
 /**
  * Create jQuery datepicker for input text with id * *
  * 
- * @param id
- *            the id of input field which you want enter date *
+ * @param id the id of input field which you want enter date *
  */
 function datePickerValid( id, today )
 {
@@ -948,10 +900,8 @@
 /**
  * Create jQuery datepicker for start date and end ate text with id * *
  * 
- * @param startdate
- *            the id of input field which you want enter start date *
- * @param enddate
- *            the id of input field which you want enter end date *
+ * @param startdate the id of input field which you want enter start date *
+ * @param enddate the id of input field which you want enter end date *
  */
 function datePickerInRange ( startdate, enddate, setCurrentStartDate, setCurrentEndDate )
 {
@@ -998,8 +948,7 @@
 /**
  * Create input table id become sortable table * *
  * 
- * @param tableId
- *            the id of table you want to sort * *
+ * @param tableId the id of table you want to sort * *
  */
 
 function tableSorter( tableId, sortList )
@@ -1075,18 +1024,17 @@
 
 /**
  * Create validator for fileds in form *
- *
+ * 
  * this should replace validation() at some point, but theres just to much code
  * depending on the old version for now.
  * 
  * See http://bassistance.de/jquery-plugins/jquery-plugin-validation/ for more
  * information about jquery.validate.
  * 
- * @param formId form to validate 
+ * @param formId form to validate
  * @param submitHandler the submitHandler to use
  * @param kwargs A dictionary of optional arguments, currently supported are:
- * 		beforeValidateHandler
- * 		rules
+ *            beforeValidateHandler rules
  */
 function validation2(formId, submitHandler, kwargs)
 {
@@ -1152,12 +1100,9 @@
 /**
  * Add validation rule remote for input field
  * 
- * @param inputId
- *            is id for input field
- * @param url
- *            is ajax request url
- * @param params
- *            is array of param will send to server by ajax request
+ * @param inputId is id for input field
+ * @param url is ajax request url
+ * @param params is array of param will send to server by ajax request
  */
 function checkValueIsExist( inputId, url, params )
 {
@@ -1195,10 +1140,8 @@
 /**
  * Add any validator Rules for input
  * 
- * @param inputId
- *            is id for input field
- * @param rules
- *            is array of rule
+ * @param inputId is id for input field
+ * @param rules is array of rule
  * @note: input field must have name same with id
  */
 function addValidatorRulesById( inputId, rules )
@@ -1214,10 +1157,8 @@
 /**
  * Remove validator Rules for input
  * 
- * @param inputId
- *            is id for input field
- * @param rules
- *            is array of rule you want to remove
+ * @param inputId is id for input field
+ * @param rules is array of rule you want to remove
  * @note: input field must have name same with id
  */
 function removeValidatorRulesById( inputId, rules )
@@ -1251,10 +1192,8 @@
  * Show message at the top-right of screen, this message will hide automatic
  * after 3 second if you don't set time
  * 
- * @param message
- *            is message
- * @param time
- *            is time the message will hide after showed. Default is 3 second,
+ * @param message is message
+ * @param time is time the message will hide after showed. Default is 3 second,
  *            set time is 0 if you don't want to hide this message
  */
 function showErrorMessage( message, time )
@@ -1266,10 +1205,8 @@
  * Show message at the top-right of screen, this message will hide automatic
  * after 3 second if you don't set time
  * 
- * @param message
- *            is message
- * @param time
- *            is time the message will hide after showed. Default is 3 second,
+ * @param message is message
+ * @param time is time the message will hide after showed. Default is 3 second,
  *            set time is 0 if you don't want to hide this message
  */
 function showSuccessMessage( message, time )
@@ -1281,10 +1218,8 @@
  * Show message at the top-right of screen, this message will hide automatic
  * after 3 second if you don't set time
  * 
- * @param message
- *            is message
- * @param time
- *            is time the message will hide after showed. Default is 3 second,
+ * @param message is message
+ * @param time is time the message will hide after showed. Default is 3 second,
  *            set time is 0 if you don't want to hide this message
  */
 function showWarningMessage( message, time )
@@ -1436,9 +1371,8 @@
 // Math methods
 // -----------------------------------------------------------------------------
 
-/** 
- * Allow Zero likes 0 and 0.0x
- * In which, x is Multiple leading zero.
+/**
+ * Allow Zero likes 0 and 0.0x In which, x is Multiple leading zero.
  */
 function isValidZeroNumber( value )
 {
@@ -1474,7 +1408,8 @@
 }
 
 /**
- * Allow any real number,optionally with a sign, no thousands seperators and a single decimal point.
+ * Allow any real number,optionally with a sign, no thousands seperators and a
+ * single decimal point.
  */
 function isRealNumber( value )
 {

=== 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	2011-06-01 08:19:02 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.select.js	2011-06-19 11:30:00 +0000
@@ -28,8 +28,9 @@
 dhis2.util.namespace( 'dhis2.select' );
 
 /**
- * Return a hidden select with id $select + '_ghost'. This is usually used for temporary hiding options, since these
- * can't be hidden using 'display: none' or other similar techniques.
+ * Return a hidden select with id $select + '_ghost'. This is usually used for
+ * temporary hiding options, since these can't be hidden using 'display: none'
+ * or other similar techniques.
  * 
  * @param $select {jQuery} The select to ghost
  * 
@@ -50,14 +51,15 @@
 }
 
 /**
- * Filter a select on a given key. Options that are not matched, are moved to ghost.
+ * Filter a select on a given key. Options that are not matched, are moved to
+ * ghost.
  * 
  * NOTE: Both selects should already be in sorted order.
  * 
  * @param $select {jQuery} The select to search within
  * @param key {String} Key to search for
- * @param caseSensitive {Boolean} Case sensitive search (defaults to false, so this parameter only needed if you want
- *            case sensitive search)
+ * @param caseSensitive {Boolean} Case sensitive search (defaults to false, so
+ *            this parameter only needed if you want case sensitive search)
  */
 dhis2.select.filterWithKey = function( $select, key, caseSensitive )
 {
@@ -86,8 +88,9 @@
 }
 
 /**
- * Moves an array of child elements into a select, these will be moved in a sorted fashion. Both the select and array is
- * assumed to be sorted to start with.
+ * Moves an array of child elements into a select, these will be moved in a
+ * sorted fashion. Both the select and array is assumed to be sorted to start
+ * with.
  * 
  * @param $select {jQuery} A select which acts as the target
  * @param $array {jQuery} An array of child elements to move

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.util.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.util.js	2011-06-01 08:19:02 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.util.js	2011-06-19 11:30:00 +0000
@@ -41,7 +41,8 @@
     var parent = window;
     var currentPart = '';
 
-    for ( var i = 0, length = parts.length; i < length; i++) {
+    for ( var i = 0, length = parts.length; i < length; i++ )
+    {
         currentPart = parts[i];
         parent[currentPart] = parent[currentPart] || {};
         parent = parent[currentPart];
@@ -51,14 +52,15 @@
 }
 
 /**
- * adds ':containsNoCase' to filtering. $(sel).find(':containsNC(key)').doSomething();
+ * adds ':containsNoCase' to filtering.
+ * $(sel).find(':containsNC(key)').doSomething();
  */
 $.expr[":"].containsNC = function( el, i, m )
 {
     // http://www.west-wind.com/weblog/posts/2008/Oct/24/Using-jQuery-to-search-Content-and-creating-custom-Selector-Filters
     var search = m[3];
 
-    if (!search)
+    if ( !search )
         return false;
 
     return eval( '/' + search + '/i' ).test( $( el ).text() );

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisAjaxSelect.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisAjaxSelect.js	2011-06-18 13:55:50 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisAjaxSelect.js	2011-06-19 11:30:00 +0000
@@ -25,7 +25,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-/*
+/**
  * @author mortenoh
  */
 
@@ -89,12 +89,9 @@
 }
 
 /**
- * @param $target
- *            jQuery object to work on
- * @param key
- *            data-entry key, $target.data(key)
- * @param value
- *            value to compare to
+ * @param $target jQuery object to work on
+ * @param key data-entry key, $target.data(key)
+ * @param value value to compare to
  * @returns {Boolean} true or false after comparing $target.data(key) with value
  */
 function compare_data_with_kv($target, key, value)

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/lists.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/lists.js	2011-06-07 16:12:23 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/lists.js	2011-06-19 11:30:00 +0000
@@ -15,7 +15,7 @@
 
 /**
  * Moves selected options in the source list to the target list.
- *
+ * 
  * @param fromListId the id of the source list.
  * @param targetListId the id of the target list.
  */
@@ -27,7 +27,7 @@
 
 /**
  * Moves selected options in the source list to the target list.
- *
+ * 
  * @param fromList the source list.
  * @param targetList the target list.
  */
@@ -60,7 +60,7 @@
 
 /**
  * Moves all elements in a list to the target list
- *
+ * 
  * @param fromListId the id of the source list.
  * @param targetListId the id of target list.
  */
@@ -70,7 +70,7 @@
 
 /**
  * Clears the list.
- *
+ * 
  * @param listId the id of the list.
  */
 function clearListById( listId ) {
@@ -80,6 +80,7 @@
 
 /**
  * Clears the list.
+ * 
  * @param list the list.
  */
 function clearList( list ) {
@@ -88,7 +89,7 @@
 
 /**
  * Tests whether the list contains the value.
- *
+ * 
  * @param listId the id of the list.
  * @param value the value.
  */
@@ -99,7 +100,7 @@
 
 /**
  * Tests whether the list contains the value.
- *
+ * 
  * @param list the list.
  * @param value the value.
  */
@@ -122,6 +123,7 @@
 
 /**
  * Marks all elements in a list as selected.
+ * 
  * @param listId the id of the list.
  */
 function selectAllById( listId ) {
@@ -130,6 +132,7 @@
 
 /**
  * Marks all elements in a list as selected.
+ * 
  * @param list the list.
  */
 function selectAll( list ) {
@@ -138,6 +141,7 @@
 
 /**
  * Marks all elements in a list as not selected.
+ * 
  * @param listId the id of the list.
  */
 function deselectAllById( listId ) {
@@ -147,6 +151,7 @@
 
 /**
  * Marks all elements in a list as not selected.
+ * 
  * @param list the list.
  */
 function deselectAll( list ) {
@@ -178,6 +183,7 @@
 
 /**
  * Removes the selected option from a select list.
+ * 
  * @param listId the id of the list.
  */
 function removeSelectedOption( listId ) {
@@ -191,6 +197,7 @@
 
 /**
  * Moves the selected option in a select list up one position.
+ * 
  * @param listId the id of the list.
  */
 function moveUpSelectedOption( listId ){
@@ -201,7 +208,8 @@
                 var precedingOption = new Option( list.options[ i - 1 ].text, list.options[ i - 1 ].value );
                 var currentOption = new Option( list.options[ i ].text, list.options[ i ].value );
 
-                list.options[ i - 1 ] = currentOption; // Swapping place in the list
+                list.options[ i - 1 ] = currentOption; // Swapping place in the
+                                                        // list
                 list.options[ i - 1 ].selected = true;
                 list.options[ i ] = precedingOption;
             }
@@ -211,7 +219,7 @@
 
 /**
  * Moves the selected option in a list down one position.
- *
+ * 
  * @param listId the id of the list.
  */
 function moveDownSelectedOption( listId ) {
@@ -219,11 +227,13 @@
 
     for ( var i = list.options.length - 1; i >= 0; i-- ) {
         if ( list.options[ i ].selected ) {
-            if ( i < list.options.length - 1 ) { // Cannot move down the option at the bottom
+            if ( i < list.options.length - 1 ) { // Cannot move down the
+                                                    // option at the bottom
                 var subsequentOption = new Option( list.options[ i + 1 ].text, list.options[ i + 1 ].value );
                 var currentOption = new Option( list.options[ i ].text, list.options[ i ].value );
 
-                list.options[ i + 1 ] = currentOption; // Swapping place in the list
+                list.options[ i + 1 ] = currentOption; // Swapping place in the
+                                                        // list
                 list.options[ i + 1 ].selected = true;
                 list.options[ i ] = subsequentOption;
             }
@@ -233,7 +243,7 @@
 
 /**
  * Moves the selected options to the top of the list.
- *
+ * 
  * @param listId the id of the list.
  */
 function moveSelectedOptionToTop( listId ) {
@@ -250,7 +260,8 @@
         }
     }
 
-    // Move options in main list down a number of positions equal to selected options
+    // Move options in main list down a number of positions equal to selected
+    // options
 
     list.options.length = listLength;
 
@@ -269,7 +280,7 @@
 
 /**
  * Moves the selected options to the bottom of the list.
- *
+ * 
  * @param listId the id of the list.
  */
 function moveSelectedOptionToBottom( listId ) {
@@ -295,10 +306,11 @@
 }
 
 /**
- * Creates a hidden select list used for temporarily storing
- * options for filtering
- *
- * TODO: avoid performance hit on page with many selects, by checking use of filterList method
+ * Creates a hidden select list used for temporarily storing options for
+ * filtering
+ * 
+ * TODO: avoid performance hit on page with many selects, by checking use of
+ * filterList method
  */
 $(document).ready(function() {
     $("select").each(function(i,o){
@@ -312,12 +324,12 @@
 /**
  * Filters out options in a select list that don't match the filter string by
  * hiding them.
- *
+ * 
  * @param filter the filter string.
  * @param listId the id of the list to filter.
  */
 function filterList( filter, listId ) {
-    //Fastest cross-browser way to filter
+    // Fastest cross-browser way to filter
     $("#"+listId+" option").filter(function(i) {
         var toMatch = $(this).text().toString().toLowerCase();
         var filterLower = filter.toString().toLowerCase();
@@ -334,14 +346,16 @@
     $("#"+listId).empty().html(sortedVals);
     $("#"+listId).val('--');
 
-    /* For FF only - no performance issues
-    $("#" + listId).find('option').hide();
-    $("#" + listId).find('option:Contains("' + filter + '")').show();*/
+    /*
+     * For FF only - no performance issues $("#" +
+     * listId).find('option').hide(); $("#" + listId).find('option:Contains("' +
+     * filter + '")').show();
+     */
 }
 
 /**
  * Clears a filter and resets the filtered select list.
- *
+ * 
  * @param filterId the id of the filter input box.
  * @param listId the id of the list reset after being filtered.
  */
@@ -352,7 +366,7 @@
 
 /**
  * Check if list has option.
- *
+ * 
  * @param obj is list object
  */
 function hasOptions( obj ) {
@@ -364,7 +378,7 @@
 
 /**
  * Sort list by name.
- *
+ * 
  * @param id is id of list
  * @param type is type for sort ASC:ascending && DES: desending
  */

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js	2011-05-12 17:38:50 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js	2011-06-19 11:30:00 +0000
@@ -1,366 +1,366 @@
 var validationRules = {
-	"user" : {
-		"username" : {
-			"required" : true,
-			"rangelength" : [ 2, 140 ],
-			"firstletteralphabet" : true,
-			"alphanumeric" : true
-		},
-		"firstName" : {
-			"required" : true,
-			"rangelength" : [ 2, 140 ]
-		},
-		"surname" : {
-			"required" : true,
-			"rangelength" : [ 2, 140 ]
-		},
-		"password" : {
-			"required" : true,
-			"password" : true,
-			"notequalto" : "#username",
-			"rangelength" : [ 8, 35 ]
-		},
-		"rawPassword" : {
-			"required" : true,
-			"password" : true,
-			"rangelength" : [ 8, 35 ]
-		},
-		"retypePassword" : {
-			"required" : true,
-			"equalTo" : "#rawPassword"
-		},
-		"email" : {
-			"email" : true,
-			"rangelength" : [ 0, 160 ]
-		},
-		"phoneNumber" : {
-			"rangelength" : [ 0, 80 ]
-		},
-		"roleValidator" : {
-			"required" : true
-		}
-	},
-	"role" : {
-		"name" : {
-			"required" : true,
-			"rangelength" : [ 2, 140 ]
-		},
-		"description" : {
-			"required" : true,
-			"rangelength" : [ 2, 210 ]
-		}
-	},
-	"userGroup" : {
-		"name" : {
-			"required" : true,
-			"rangelength" : [ 2, 210 ],
-			"alphanumericwithbasicpuncspaces" : true
-		},
-		"memberValidator" : {
-			"required" : true
-		}
-	},
-	"organisationUnit" : {
-		"name" : {
-			"required" : true,
-			"rangelength" : [ 2, 160 ]
-		},
-		"shortName" : {
-			"required" : true,
-			"rangelength" : [ 2, 25 ]
-		},
-		"code" : {
-			"required" : true,
-			"rangelength" : [ 0, 25 ]
-		},
-		"openingDate" : {
-			"required" : true
-		},
-		"url" : {
-			"url" : true,
-			"rangelength" : [ 0, 255 ]
-		},
-		"contactPerson" : {
-			"rangelength" : [ 0, 255 ]
-		},
-		"address" : {
-			"rangelength" : [ 0, 255 ]
-		},
-		"email" : {
-			"email" : true,
-			"rangelength" : [ 0, 250 ]
-		},
-		"phoneNumber" : {
-			"rangelength" : [ 0, 255 ]
-		}
-	},
-	"organisationUnitGroup" : {
-		"name" : {
-			"required" : true,
-			"rangelength" : [ 2, 160 ]
-		}
-	},
-	"organisationUnitGroupSet" : {
-		"name" : {
-			"required" : true,
-			"rangelength" : [ 2, 230 ]
-		},
-		"description" : {
-			"required" : true,
-			"rangelength" : [ 2, 255 ]
-		}
-	},
-	"dataEntry" : {
-		"name" : {
-			"required" : true,
-			"rangelength" : [ 4, 100 ]
-		}
-	},
-	"section" : {
-		"sectionName" : {
-			"required" : true,
-			"rangelength" : [ 2, 160 ]
-		},
-		"selectedList" : {
-			"required" : true
-		}
-	},
-	"dataSet" : {
-		"name" : {
-			"required" : true,
-			"alphanumericwithbasicpuncspaces" : true,
-			"rangelength" : [ 4, 150 ]
-		},
-		"shortName" : {
-			"required" : true,
-			"alphanumericwithbasicpuncspaces" : true,
-			"rangelength" : [ 2, 25 ]
-		},
-		"code" : {
-			"alphanumericwithbasicpuncspaces" : true,
-			"notOnlyDigits" : false,
-			"rangelength" : [ 0, 25 ]
-		},
-		"frequencySelect" : {
-			"required" : true
-		}
-	},
-	"sqlView" : {
-		"name" : {
-			"required" : true,
-			"rangelength" : [ 2, 50 ]
-		},
-		"description" : {
-			"required" : true,
-			"rangelength" : [ 2, 255 ]
-		},
-		"sqlquery" : {
-			"required" : true,
-			"rangelength" : [ 1, 255 ]
-		}
-	},
-	"dataLocking" : {
-		"selectedPeriods" : {
-			"required" : true
-		},
-		"selectedDataSets" : {
-			"required" : true
-		}
-	},
-	"dataBrowser" : {
-		"periodTypeId" : {
-			"required" : true
-		},
-		"mode" : {
-			"required" : true
-		}
-	},
-	"minMax" : {
-		"dataSetIds" : {
-			"required" : true
-		}
-	},
-	"concept" : {
-		"name" : {
-			"required" : true,
-			"rangelength" : [ 3, 10 ]
-		}
-	},
-	"dataElement" : {
-		"name" : {
-			"required" : true,
-			"rangelength" : [ 3, 150 ],
-			"alphanumericwithbasicpuncspaces" : true,
-			"notOnlyDigits" : true
-		},
-		"shortName" : {
-			"required" : true,
-			"rangelength" : [ 2, 25 ],
-			"alphanumericwithbasicpuncspaces" : true,
-			"notOnlyDigits" : true
-		},
-		"alternativeName" : {
-			"rangelength" : [ 3, 150 ],
-			"alphanumericwithbasicpuncspaces" : true,
-			"notOnlyDigits" : true
-		},
-		"code" : {
-			"rangelength" : [ 0, 25 ],
-			"alphanumericwithbasicpuncspaces" : true,
-			"notOnlyDigits" : false
-		},
-		"description" : {
-			"rangelength" : [ 3, 250 ],
-			"alphanumericwithbasicpuncspaces" : true,
-			"notOnlyDigits" : true
-		},
-		"url" : {
-			"url" : true,
-			"rangelength" : [ 0, 255 ]
-		}
-	},
-	"dateElementCategoryCombo" : {
-		"name" : {
-			"required" : true,
-			"rangelength" : [ 2, 160 ]
-		},
-		"selectedList" : {
-			"required" : true
-		}
-	},
-	"dateElementCategory" : {
-		"name" : {
-			"required" : true,
-			"rangelength" : [ 2, 160 ]
-		},
-		"conceptId" : {
-			"required" : true
-		},
-		"memberValidator" : {
-			"required" : true
-		}
-	},
-	"dataElementGroup" : {
-		"name" : {
-			"required" : true,
-			"alphanumericwithbasicpuncspaces" : true,
-			"notOnlyDigits" : true,
-			"rangelength" : [ 3, 150 ]
-		}
-	},
-	"dataElementGroupSet" : {
-		"name" : {
-			"required" : true,
-			"rangelength" : [ 2, 230 ]
-		}
-	},
-	"dataDictionary" : {
-		"name" : {
-			"required" : true,
-			"rangelength" : [ 2, 160 ]
-		},
-		"description" : {
-			"rangelength" : [ 0, 255 ]
-		},
-		"region" : {
-			"rangelength" : [ 0, 255 ]
-		},
-		"memberValidator" : {
-			"required" : true
-		},
-		"memberValidatorIn" : {
-			"required" : true
-		}
-	},
-	"indicator" : {
-		"name" : {
-			"required" : true,
-			"rangelength" : [ 3, 150 ],
-			"alphanumericwithbasicpuncspaces" : true,
-			"nostartwhitespace" : true
-		},
-		"shortName" : {
-			"required" : true,
-			"rangelength" : [ 2, 25 ],
-			"alphanumericwithbasicpuncspaces" : true
-		},
-		"alternativeName" : {
-			"rangelength" : [ 3, 150 ],
-			"alphanumericwithbasicpuncspaces" : true
-		},
-		"code" : {
-			"rangelength" : [ 0, 25 ],
-			"alphanumericwithbasicpuncspaces" : true,
-			"notOnlyDigits" : false
-		},
-		"description" : {
-			"rangelength" : [ 3, 250 ],
-			"alphanumericwithbasicpuncspaces" : true
-		},
-		"url" : {
-			"url" : true,
-			"rangelength" : [ 0, 255 ]
-		},
-		"indicatorTypeId" : {
-			"required" : true
-		},
-		"denominator" : {
-			"required" : true
-		}
-	},
-	"indicatorGroup" : {
-		"name" : {
-			"required" : true,
-			"rangelength" : [ 3, 150 ],
-			"alphanumericwithbasicpuncspaces" : true
-		}
-	},
-	"indicatorGroupSet" : {
-		"name" : {
-			"required" : true,
-			"rangelength" : [ 2, 230 ]
-		}
-	},
-	"indicatorType" : {
-		"name" : {
-			"required" : true,
-			"rangelength" : [ 3, 150 ],
-			"alphanumericwithbasicpuncspaces" : true
-		},
-		"factor" : {
-			"required" : true,
-			"rangelength" : [ 1, 10 ],
-			"digits" : true
-		}
-	},
-	"validationRule" : {
-		"name" : {
-			"required" : true,
-			"rangelength" : [ 2, 160 ]
-		},
-		"description" : {
-			"rangelength" : [ 2, 160 ]
-		},
-		"periodTypeName" : {
-			"required" : true
-		},
-		"operator" : {
-			"required" : true
-		},
-		"leftSideExpression" : {
-			"required" : true
-		},
-		"rightSideExpression" : {
-			"required" : true
-		}
-	},
-	"validationRuleGroup" : {
-		"name" : {
-			"required" : true,
-			"rangelength" : [ 2, 160 ]
-		},
-		"description" : {
-			"rangelength" : [ 2, 160 ]
-		}
-	}
+    "user" : {
+        "username" : {
+            "required" : true,
+            "rangelength" : [ 2, 140 ],
+            "firstletteralphabet" : true,
+            "alphanumeric" : true
+        },
+        "firstName" : {
+            "required" : true,
+            "rangelength" : [ 2, 140 ]
+        },
+        "surname" : {
+            "required" : true,
+            "rangelength" : [ 2, 140 ]
+        },
+        "password" : {
+            "required" : true,
+            "password" : true,
+            "notequalto" : "#username",
+            "rangelength" : [ 8, 35 ]
+        },
+        "rawPassword" : {
+            "required" : true,
+            "password" : true,
+            "rangelength" : [ 8, 35 ]
+        },
+        "retypePassword" : {
+            "required" : true,
+            "equalTo" : "#rawPassword"
+        },
+        "email" : {
+            "email" : true,
+            "rangelength" : [ 0, 160 ]
+        },
+        "phoneNumber" : {
+            "rangelength" : [ 0, 80 ]
+        },
+        "roleValidator" : {
+            "required" : true
+        }
+    },
+    "role" : {
+        "name" : {
+            "required" : true,
+            "rangelength" : [ 2, 140 ]
+        },
+        "description" : {
+            "required" : true,
+            "rangelength" : [ 2, 210 ]
+        }
+    },
+    "userGroup" : {
+        "name" : {
+            "required" : true,
+            "rangelength" : [ 2, 210 ],
+            "alphanumericwithbasicpuncspaces" : true
+        },
+        "memberValidator" : {
+            "required" : true
+        }
+    },
+    "organisationUnit" : {
+        "name" : {
+            "required" : true,
+            "rangelength" : [ 2, 160 ]
+        },
+        "shortName" : {
+            "required" : true,
+            "rangelength" : [ 2, 25 ]
+        },
+        "code" : {
+            "required" : true,
+            "rangelength" : [ 0, 25 ]
+        },
+        "openingDate" : {
+            "required" : true
+        },
+        "url" : {
+            "url" : true,
+            "rangelength" : [ 0, 255 ]
+        },
+        "contactPerson" : {
+            "rangelength" : [ 0, 255 ]
+        },
+        "address" : {
+            "rangelength" : [ 0, 255 ]
+        },
+        "email" : {
+            "email" : true,
+            "rangelength" : [ 0, 250 ]
+        },
+        "phoneNumber" : {
+            "rangelength" : [ 0, 255 ]
+        }
+    },
+    "organisationUnitGroup" : {
+        "name" : {
+            "required" : true,
+            "rangelength" : [ 2, 160 ]
+        }
+    },
+    "organisationUnitGroupSet" : {
+        "name" : {
+            "required" : true,
+            "rangelength" : [ 2, 230 ]
+        },
+        "description" : {
+            "required" : true,
+            "rangelength" : [ 2, 255 ]
+        }
+    },
+    "dataEntry" : {
+        "name" : {
+            "required" : true,
+            "rangelength" : [ 4, 100 ]
+        }
+    },
+    "section" : {
+        "sectionName" : {
+            "required" : true,
+            "rangelength" : [ 2, 160 ]
+        },
+        "selectedList" : {
+            "required" : true
+        }
+    },
+    "dataSet" : {
+        "name" : {
+            "required" : true,
+            "alphanumericwithbasicpuncspaces" : true,
+            "rangelength" : [ 4, 150 ]
+        },
+        "shortName" : {
+            "required" : true,
+            "alphanumericwithbasicpuncspaces" : true,
+            "rangelength" : [ 2, 25 ]
+        },
+        "code" : {
+            "alphanumericwithbasicpuncspaces" : true,
+            "notOnlyDigits" : false,
+            "rangelength" : [ 0, 25 ]
+        },
+        "frequencySelect" : {
+            "required" : true
+        }
+    },
+    "sqlView" : {
+        "name" : {
+            "required" : true,
+            "rangelength" : [ 2, 50 ]
+        },
+        "description" : {
+            "required" : true,
+            "rangelength" : [ 2, 255 ]
+        },
+        "sqlquery" : {
+            "required" : true,
+            "rangelength" : [ 1, 255 ]
+        }
+    },
+    "dataLocking" : {
+        "selectedPeriods" : {
+            "required" : true
+        },
+        "selectedDataSets" : {
+            "required" : true
+        }
+    },
+    "dataBrowser" : {
+        "periodTypeId" : {
+            "required" : true
+        },
+        "mode" : {
+            "required" : true
+        }
+    },
+    "minMax" : {
+        "dataSetIds" : {
+            "required" : true
+        }
+    },
+    "concept" : {
+        "name" : {
+            "required" : true,
+            "rangelength" : [ 3, 10 ]
+        }
+    },
+    "dataElement" : {
+        "name" : {
+            "required" : true,
+            "rangelength" : [ 3, 150 ],
+            "alphanumericwithbasicpuncspaces" : true,
+            "notOnlyDigits" : true
+        },
+        "shortName" : {
+            "required" : true,
+            "rangelength" : [ 2, 25 ],
+            "alphanumericwithbasicpuncspaces" : true,
+            "notOnlyDigits" : true
+        },
+        "alternativeName" : {
+            "rangelength" : [ 3, 150 ],
+            "alphanumericwithbasicpuncspaces" : true,
+            "notOnlyDigits" : true
+        },
+        "code" : {
+            "rangelength" : [ 0, 25 ],
+            "alphanumericwithbasicpuncspaces" : true,
+            "notOnlyDigits" : false
+        },
+        "description" : {
+            "rangelength" : [ 3, 250 ],
+            "alphanumericwithbasicpuncspaces" : true,
+            "notOnlyDigits" : true
+        },
+        "url" : {
+            "url" : true,
+            "rangelength" : [ 0, 255 ]
+        }
+    },
+    "dateElementCategoryCombo" : {
+        "name" : {
+            "required" : true,
+            "rangelength" : [ 2, 160 ]
+        },
+        "selectedList" : {
+            "required" : true
+        }
+    },
+    "dateElementCategory" : {
+        "name" : {
+            "required" : true,
+            "rangelength" : [ 2, 160 ]
+        },
+        "conceptId" : {
+            "required" : true
+        },
+        "memberValidator" : {
+            "required" : true
+        }
+    },
+    "dataElementGroup" : {
+        "name" : {
+            "required" : true,
+            "alphanumericwithbasicpuncspaces" : true,
+            "notOnlyDigits" : true,
+            "rangelength" : [ 3, 150 ]
+        }
+    },
+    "dataElementGroupSet" : {
+        "name" : {
+            "required" : true,
+            "rangelength" : [ 2, 230 ]
+        }
+    },
+    "dataDictionary" : {
+        "name" : {
+            "required" : true,
+            "rangelength" : [ 2, 160 ]
+        },
+        "description" : {
+            "rangelength" : [ 0, 255 ]
+        },
+        "region" : {
+            "rangelength" : [ 0, 255 ]
+        },
+        "memberValidator" : {
+            "required" : true
+        },
+        "memberValidatorIn" : {
+            "required" : true
+        }
+    },
+    "indicator" : {
+        "name" : {
+            "required" : true,
+            "rangelength" : [ 3, 150 ],
+            "alphanumericwithbasicpuncspaces" : true,
+            "nostartwhitespace" : true
+        },
+        "shortName" : {
+            "required" : true,
+            "rangelength" : [ 2, 25 ],
+            "alphanumericwithbasicpuncspaces" : true
+        },
+        "alternativeName" : {
+            "rangelength" : [ 3, 150 ],
+            "alphanumericwithbasicpuncspaces" : true
+        },
+        "code" : {
+            "rangelength" : [ 0, 25 ],
+            "alphanumericwithbasicpuncspaces" : true,
+            "notOnlyDigits" : false
+        },
+        "description" : {
+            "rangelength" : [ 3, 250 ],
+            "alphanumericwithbasicpuncspaces" : true
+        },
+        "url" : {
+            "url" : true,
+            "rangelength" : [ 0, 255 ]
+        },
+        "indicatorTypeId" : {
+            "required" : true
+        },
+        "denominator" : {
+            "required" : true
+        }
+    },
+    "indicatorGroup" : {
+        "name" : {
+            "required" : true,
+            "rangelength" : [ 3, 150 ],
+            "alphanumericwithbasicpuncspaces" : true
+        }
+    },
+    "indicatorGroupSet" : {
+        "name" : {
+            "required" : true,
+            "rangelength" : [ 2, 230 ]
+        }
+    },
+    "indicatorType" : {
+        "name" : {
+            "required" : true,
+            "rangelength" : [ 3, 150 ],
+            "alphanumericwithbasicpuncspaces" : true
+        },
+        "factor" : {
+            "required" : true,
+            "rangelength" : [ 1, 10 ],
+            "digits" : true
+        }
+    },
+    "validationRule" : {
+        "name" : {
+            "required" : true,
+            "rangelength" : [ 2, 160 ]
+        },
+        "description" : {
+            "rangelength" : [ 2, 160 ]
+        },
+        "periodTypeName" : {
+            "required" : true
+        },
+        "operator" : {
+            "required" : true
+        },
+        "leftSideExpression" : {
+            "required" : true
+        },
+        "rightSideExpression" : {
+            "required" : true
+        }
+    },
+    "validationRuleGroup" : {
+        "name" : {
+            "required" : true,
+            "rangelength" : [ 2, 160 ]
+        },
+        "description" : {
+            "rangelength" : [ 2, 160 ]
+        }
+    }
 }