← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2807: Fixed bug 'hierarchy-operations-not-working'

 

------------------------------------------------------------
revno: 2807
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-02-03 10:23:41 +0100
message:
  Fixed bug 'hierarchy-operations-not-working'
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/hierarchyOperations.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-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/hierarchyOperations.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/hierarchyOperations.js	2010-11-20 08:35:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/hierarchyOperations.js	2011-02-03 09:23:41 +0000
@@ -5,7 +5,7 @@
 
 function organisationUnitToMoveSelected( orgUnitIds )
 {
-    document.getElementById( 'message' ).style.display = 'none';
+	hideHeaderMessage();
 
     if ( orgUnitIds.length == 1 )
     {
@@ -53,14 +53,9 @@
         
         selection.setListenerFunction( newParentSelected );
     }
-    else if ( type == 'input' )
-    {
-        document.getElementById( 'message' ).innerHTML = message;
-        document.getElementById( 'message' ).style.display = 'block';
-    }
-    else if ( type == 'error' )
-    {
-        window.alert( verication_of_the_org_unit_to_move_failed + ':\n\n' + message );
+    else if ( type == 'input' || type == 'error' )
+    {
+        setHeaderMessage( message );
     }
 }
 
@@ -70,7 +65,7 @@
 
 function newParentSelected( orgUnitIds )
 {
-    document.getElementById( 'message' ).style.display = 'none';
+	hideHeaderMessage();
 
     if ( orgUnitIds.length == 1 )
     {
@@ -121,14 +116,9 @@
         
         selection.setListenerFunction( null );
     }
-    else if ( type == 'input' )
-    {
-        document.getElementById( 'message' ).innerHTML = message;
-        document.getElementById( 'message' ).style.display = 'block';
-    }
-    else if ( type == 'error' )
-    {
-        window.alert( verification_of_the_new_parent_org_unit_failed + ':\n\n' + message );
+    else if ( type == 'input' || type == 'error' )
+    {
+    	setHeaderMessage( message );
     }
 }