summaryrefslogtreecommitdiffstats
path: root/settings/js/admin.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-09-10 14:30:02 +0200
committerVincent Petry <pvince81@owncloud.com>2014-09-10 14:30:02 +0200
commita064536ec13c8effb5e97b152e1949bc6dab6612 (patch)
tree07a316f0fd80f33fc5dbd3c4a95e6da32fca8576 /settings/js/admin.js
parent0d28ba06625466adda4cc985d701962843eb5be2 (diff)
downloadnextcloud-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.js11
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';