From 56177859552cd30a4598d6373956ba4bfa9db12c Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 21 Jun 2019 14:09:31 +0200 Subject: [PATCH] fixes LDAP Wizard forgetting groups on select with search Signed-off-by: Arthur Schiwon --- .../user_ldap/js/wizard/wizardFilterOnType.js | 27 +++---------- .../js/wizard/wizardTabAbstractFilter.js | 39 ++++++++++--------- apps/user_ldap/js/wizard/wizardTabGeneric.js | 10 +++-- 3 files changed, 32 insertions(+), 44 deletions(-) diff --git a/apps/user_ldap/js/wizard/wizardFilterOnType.js b/apps/user_ldap/js/wizard/wizardFilterOnType.js index bb1871023a2..f792b1a99a2 100644 --- a/apps/user_ldap/js/wizard/wizardFilterOnType.js +++ b/apps/user_ldap/js/wizard/wizardFilterOnType.js @@ -21,7 +21,6 @@ OCA = OCA || {}; init: function($select, $textInput) { this.$select = $select; this.$textInput = $textInput; - this.updateOptions(); this.lastSearch = ''; var fity = this; @@ -35,22 +34,6 @@ OCA = OCA || {}; }); }, - /** - * the options will be read in again. Should be called after a - * configuration switch. - */ - updateOptions: function() { - var options = []; - this.$select.find('option').each(function() { - options.push({ - value: $(this).val(), - normalized: $(this).val().toLowerCase() - } - ); - }); - this._options = options; - }, - /** * the actual search or filter method * @@ -62,10 +45,12 @@ OCA = OCA || {}; return; } fity.lastSearch = filterVal; - fity.$select.empty(); - $.each(fity._options, function() { - if(!filterVal || this.normalized.indexOf(filterVal) > -1) { - fity.$select.append($('