diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2012-01-17 15:50:49 -0600 |
---|---|---|
committer | Petr VobornÃk <pvoborni@redhat.com> | 2012-01-23 15:38:25 +0100 |
commit | 7c0c39581c567c2c5bd92f9396b6fd99a2b8a6f8 (patch) | |
tree | 6233a8cf7b0df9b21a67c23bb572d6c59fc81ba0 /install/ui/jquery.ordered-map.js | |
parent | ae2e49a22277a17269833ec13fa657fdc2547b36 (diff) | |
download | freeipa.git-7c0c39581c567c2c5bd92f9396b6fd99a2b8a6f8.tar.gz freeipa.git-7c0c39581c567c2c5bd92f9396b6fd99a2b8a6f8.tar.xz freeipa.git-7c0c39581c567c2c5bd92f9396b6fd99a2b8a6f8.zip |
Enabled paging on automount keys.
The automount keys search facet has been modified to support paging.
Since the automountkey-find command doesn't support --pkey-only
option, the facet is configured such that during a refresh operation
it will retrieve all entries (including the key and info attributes)
and then display only the ones that are supposed to be visible in
the current page.
Ticket #2093
Diffstat (limited to 'install/ui/jquery.ordered-map.js')
-rwxr-xr-x | install/ui/jquery.ordered-map.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/install/ui/jquery.ordered-map.js b/install/ui/jquery.ordered-map.js index f30f8d13..aa0d2814 100755 --- a/install/ui/jquery.ordered-map.js +++ b/install/ui/jquery.ordered-map.js @@ -75,5 +75,28 @@ jQuery.ordered_map = jQuery.fn.ordered_map = function() { return that.values[index]; }; + that.sort = function() { + var keys = that.keys.slice(0); + keys.sort(); + return that.trim(keys); + }; + + that.slice = function(start, end) { + var keys = that.keys.slice(start, end); + return that.trim(keys); + }; + + that.trim = function(keys) { + var new_map = $.ordered_map(); + + for (var i=0; i<keys.length; i++) { + var key = keys[i]; + var value = that.get(key); + new_map.put(key, value); + } + + return new_map; + }; + return that; }; |