dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #07805
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2298: Data Elements and Indicators (Editors) - Minor fixed
------------------------------------------------------------
revno: 2298
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Sat 2010-10-02 01:28:58 +0700
message:
Data Elements and Indicators (Editors) - Minor fixed
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView1.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView2.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupEditorView1.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupEditorView2.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-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js 2010-09-14 09:03:41 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/oust/oust.js 2010-10-01 18:28:58 +0000
@@ -100,7 +100,7 @@
for ( var i = 0, unitIdElement; ( unitIdElement = unitIdElements[i] ); ++i )
{
unitIds[i] = unitIdElement.firstChild.nodeValue;
- selectedOrganisationUnit.push( unitIdElement.firstChild.nodeValue );
+ selectedOrganisationUnit.push( unitIds[i] );
}
if ( !listenerFunction )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView1.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView1.js 2010-09-29 11:51:04 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView1.js 2010-10-01 18:28:58 +0000
@@ -97,9 +97,8 @@
refreshListById( 'availableDataElements' );
visableAvailableDataElements();
- //disable('availableDataElements');
enable('availableDataElements');
- $( '#groupNameView' ).html( name );
+ setInnerHTML('groupNameView', name);
}
function visableAvailableDataElements()
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView2.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView2.js 2010-09-24 21:51:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupEditorView2.js 2010-10-01 18:28:58 +0000
@@ -80,22 +80,24 @@
function getAssignedGroupsCompleted( xmlObject )
{
assignedGroups = new Object();
- var name = getElementValue( xmlObject, 'name' );
+ var availableList = byId("availableDataElements");
+ var name = availableList.options[ availableList.selectedIndex ].text;
var dataElementGroups = xmlObject.getElementsByTagName( 'dataElementGroup' );
var list = byId('assignedGroups');
list.options.length = 0;
for( var i=0;i<dataElementGroups.length;i++)
{
- var id = dataElementGroups.item(i).getElementsByTagName( 'id' )[0].firstChild.nodeValue;
- var value = dataElementGroups.item(i).getElementsByTagName( 'name' )[0].firstChild.nodeValue;
+ var id = getElementValue( dataElementGroups.item(i), 'id' );
+ var value = getElementValue( dataElementGroups.item(i), 'name' );
addOptionToListWithToolTip( list, id, value );
assignedGroups[id] = value;
}
+
refreshListById( 'availableGroups' );
visableAvailableDataElements();
- disable('availableGroups');
- $( '#groupNameView' ).html( name );
+ enable('availableGroups');
+ setInnerHTML('groupNameView', name);
}
function visableAvailableDataElements()
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupEditorView1.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupEditorView1.js 2010-09-29 11:51:04 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupEditorView1.js 2010-10-01 18:28:58 +0000
@@ -97,8 +97,8 @@
refreshListById( 'availableIndicators' );
visableAvailableIndicators();
- byId('availableIndicators').disabled=false;
- byId( 'groupNameView' ).innerHTML = groupName;
+ enable('availableIndicators');
+ setInnerHTML('groupNameView', groupName);
}
function visableAvailableIndicators()
@@ -252,11 +252,7 @@
{
try
{
-// var id = $("#indicatorGroups").value;alert(id);
-
- var indicatorGroupsSelect = byId( 'indicatorGroups' );
- var id = indicatorGroupsSelect.options[ indicatorGroupsSelect.selectedIndex ].value;
-
+ var id = $("#indicatorGroups").val();
var request = new Request();
var requestString = 'updateIndicatorGroupEditor.action';
var params = "id=" + id;
@@ -280,11 +276,7 @@
}
function updateIndicatorGroupMembersReceived( xmlObject )
-{
-
-// var name = xmlObject.getElementsByTagName( "name" )[0].firstChild.nodeValue;
-// setHeaderDelayMessage(i18n_update_success + " : " + name);
-
+{
var indicatorGroupsSelect = byId( 'indicatorGroups' );
setHeaderDelayMessage( i18n_update_success + " : " + indicatorGroupsSelect.options[ indicatorGroupsSelect.selectedIndex ].text );
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupEditorView2.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupEditorView2.js 2010-09-24 21:51:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupEditorView2.js 2010-10-01 18:28:58 +0000
@@ -80,10 +80,11 @@
function getAssignedIndicatorGroupsCompleted( indicatorGroups )
{
assignedGroups = new Object();
+ var availableList = byId('availableIndicators');
+ var groupName = availableList.options[ availableList.selectedIndex ].text;
+ var availableIndicatorGroups = indicatorGroups.getElementsByTagName( 'indicatorGroup' );
var list = byId('assignedGroups');
list.options.length = 0;
- var groupName = list.options[ list.selectedIndex ].text;
- var availableIndicatorGroups = indicatorGroups.getElementsByTagName( 'indicatorGroup' );
for( var i=0;i<availableIndicatorGroups.length;i++)
{
@@ -95,9 +96,8 @@
refreshListById( 'availableGroups' );
visableAvailableIndicators();
- disable('availableGroups');
- $( '#groupNameView' ).html( groupName );
-
+ enable('availableGroups');
+ setInnerHTML('groupNameView', groupName);
}
function visableAvailableIndicators()