← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1977: Removed duplicated method 'setMessage'

 

------------------------------------------------------------
revno: 1977
committer: hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-06-09 13:37:34 +0700
message:
  Removed duplicated method 'setMessage'
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/i18n.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.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/i18n/i18n.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/i18n.js	2010-06-09 04:08:45 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/i18n.js	2010-06-09 06:37:34 +0000
@@ -138,13 +138,4 @@
     loc.add(option, null);
 
     setMessage( locale_added + " " + toAdd );
-}
-
-function setMessage( message )
-{
-	if ( message != "" )
-	{
-		document.getElementById('message').innerHTML = message;
-		document.getElementById('message').style.display = 'block';
-	}
 }
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js	2010-06-03 17:23:13 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js	2010-06-09 06:37:34 +0000
@@ -385,8 +385,11 @@
  */
 function setMessage( message )
 {
-    $( '#message' ).html( message );
-    $( '#message' ).slideDown( 'fast' );
+	if ( (message != "") && (message != null) )
+	{
+		$( '#message' ).html( message );
+		$( '#message' ).slideDown( 'fast' );
+	}
 }
 
 /**