← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16955: Data integrity checks, line breaks

 

------------------------------------------------------------
revno: 16955
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2014-10-04 12:20:19 +0200
message:
  Data integrity checks, line breaks
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataIntegrity.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-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataIntegrity.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataIntegrity.js	2014-09-30 09:08:21 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataIntegrity.js	2014-10-04 10:20:19 +0000
@@ -10,30 +10,30 @@
 {
 	hideLoader();
 	
-    displayViolationList( json.dataElementsWithoutDataSet, "dataElementsWithoutDataSet" );
-    displayViolationList( json.dataElementsWithoutGroups, "dataElementsWithoutGroups" );
-	displayViolationList( json.dataElementsViolatingExclusiveGroupSets, "dataElementsViolatingExclusiveGroupSets" );
-	displayViolationList( json.dataElementsInDataSetNotInForm, "dataElementsInDataSetNotInForm" );
-    displayViolationList( json.dataElementsAssignedToDataSetsWithDifferentPeriodTypes, "dataElementsAssignedToDataSetsWithDifferentPeriodTypes" );
-    displayViolationList( json.dataSetsNotAssignedToOrganisationUnits, "dataSetsNotAssignedToOrganisationUnits" );
-    displayViolationList( json.sectionsWithInvalidCategoryCombinations, "sectionsWithInvalidCategoryCombinations" );
-    displayViolationList( json.indicatorsWithIdenticalFormulas, "indicatorsWithIdenticalFormulas" );
-    displayViolationList( json.indicatorsWithoutGroups, "indicatorsWithoutGroups" );
-    displayViolationList( json.invalidIndicatorNumerators, "invalidIndicatorNumerators" );
-    displayViolationList( json.invalidIndicatorDenominators, "invalidIndicatorDenominators" );
-	displayViolationList( json.indicatorsViolatingExclusiveGroupSets, "indicatorsViolatingExclusiveGroupSets" );
-    displayViolationList( json.organisationUnitsWithCyclicReferences, "organisationUnitsWithCyclicReferences" );
-    displayViolationList( json.orphanedOrganisationUnits, "orphanedOrganisationUnits" );
-    displayViolationList( json.organisationUnitsWithoutGroups, "organisationUnitsWithoutGroups" );
-    displayViolationList( json.organisationUnitsViolatingExclusiveGroupSets, "organisationUnitsViolatingExclusiveGroupSets" );
-    displayViolationList( json.organisationUnitGroupsWithoutGroupSets, "organisationUnitGroupsWithoutGroupSets" );
-    displayViolationList( json.duplicatePeriods, "duplicatePeriods" );
-    displayViolationList( json.validationRulesWithoutGroups, "validationRulesWithoutGroups" );
-    displayViolationList( json.invalidValidationRuleLeftSideExpressions, "invalidValidationRuleLeftSideExpressions" );
-    displayViolationList( json.invalidValidationRuleRightSideExpressions, "invalidValidationRuleRightSideExpressions" );
+    displayViolationList( json.dataElementsWithoutDataSet, "dataElementsWithoutDataSet", false );
+    displayViolationList( json.dataElementsWithoutGroups, "dataElementsWithoutGroups", false );
+	displayViolationList( json.dataElementsViolatingExclusiveGroupSets, "dataElementsViolatingExclusiveGroupSets", true );
+	displayViolationList( json.dataElementsInDataSetNotInForm, "dataElementsInDataSetNotInForm", true );
+    displayViolationList( json.dataElementsAssignedToDataSetsWithDifferentPeriodTypes, "dataElementsAssignedToDataSetsWithDifferentPeriodTypes", true );
+    displayViolationList( json.dataSetsNotAssignedToOrganisationUnits, "dataSetsNotAssignedToOrganisationUnits", false );
+    displayViolationList( json.sectionsWithInvalidCategoryCombinations, "sectionsWithInvalidCategoryCombinations", false );
+    displayViolationList( json.indicatorsWithIdenticalFormulas, "indicatorsWithIdenticalFormulas", false );
+    displayViolationList( json.indicatorsWithoutGroups, "indicatorsWithoutGroups", false );
+    displayViolationList( json.invalidIndicatorNumerators, "invalidIndicatorNumerators", true );
+    displayViolationList( json.invalidIndicatorDenominators, "invalidIndicatorDenominators", true );
+	displayViolationList( json.indicatorsViolatingExclusiveGroupSets, "indicatorsViolatingExclusiveGroupSets", true );
+    displayViolationList( json.organisationUnitsWithCyclicReferences, "organisationUnitsWithCyclicReferences", false );
+    displayViolationList( json.orphanedOrganisationUnits, "orphanedOrganisationUnits", false );
+    displayViolationList( json.organisationUnitsWithoutGroups, "organisationUnitsWithoutGroups", false );
+    displayViolationList( json.organisationUnitsViolatingExclusiveGroupSets, "organisationUnitsViolatingExclusiveGroupSets", true );
+    displayViolationList( json.organisationUnitGroupsWithoutGroupSets, "organisationUnitGroupsWithoutGroupSets", false );
+    displayViolationList( json.duplicatePeriods, "duplicatePeriods", false );
+    displayViolationList( json.validationRulesWithoutGroups, "validationRulesWithoutGroups", false );
+    displayViolationList( json.invalidValidationRuleLeftSideExpressions, "invalidValidationRuleLeftSideExpressions", true );
+    displayViolationList( json.invalidValidationRuleRightSideExpressions, "invalidValidationRuleRightSideExpressions", true );
 }
 
-function displayViolationList( list, id )
+function displayViolationList( list, id, lineBreak )
 {
     if ( list.length > 0 )
     {
@@ -51,6 +51,7 @@
         for ( var i = 0; i < list.length; i++ )
         {
             violations += list[i] + "<br>";
+            violations += !!lineBreak ? "<br>" : "";
         }
         
         $( "#" + id + "Div" ).html( violations );