From: Arthur Schiwon Date: Fri, 21 Jun 2019 12:09:31 +0000 (+0200) Subject: fixes LDAP Wizard forgetting groups on select with search X-Git-Tag: v16.0.2RC1~22^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8f5dc4e5cedb0eb54d6c7a01347cda0e7847d9e0;p=nextcloud-server.git fixes LDAP Wizard forgetting groups on select with search Signed-off-by: Arthur Schiwon --- 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($('