← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3574: added separate filter inputs for dataElements/indicators

 

------------------------------------------------------------
revno: 3574
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-05-11 10:58:18 +0200
message:
  added separate filter inputs for dataElements/indicators
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js	2011-05-11 08:39:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js	2011-05-11 08:58:18 +0000
@@ -9,11 +9,11 @@
 	leftBar.hideAnimated();
 });
 
-function timedCount() {
-	validateDataEntryForm();
-	t = setTimeout("timedCount()", 20000); // ms
-	byId('message').style.display = 'none';
-}
+//function timedCount() {
+//	validateDataEntryForm();
+//	t = setTimeout("timedCount()", 20000); // ms
+//	byId('message').style.display = 'none';
+//}
 
 function localFilterSelectList( filter )
 {

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm	2011-05-11 08:39:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm	2011-05-11 08:58:18 +0000
@@ -38,15 +38,13 @@
 			jQuery("#selectionDialog").dialog("open");
 		});
 		
-		jQuery("#dataElementsTab").show();
-		jQuery("#indicatorsTab").hide();
+		showDataElements();
 
 		jQuery("#dataElementsButton").click(function() {
 			jQuery("#dataElementsButton").addClass("ui-state-active2");
 			jQuery("#indicatorsButton").removeClass("ui-state-active2");
-			
-			jQuery("#dataElementsTab").show();
-			jQuery("#indicatorsTab").hide();
+
+			showDataElements();
 		});
 
 		jQuery("#dataElementsButton").addClass("ui-state-active2");
@@ -55,11 +53,9 @@
 			jQuery("#indicatorsButton").addClass("ui-state-active2");
 			jQuery("#dataElementsButton").removeClass("ui-state-active2");
 
-			jQuery("#indicatorsTab").show();
-			jQuery("#dataElementsTab").hide();
+			showIndicators();
 		});
 
-
 		jQuery("#insertButton").click(function() {
 			if( jQuery("#dataElementsTab").is(":visible") ) {
 				insertDataElement();
@@ -76,6 +72,20 @@
 		jQuery("#delete").button("option", "icons", { primary: "ui-icon-trash" });
 	});
 
+	function showDataElements() {
+		jQuery("#dataElementsTab").show();
+		jQuery("#dataElementsFilter").show();
+		jQuery("#indicatorsTab").hide();
+		jQuery("#indicatorsFilter").hide();
+	}
+	
+	function showIndicators() {
+		jQuery("#indicatorsTab").show();
+		jQuery("#indicatorsFilter").show();
+		jQuery("#dataElementsTab").hide();
+		jQuery("#dataElementsFilter").hide();
+	}
+
     var stat = "ADD";
     var dataEntryFormId = -1;
 	var selected = null;
@@ -174,9 +184,9 @@
 <div id="selectionDialog" title="Selection Box">
 <div id="tabs">
 		<table style="width: 100%;">
-			<tr>
+			<tr id="dataElementsFilter">
 				<td colspan="2">
-					<input type="text" style="width: 100%; border: 1px solid #888; padding: 0;" onkeyup="localFilterSelectList( this.value )"/>
+					<input type="text" style="width: 100%; border: 1px solid #888; padding: 1px 0 1px 0;" onkeyup="filterSelectList( 'dataElementSelector', this.value )"/>
 				</td>
 			</tr>
 
@@ -195,6 +205,12 @@
 				</td>
 			</tr>
 
+			<tr id="indicatorsFilter">
+				<td colspan="2">
+					<input type="text" style="width: 100%; border: 1px solid #888; padding: 1px 0 1px 0;" onkeyup="filterSelectList( 'indicatorSelector', this.value )"/>
+				</td>
+			</tr>
+
 			<tr id="indicatorsTab">
 				<td colspan="2">
 					<select id="indicatorSelector" multiple="multiple" style="height: 150px; width: 100%; margin: 1px;">