aboutsummaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2013-01-11 10:23:04 -0800
committerLukas Reschke <lukas@statuscode.ch>2013-01-11 10:23:04 -0800
commit954b559d48ad6910daab498c8d1981eac2ab47a0 (patch)
tree47c0c6d4bd483be573f3f3e024d63ced3d1b5f26 /settings/js
parent1f6eb68ef91c5743b058d6d8f10a4a20ee3d6d96 (diff)
parent5f795d3aac1db8981874e06e56c7cb18eed9ae7c (diff)
downloadnextcloud-server-954b559d48ad6910daab498c8d1981eac2ab47a0.tar.gz
nextcloud-server-954b559d48ad6910daab498c8d1981eac2ab47a0.zip
Merge pull request #994 from owncloud/enhanced_multiSelect
Enhanced multiSelect
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/users.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/settings/js/users.js b/settings/js/users.js
index b0e30feb80c..fa6f058d923 100644
--- a/settings/js/users.js
+++ b/settings/js/users.js
@@ -177,9 +177,9 @@ var UserList = {
} else {
checkHandeler = false;
}
- var addGroup = function (group) {
+ var addGroup = function (select, group) {
$('select[multiple]').each(function (index, element) {
- if ($(element).find('option[value="' + group + '"]').length == 0) {
+ if ($(element).find('option[value="' + group + '"]').length === 0 && select.data('msid') !== $(element).data('msid')) {
$(element).append('<option value="' + group + '">' + group + '</option>');
}
})
@@ -193,6 +193,7 @@ var UserList = {
element.multiSelect({
createCallback:addGroup,
createText:label,
+ selectedFirst:true,
checked:checked,
oncheck:checkHandeler,
onuncheck:checkHandeler,