← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2682: Fixed weird message field positioning. Jquery positioning helper methods are not very helpful and...

 

------------------------------------------------------------
revno: 2682
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-01-21 00:05:28 +0100
message:
  Fixed weird message field positioning. Jquery positioning helper methods are not very helpful and sets divs to inline css positioning.
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/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/css/widgets.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css	2011-01-18 09:42:09 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css	2011-01-20 23:05:28 +0000
@@ -275,10 +275,11 @@
 span#message 
 {
   display: none;
-  padding: 0.5em; 
+  padding: 1em;
+  margin: 1em;
   background-color: #ffffbf;
   border: 1px solid #cccc00;
-  position:absolute;	
+  width: 500px;
 }
 
 span#info

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2011-01-19 07:52:16 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2011-01-20 23:05:28 +0000
@@ -433,10 +433,10 @@
  */
 function setMessage( message )
 {
-	if ( (message != "") && (message != null) )
+	if ( message && message != '' )
 	{
-		$( '#message' ).html( message );
-		$( '#message' ).slideDown( 'fast' );
+		byId( 'message' ).innerHTML = message;
+		byId( 'message' ).style.display = 'block';
 	}
 }
 
@@ -455,7 +455,7 @@
  */
 function hideMessage()
 {
-	$( '#message' ).slideUp( 'fast' );
+	byId( 'message' ).style.display = 'none';
 }
 
 /**