← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1828: Applying a category combo restriction when creating sections. A section can have only those datae...

 

------------------------------------------------------------
revno: 1828
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: trunk
timestamp: Fri 2010-07-09 12:14:37 +0200
message:
  Applying a category combo restriction when creating sections. A section can have only those dataelements that belong to same category combo
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/section.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/sectionList.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/section.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/section.js	2010-07-07 10:22:14 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/section.js	2010-07-09 10:14:37 +0000
@@ -35,12 +35,6 @@
 function getSectionByDataSet(dataSetId) {
 	window.location = "section.action?dataSetId=" + dataSetId;
 }
-
-function getDataElementByCategoryCombo(categoryComboId, dataSetId) {
-	window.location = "addSectionAction.action?categoryComboId="
-			+ categoryComboId + "&dataSetId=" + dataSetId;
-}
-
 function removeSection(sectionId, sectionName) {
 	removeItem(sectionId, sectionName, i18n_confirm_delete,
 			"removeSection.action");

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/sectionList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/sectionList.vm	2010-07-07 10:22:14 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/sectionList.vm	2010-07-09 10:14:37 +0000
@@ -1,4 +1,3 @@
-
 <h3>$i18n.getString( "section_management" )</h3>
 
 <table class="mainPageTable">
@@ -13,7 +12,7 @@
           <col width="20">               	
               	
 		  <tr>
-			<td colspan="2"><label>$i18n.getString( "select_dataset" )</label><br>
+			<td><label>$i18n.getString( "select_dataset" )</label><br>
 			  <select id="dataSetId" name="dataSetId" style="min-width:20em" onchange="javascript:getSectionByDataSet(this.options[this.selectedIndex].value)">
 				<option value=null selected="selected" >[ $i18n.getString( "all" ) ]</option>
 				#foreach ( $dataset in $datasets )
@@ -21,6 +20,14 @@
 				#end
 			  </select>
 			</td>
+			<td><label>$i18n.getString( "select_categorycombo" )</label><br>			  
+                <select id="categoryComboId" name="categoryComboId" style="min-width:20em">
+                    <option value=null selected="selected" >[ $i18n.getString( "all" ) ]</option>
+                    #foreach ( $categoryCombo in $categoryCombos )
+                        <option value="$categoryCombo.id" #if($categoryComboId==$categoryCombo.id) selected="selected" #end>$categoryCombo.name</option>
+                    #end
+                </select>					
+            </td>
 		  	<td colspan="4" style="text-align:right">
 		  		<input type="button" value="$i18n.getString( "add_new" )" onclick="javascript:addSectionSubmit()" style="width:80px"><br>
                 <input type="button" value="$i18n.getString( "sort_section" )" onclick="javascript:sortOrderSubmit()" style="width:80px"><br>
@@ -67,6 +74,6 @@
 </table>
 
 <script type="text/javascript">
-var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete" ) , "'" )';
-var i18n_please_select_dataset = '$encoder.jsEscape( $i18n.getString( "please_select_dataset" ) , "'" )';
-</script>
+	var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete" ) , "'" )';
+	var i18n_please_select_dataset = '$encoder.jsEscape( $i18n.getString( "please_select_dataset" ) , "'" )';
+</script>
\ No newline at end of file