dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15071
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5296: Dataelement/Indicator group editor view - Added missing sort in the available lists.
------------------------------------------------------------
revno: 5296
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-12-06 14:58:47 +0700
message:
Dataelement/Indicator group editor view - Added missing sort in the available lists.
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupEditorView.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-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView.js 2011-12-01 04:30:20 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView.js 2011-12-06 07:58:47 +0000
@@ -23,12 +23,16 @@
for ( var id in availableDataElements )
{
var text = availableDataElements[id];
+
if ( text.toLowerCase().indexOf( filter_1.toLowerCase() ) != -1 )
{
list_1.append( '<option value="' + id + '">' + text + '</option>' );
list_2.append( '<option value="' + id + '">' + text + '</option>' );
}
}
+
+ sortList( 'availableDataElements', 'ASC' );
+ sortList( 'availableDataElements2', 'ASC' );
list_1.find( ":first" ).attr( "selected", "selected" );
list_2.find( ":first" ).attr( "selected", "selected" );
}
@@ -41,15 +45,18 @@
var list_2 = jQuery( "#view_2 #availableGroups" );
list_1.empty();
list_2.empty();
+
for ( var id in dataElementGroups )
{
var text = dataElementGroups[id];
+
if ( text.toLowerCase().indexOf( filter_1.toLowerCase() ) != -1 )
{
list_1.append( '<option value="' + id + '">' + text + '</option>' );
list_2.append( '<option value="' + id + '">' + text + '</option>' );
}
}
+
sortList( 'dataElementGroups', 'ASC' );
sortList( 'availableGroups', 'ASC' );
list_1.find( ":first" ).attr( "selected", "selected" );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupEditorView.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupEditorView.js 2011-08-19 07:40:22 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupEditorView.js 2011-12-06 07:58:47 +0000
@@ -3,6 +3,7 @@
loadAvailableGroups();
getIndicatorsByGroup();
getAssignedIndicatorGroups();
+
jQuery( "#addIndicatorGroupForm" ).dialog( {
autoOpen : false,
modal : true
@@ -29,6 +30,8 @@
}
}
+ sortList( 'availableIndicators', 'ASC' );
+ sortList( 'availableIndicators2', 'ASC' );
list_1.find( ":first" ).attr( "selected", "selected" );
list_2.find( ":first" ).attr( "selected", "selected" );
@@ -42,6 +45,7 @@
var list_2 = jQuery( "#view_2 #availableGroups" );
list_1.empty();
list_2.empty();
+
for ( var id in indicatorGroups )
{
var text = indicatorGroups[id];