dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11901
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3509: added next/prev page to select list paging
------------------------------------------------------------
revno: 3509
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-05-03 16:01:00 +0200
message:
added next/prev page to select list paging
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.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.ajax.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js 2011-05-03 12:32:37 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js 2011-05-03 14:01:00 +0000
@@ -211,8 +211,19 @@
}
html += '</select>';
+
+ if(currentPage == startPage) {
+ html += '<button type="button" disabled="disabled">Previous page</button>';
+ html += '<button type="button" onclick="dataDictionary.reloadOperands( ' + (parseInt( currentPage ) + 1) + ' )">Next page</button>';
+ } else if(currentPage == numberOfPages) {
+ html += '<button type="button" onclick="dataDictionary.reloadOperands( ' + (parseInt( currentPage ) - 1) + ' )">Previous page</button>';
+ html += '<button type="button" disabled="disabled">Next page</button>';
+ } else {
+ html += '<button type="button" onclick="dataDictionary.reloadOperands( ' + (parseInt( currentPage ) - 1) + ')">Previous page</button>';
+ html += '<button type="button" onclick="dataDictionary.reloadOperands( ' + (parseInt( currentPage ) + 1) + ')">Next page</button>';
+ }
}
-
+
html += 'Size: <input type="text" style="width:50px" onchange="dataDictionary.changeOperandsPageSize( this.value )" value="' + pageSize + '"/></div>';
jQuery( '#operandPaging_div' ).remove();
jQuery( html ).insertAfter( target );