From b01220cc38b2bcaeb35931bda1dc9a258ff3850b Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Fri, 27 May 2011 16:30:41 -0500 Subject: Added pagination for associations. The association facet has been modified to support pagination. The UI will show 20 members per page. There are buttons to go to a previous or next page. There is also an input text to jump directly to a certain page. Ticket #1011 --- install/ui/sudo.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'install/ui/sudo.js') diff --git a/install/ui/sudo.js b/install/ui/sudo.js index 38075f9b..f7ccd3cf 100644 --- a/install/ui/sudo.js +++ b/install/ui/sudo.js @@ -160,6 +160,13 @@ IPA.sudocmd_member_sudocmdgroup_table_widget = function (spec) { that.get_records = function(on_success, on_error) { + var length = that.values.length; + if (!length) return; + + if (length > 100) { + length = 100; + } + if (!that.values.length) return; var batch = IPA.batch_command({ @@ -168,7 +175,7 @@ IPA.sudocmd_member_sudocmdgroup_table_widget = function (spec) { 'on_error': on_error }); - for (var i=0; i