← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3650: fix for when there are no indicators in selection box

 

------------------------------------------------------------
revno: 3650
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-05-18 10:36:18 +0200
message:
  fix for when there are no indicators in selection box
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisPaging.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/jQuery/jquery.dhisPaging.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisPaging.js	2011-05-16 16:52:34 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisPaging.js	2011-05-18 08:36:18 +0000
@@ -64,8 +64,8 @@
             $select.empty();
             $select_page.empty();
 
-            params.currentPage = json.paging.currentPage;
-            params.numberOfPages = json.paging.numberOfPages;
+            params.currentPage = json.paging.currentPage == 0? 1 : json.paging.currentPage;
+            params.numberOfPages = json.paging.numberOfPages == 0? 1 : json.paging.numberOfPages;
             params.pageSize = json.paging.pageSize;
             params.startPage = json.paging.startPage;