diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-07-09 16:52:52 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-07-09 16:52:52 +0200 |
commit | db07c33ecdcfb7125aef132a27e971e46325e4ff (patch) | |
tree | 7c92965a65a40f3e3435186cb10140f1d932df03 /settings/js | |
parent | 56f029d52428ca2b8b4c3ef86051423fc311d6a8 (diff) | |
download | nextcloud-server-db07c33ecdcfb7125aef132a27e971e46325e4ff.tar.gz nextcloud-server-db07c33ecdcfb7125aef132a27e971e46325e4ff.zip |
use .filterAttr()
Diffstat (limited to 'settings/js')
-rw-r--r-- | settings/js/users/users.js | 8 |
1 files 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('<option value="' + escapeHTML(quota) + '" selected="selected">' + escapeHTML(quota) + '</option>'); } @@ -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('<option value="' + escapeHTML(group) + '">' + escapeHTML(group) + '</option>'); } @@ -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('<option value="' + escapeHTML(group) + '">' + escapeHTML(group) + '</option>'); } }); |