summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--install/ui/src/freeipa/automount.js24
-rw-r--r--install/ui/src/freeipa/facet.js1
2 files changed, 15 insertions, 10 deletions
diff --git a/install/ui/src/freeipa/automount.js b/install/ui/src/freeipa/automount.js
index b010a52d4..ca0729beb 100644
--- a/install/ui/src/freeipa/automount.js
+++ b/install/ui/src/freeipa/automount.js
@@ -337,16 +337,20 @@ IPA.automount.key_search_facet = function(spec) {
that.get_selected_values = function() {
var values = [];
-
- $('input[name="description"]:checked', that.table.tbody).each(function() {
- var value = {};
- $('div', $(this).parent().parent()).each(function() {
- var div = $(this);
- var name = div.attr('name');
- value[name] = div.text();
- });
- values.push(value);
- });
+ var keys = that.table.get_selected_values();
+ var records = that.table.records;
+
+ if (keys.length === 0 || !records) return values;
+
+ for (var i=0,l=records.length; i<l; i++) {
+ var record = records[i];
+ if (keys.indexOf(record.description[0]) > -1) {
+ values.push({
+ automountkey: record.automountkey[0],
+ automountinformation: record.automountinformation[0]
+ });
+ }
+ }
return values;
};
diff --git a/install/ui/src/freeipa/facet.js b/install/ui/src/freeipa/facet.js
index 6afc79d61..4d1787145 100644
--- a/install/ui/src/freeipa/facet.js
+++ b/install/ui/src/freeipa/facet.js
@@ -1827,6 +1827,7 @@ exp.table_facet = IPA.table_facet = function(spec, no_init) {
*/
that.load_records = function(records) {
that.table.empty();
+ that.table.records = records;
for (var i=0; i<records.length; i++) {
that.add_record(records[i]);
}