dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #05342
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1750: Improved filtering in dataset and orgunit module
Merge authors:
Lars <larshelg@larshelg-laptop>
------------------------------------------------------------
revno: 1750 [merge]
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Thu 2010-04-08 10:49:48 +0200
message:
Improved filtering in dataset and orgunit module
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/editDataSet.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/dataSet.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitGroupSetForm.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 2010-03-10 06:35:04 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm 2010-04-07 16:00:16 +0000
@@ -93,7 +93,10 @@
<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')">
+ <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>
+ #end
</select>
</td>
<td>
@@ -121,19 +124,3 @@
</form>
<span id="message"></span>
-
-<script type="text/javascript">
-
- var dataSetMembers = new Object();
-
- var availableDataElements = new Object();
-
- #foreach ( $availableDataElement in $dataElements )
- availableDataElements['$availableDataElement.id'] = '$encoder.jsEscape( $availableDataElement.name, "'" )';
- #end
-
- initLists();
-
- var previousName = '';
-
-</script>
\ No newline at end of file
=== 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 2010-03-17 13:16:09 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm 2010-04-07 16:00:16 +0000
@@ -93,15 +93,18 @@
</tr>
<tr>
- <td><input type="text" id="availableDataElementsFilter" onkeyup="filterAvailableDataElements()" style="min-width:20em"></td>
+ <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="filterDataSetMembers()" style="min-width:20em"></td>
+ <td><input type="text" id="dataSetMembersFilter" onkeyup="filterList( this.value, 'selectedList' )" style="min-width:20em"></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')">
+ <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>
+ #end
</select>
</td>
<td>
@@ -113,6 +116,9 @@
<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>
+ #end
</select>
</td>
</tr>
@@ -129,18 +135,3 @@
</form>
<span id="message"></span>
-
-<script type="text/javascript">
-
- var dataSetMembers = new Object();
-#foreach ( $dataElement in $dataSetDataElements )
- dataSetMembers['$dataElement.id'] = '$encoder.jsEscape( $dataElement.name, "'" )';
-#end
-
- var availableDataElements = new Object();
-#foreach ( $availableDataElement in $dataElements )
- availableDataElements['$availableDataElement.id'] = '$encoder.jsEscape( $availableDataElement.name, "'" )';
-#end
-
- initLists();
-</script>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/dataSet.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/dataSet.js 2010-03-12 14:29:20 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/dataSet.js 2010-04-07 16:00:16 +0000
@@ -176,22 +176,3 @@
document.getElementById( 'message' ).style.display = 'block';
}
}
-
-// ----------------------------------------------------------------------
-// List
-// ----------------------------------------------------------------------
-
-function initLists()
-{
- var id;
-
- for ( id in dataSetMembers )
- {
- $("#selectedList").append( $( "<option></option>" ).attr( "value",id ).text( dataSetMembers[id] )) ;
- }
-
- for ( id in availableDataElements )
- {
- $("#availableList").append( $( "<option></option>" ).attr( "value",id ).text( availableDataElements[id] )) ;
- }
-}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm 2010-02-09 09:10:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm 2010-04-07 16:00:16 +0000
@@ -67,10 +67,14 @@
<td></td>
<th>$i18n.getString( "selected_groups" )</th>
</tr>
-
+ <tr>
+ <td><input type="text" onkeyup="filterList( this.value, 'availableGroups' )" style="width:25em"></td>
+ <td style="text-align:center">< $i18n.getString( "filters" ) ></td>
+ <td><input type="text" onkeyup="filterList( this.value, 'selectedGroups' )" style="width:25em"></td>
+ </tr>
<tr>
<td>
- <select multiple size="6" id="availableGroups" name="availableGroups" style="width:100%" ondblclick="moveSelectedById( 'availableGroups', 'selectedGroups' )">
+ <select multiple size="8" id="availableGroups" name="availableGroups" style="width:100%" ondblclick="moveSelectedById( 'availableGroups', 'selectedGroups' )">
#foreach ( $group in $availableGroups )
<option value="$group.id">$group.name</option>
#end
@@ -83,7 +87,7 @@
<input type="button" value="<<" title="$i18n.getString('remove_all')" style="width:50px" onclick="moveAllById( 'selectedGroups', 'availableGroups' )">
</td>
<td>
- <select multiple size="6" id="selectedGroups" name="selectedGroups" style="width:100%" ondblclick="moveSelectedById( 'selectedGroups', 'availableGroups' )">
+ <select multiple size="8" id="selectedGroups" name="selectedGroups" style="width:100%" ondblclick="moveSelectedById( 'selectedGroups', 'availableGroups' )">
</select>
</td>
</tr>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitGroupSetForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitGroupSetForm.vm 2010-02-09 09:10:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitGroupSetForm.vm 2010-04-07 16:00:16 +0000
@@ -66,10 +66,14 @@
<td></td>
<th>$i18n.getString( "selected_groups" )</th>
</tr>
-
+ <tr>
+ <td><input type="text" onkeyup="filterList( this.value, 'availableGroups' )" style="width:25em"></td>
+ <td style="text-align:center">< $i18n.getString( "filters" ) ></td>
+ <td><input type="text" onkeyup="filterList( this.value, 'selectedGroups' )" style="width:25em"></td>
+ </tr>
<tr>
<td>
- <select multiple size="6" id="availableGroups" name="availableGroups" style="width:100%" ondblclick="moveSelectedById( 'availableGroups', 'selectedGroups' )">
+ <select multiple size="8" id="availableGroups" name="availableGroups" style="width:100%" ondblclick="moveSelectedById( 'availableGroups', 'selectedGroups' )">
#foreach ( $group in $availableGroups )
<option value="$group.id">$group.name</option>
#end
@@ -82,7 +86,7 @@
<input type="button" value="<<" title="$i18n.getString('remove_all')" style="width:50px" onclick="moveAllById( 'selectedGroups', 'availableGroups' )">
</td>
<td>
- <select multiple size="6" id="selectedGroups" name="selectedGroups" style="width:100%" ondblclick="moveSelectedById( 'selectedGroups', 'availableGroups' )">
+ <select multiple size="8" id="selectedGroups" name="selectedGroups" style="width:100%" ondblclick="moveSelectedById( 'selectedGroups', 'availableGroups' )">
#foreach ( $group in $selectedGroups )
<option value="$group.id">$group.name</option>
#end