diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-09-10 14:30:02 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-09-10 14:30:02 +0200 |
commit | a064536ec13c8effb5e97b152e1949bc6dab6612 (patch) | |
tree | 07a316f0fd80f33fc5dbd3c4a95e6da32fca8576 /settings/js/admin.js | |
parent | 0d28ba06625466adda4cc985d701962843eb5be2 (diff) | |
download | nextcloud-server-a064536ec13c8effb5e97b152e1949bc6dab6612.tar.gz nextcloud-server-a064536ec13c8effb5e97b152e1949bc6dab6612.zip |
Fixed select2 for admin and apps page
Added explicit escaping.
Now internally using a pipe symbol as separator for select2, to make it
possible to use group names containing commas.
Diffstat (limited to 'settings/js/admin.js')
-rw-r--r-- | settings/js/admin.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/settings/js/admin.js b/settings/js/admin.js index 943bf78e024..95be13d2288 100644 --- a/settings/js/admin.js +++ b/settings/js/admin.js @@ -20,6 +20,15 @@ $(document).ready(function(){ $('#excludedGroups').each(function (index, element) { OC.Settings.setupGroupsSelect($(element)); + $(element).change(function(ev) { + var groups = ev.val || []; + if (groups.length > 0) { + groups = ev.val.join(','); // FIXME: make this JSON + } else { + groups = ''; + } + OC.AppConfig.setValue('core', $(this).attr('name'), groups); + }); }); @@ -42,7 +51,7 @@ $(document).ready(function(){ $('#shareAPI p:not(#enable)').toggleClass('hidden', !this.checked); }); - $('#shareAPI input').change(function() { + $('#shareAPI input:not(#excludedGroups)').change(function() { if ($(this).attr('type') === 'checkbox') { if (this.checked) { var value = 'yes'; |