dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10113
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2766: Fixed bug with ordering in dataset section data elements. The previous filter fix was sorting alp...
------------------------------------------------------------
revno: 2766
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-01-27 11:07:48 +0100
message:
Fixed bug with ordering in dataset section data elements. The previous filter fix was sorting alphabetically which messes up the custom sorting in the forms.
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addSection.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editSection.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/addDataSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm 2011-01-21 04:51:55 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm 2011-01-27 10:07:48 +0000
@@ -1,22 +1,16 @@
<script>
jQuery(document).ready( function()
{
- validation( 'addDataSetForm', function( form ){ form.submit() }
- , function()
- {
- filterList( '', 'selectedList' );
- selectAllById('selectedList')
- });
-
- checkValueIsExist( "name", "validateDataSet.action" );
-
- checkValueIsExist( "shortName", "validateDataSet.action" );
-
+ validation( 'addDataSetForm', function( form ){ form.submit() }, function() {
+ selectAllById('selectedList')
+ });
+
+ checkValueIsExist( "name", "validateDataSet.action" );
+ checkValueIsExist( "shortName", "validateDataSet.action" );
checkValueIsExist( "code", "validateDataSet.action" );
});
var previousName = '';
-
</script>
<h3>$i18n.getString( "add_dataset" )</h3>
@@ -96,12 +90,11 @@
<tr>
<td><input type="text" id="availableDataElementsFilter" onkeyup="filterList( this.value, 'availableList' )" style="min-width:25em"/></td>
<td>[$i18n.getString( "name" )]</td>
- <td><input type="text" id="dataSetMembersFilter" onkeyup="filterList( this.value, 'selectedList' )" style="min-width:25em"/></td>
+ <td></td>
</tr>
<tr>
<td>
- <!-- List of all available DataElements -->
<select size="15" id="availableList" name="availableList" multiple="multiple" style="min-width:25em;height:20em" ondblclick="moveSelectedById( 'availableList', 'selectedList');">
#foreach ( $availableDataElement in $dataElements )
<option value="$availableDataElement.id">$encoder.htmlEncode( $availableDataElement.name )</option>
@@ -115,7 +108,6 @@
<input type="button" value="<<" title="$i18n.getString('remove_all')" style="width:50px" onclick="moveAllById( 'selectedList', 'availableList' );"/>
</td>
<td>
- <!-- List of all selected DataElements -->
<select id="selectedList" name="selectedList" multiple="multiple" style="min-width:25em;height:20em" ondblclick="moveSelectedById( 'selectedList', 'availableList' ); disabledSelectedList();">
</select>
</td>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addSection.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addSection.vm 2011-01-22 23:02:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addSection.vm 2011-01-27 10:07:48 +0000
@@ -1,16 +1,13 @@
<script>
jQuery(document).ready( function()
{
- validation( 'addSectionForm', function( form ){ form.submit() }
- , function()
- {
- filterList( '', 'selectedList' );
- selectAllById('selectedList')
- });
+ validation( 'addSectionForm', function( form ){ form.submit() }, function() {
+ selectAllById('selectedList')
+ });
checkValueIsExist( "sectionName", "validateSection.action", {
- dataSetId:function(){return jQuery("#dataSetId").val()}
- ,name: function(){return jQuery("#sectionName").val()}
+ dataSetId: $("#dataSetId").val(),
+ name: $("#sectionName").val()
});
});
</script>
@@ -59,7 +56,7 @@
<tr>
<td><input type="text" id="availableDataElementsFilter" onkeyup="filterList( this.value, 'availableList' )" style="min-width:26em"/></td>
<td align="center">[$i18n.getString( "name" )]</td>
- <td><input type="text" id="dataSetSectionMembersFilter" onkeyup="filterList( this.value, 'selectedList' )" style="min-width:26em"/></td>
+ <td></td>
</tr>
<tr>
<td>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm 2011-01-25 22:15:46 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm 2011-01-27 10:07:48 +0000
@@ -1,16 +1,13 @@
<script>
jQuery(document).ready( function()
{
- validation( 'editDataSetForm', function( form ){ form.submit() }
- , function()
- {
- filterList( '', 'selectedList' );
- selectAllById('selectedList')
- });
+ validation( 'editDataSetForm', function( form ){ form.submit() }, function() {
+ selectAllById('selectedList')
+ });
- checkValueIsExist( "name", "validateDataSet.action", {dataSetId: function(){return jQuery("#dataSetId").val()}});
- checkValueIsExist( "shortName", "validateDataSet.action", {dataSetId: function(){return jQuery("#dataSetId").val()}} );
- checkValueIsExist( "code", "validateDataSet.action", {dataSetId: function(){return jQuery("#dataSetId").val()}});
+ checkValueIsExist( "name", "validateDataSet.action", {dataSetId: $("#dataSetId").val()} );
+ checkValueIsExist( "shortName", "validateDataSet.action", {dataSetId: $("#dataSetId").val()} );
+ checkValueIsExist( "code", "validateDataSet.action", {dataSetId: $("#dataSetId").val()} );
});
var previousName = '';
@@ -91,12 +88,11 @@
<tr>
<td><input type="text" id="availableDataElementsFilter" onkeyup="filterList( this.value, 'availableList' )" style="min-width:20em"></td>
<td>$i18n.getString( "name" )</td>
- <td><input type="text" id="dataSetMembersFilter" onkeyup="filterList( this.value, 'selectedList' )" style="min-width:20em"></td>
+ <td></td>
</tr>
<tr>
<td>
- <!-- List of all available DataElements -->
<select size="15" id="availableList" name="availableList" multiple="multiple" style="min-width:20em;height:20em" ondblclick="moveSelectedById( 'availableList', 'selectedList');">
#foreach ( $availableDataElement in $dataElements )
<option value="$availableDataElement.id">$encoder.htmlEncode( $availableDataElement.name )</option>
@@ -110,7 +106,6 @@
<input type="button" value="<<" title="$i18n.getString('remove_all')" style="width:50px" onclick="moveAllById( 'selectedList', 'availableList' );"/>
</td>
<td>
- <!-- List of all selected DataElements -->
<select id="selectedList" name="selectedList" multiple="multiple" style="min-width:20em;height:20em" ondblclick="moveSelectedById( 'selectedList', 'availableList' );">
#foreach ( $availableDataElement in $dataSetDataElements )
<option value="$availableDataElement.id">$encoder.htmlEncode( $availableDataElement.name )</option>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editSection.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editSection.vm 2011-01-25 21:25:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editSection.vm 2011-01-27 10:07:48 +0000
@@ -1,31 +1,24 @@
<script>
jQuery(document).ready( function()
{
- validation( 'editDataSetForm', function( form ){ form.submit() }
- , function()
- {
- filterList( '', 'selectedList' );
- selectAllById('selectedList')
- });
+ validation( 'editDataSetForm', function( form ){ form.submit() }, function() {
+ selectAllById('selectedList')
+ });
checkValueIsExist( "sectionName", "validateSection.action", {
- dataSetId:function(){return jQuery("#dataSetId").val()}
- ,name: function(){return jQuery("#sectionName").val()}
- ,sectionId: function(){return jQuery("#sectionId").val()}
+ dataSetId:$("#dataSetId").val(),
+ name: $("#sectionName").val(),
+ sectionId: $("#sectionId").val()
});
});
-
</script>
-
<h3>$i18n.getString( "edit_section" )</h3>
<form id="editDataSetForm" name="editDataSetForm" action="updateSection.action" method="post" >
- <div style="display:inline">
<input type="hidden" id="dataSetId" name="dataSetId" value="$dataSet.id"/>
<input type="hidden" id="sectionId" name="sectionId" value="$section.id"/>
<input type="hidden" id="categoryComboId" name="categoryComboId" value="$!categoryCombo.id"/>
- </div>
<table id="detailsList">
<col/> ## Labels
@@ -81,7 +74,7 @@
<tr>
<td><input type="text" id="availableDataElementsFilter" onkeyup="filterList( this.value, 'availableList' )" style="min-width:26em"/></td>
<td align="center">[$i18n.getString( "name" )]</td>
- <td><input type="text" id="dataSetSectionMembersFilter" onkeyup="filterList( this.value, 'selectedList' )" style="min-width:26em"/></td>
+ <td></td>
</tr>
<tr>