summaryrefslogtreecommitdiffstats
path: root/install/ui/sudo.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-05-27 16:30:41 -0500
committerAdam Young <ayoung@redhat.com>2011-05-31 17:24:08 -0400
commitb01220cc38b2bcaeb35931bda1dc9a258ff3850b (patch)
tree241e93cdcf757cab151cb2b70159811adaa685ab /install/ui/sudo.js
parentfd639bc88c2b811fda538988593dc8898ea5ab6d (diff)
downloadfreeipa-b01220cc38b2bcaeb35931bda1dc9a258ff3850b.tar.gz
freeipa-b01220cc38b2bcaeb35931bda1dc9a258ff3850b.tar.xz
freeipa-b01220cc38b2bcaeb35931bda1dc9a258ff3850b.zip
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
Diffstat (limited to 'install/ui/sudo.js')
-rw-r--r--install/ui/sudo.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/install/ui/sudo.js b/install/ui/sudo.js
index 38075f9b0..f7ccd3cfd 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<that.values.length; i++) {
+ for (var i=0; i<length; i++) {
var value = that.values[i];
var command = IPA.command({