← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14576: Unused code

 

------------------------------------------------------------
revno: 14576
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-03-31 20:12:00 +0200
message:
  Unused code
modified:
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.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-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js	2014-03-31 18:05:12 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js	2014-03-31 18:12:00 +0000
@@ -96,6 +96,10 @@
 	}
 }
 
+/**
+ * Sets markup for drop down boxes for the given category option group sets in the
+ * selection div.
+ */
 dhis2.dsr.setCategoryOptionGroupSetsMarkup = function( groupSetIds )
 {
 	if ( !groupSetIds || groupSetIds.length == 0 ) {
@@ -131,7 +135,6 @@
 	} );
 }
 
-
 /**
 * Sets markup for drop down boxes for the given categories in the selection div.
 */
@@ -170,28 +173,6 @@
 	} );
 }
 
-/**
- * Indicates whether all attributes have a valid selection.
- */
-dhis2.dsr.attributesSelected = function( dataSetReport )
-{
-	if ( dhis2.dsr.metaData.defaultCategoryCombo == dataSetReport.cc ) {
-		return true; // Default category combo requires no selection
-	}
-	
-	var cc = dataSetReport.cc;
-	var categoryCombo = dhis2.dsr.metaData.categoryCombos[cc];
-	
-	if ( !categoryCombo || !categoryCombo.categories ) {
-		return false;
-	}
-		
-	var expected = categoryCombo.categories.length;
-	var actual = dataSetReport.cp.length;
-	
-	return !!( expected == actual );
-}
-
 //------------------------------------------------------------------------------
 // Period
 //------------------------------------------------------------------------------
@@ -412,12 +393,11 @@
 	var dataSetReport = dhis2.dsr.currentDataSetReport;
 	
 	var approval = $( "#dataSetId :selected" ).data( "approval" );
-	// var attributesSelected = dhis2.dsr.attributesSelected( dataSetReport );
 
 	$( "#approvalNotification" ).hide();
     $( "#approvalDiv" ).hide();
 
-	if ( !approval /* || !attributesSelected */ ) {
+	if ( !approval ) {
 		return;
 	}