← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6718: Fixed bug <984587> font is error in filter text box when click next page.

 

------------------------------------------------------------
revno: 6718
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-04-24 15:02:39 +0700
message:
  Fixed bug <984587> font is error in filter text box when click next page.
modified:
  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/javascripts/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2012-04-20 07:38:56 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2012-04-24 08:02:39 +0000
@@ -1530,20 +1530,30 @@
 {
 	var baseLink = jQuery( "#baseLink" ).val();	
 	var url = baseLink + "currentPage=" + currentPage + "&pageSize=" + pageSize;
-	
-	if ( isAjax == false )
+
+	var index = url.indexOf( '?' );
+	var link = url.substring( 0, index );
+	var data = url.substring( index + 1 );
+
+	if ( !isAjax )
 	{
-		window.location.href = url;
+		var keyParam = data.split( '&' )[0];
+
+		if ( keyParam.split( '=' )[0] == "key" )
+		{
+			setFieldValue( 'key', keyParam.split( '=' )[1] )
+		}
+		
+		url = link + "?currentPage=" + currentPage + "&pageSize=" + pageSize;
+		
+		byId( 'filterKeyForm' ).action = url;
+		byId( 'filterKeyForm' ).submit();
 	}
 	else
-	{
-		var index = url.indexOf( '?' );
-		var link = url.substring( 0, index );
-		var data = url.substring( index + 1 );
-		
+	{		
 		jQuery.postUTF8( link , data, function(html)
 		{
-			if ( contentDiv == undefined )
+			if ( byId( 'contentDiv' ) == undefined )
 			{
 				setInnerHTML( 'contentDiv', html );
 			}