From db07c33ecdcfb7125aef132a27e971e46325e4ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20M=C3=BCller?= Date: Wed, 9 Jul 2014 16:52:52 +0200 Subject: [PATCH] use .filterAttr() --- settings/js/users/users.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/settings/js/users/users.js b/settings/js/users/users.js index 97f3a960a6e..7d567e225d9 100644 --- a/settings/js/users/users.js +++ b/settings/js/users/users.js @@ -73,8 +73,8 @@ var UserList = { .find('option').attr('selected', null) .first().attr('selected', 'selected'); } else { - if ($quotaSelect.find('option[value="' + quota + '"]').length > 0) { - $quotaSelect.find('option[value="' + quota + '"]').attr('selected', 'selected'); + if ($quotaSelect.find('option').filterAttr('value', quota).length > 0) { + $quotaSelect.find('option').filterAttr('value', quota).attr('selected', 'selected'); } else { $quotaSelect.append(''); } @@ -414,7 +414,7 @@ var UserList = { var addGroup = function (select, group) { $('select[multiple]').each(function (index, element) { $element = $(element); - if ($element.find('option[value="' + group + '"]').length === 0 && + if ($element.find('option').filterAttr('value', group).length === 0 && select.data('msid') !== $element.data('msid')) { $element.append(''); } @@ -464,7 +464,7 @@ var UserList = { var addSubAdmin = function (group) { $('select[multiple]').each(function (index, element) { - if ($(element).find('option[value="' + group + '"]').length === 0) { + if ($(element).find('option').filterAttr('value', group).length === 0) { $(element).append(''); } }); -- 2.39.5