summaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-05-19 12:05:09 -0500
committerMorris Jobke <hey@morrisjobke.de>2017-05-19 12:05:09 -0500
commitc7ade8598203c49fabeef16667282260b73a60a3 (patch)
tree85f11b780e383d21f52b5bf6aa7f01e4e680a79d /settings/js
parent7eb8b3cec1738edb59fd3c3870d1747b6d2e1cd3 (diff)
downloadnextcloud-server-c7ade8598203c49fabeef16667282260b73a60a3.tar.gz
nextcloud-server-c7ade8598203c49fabeef16667282260b73a60a3.zip
Fix group restriction regression
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/apps.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/settings/js/apps.js b/settings/js/apps.js
index 6bad2cc842c..957ad395f94 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -259,10 +259,10 @@ OC.Settings.Apps = OC.Settings.Apps || {
page.find(".groups-enable").hide();
page.find(".groups-enable__checkbox").prop('checked', false);
} else {
- page.find('#group_select').val((app.groups || []).join('|'));
+ page.find('.group_select').val((app.groups || []).join('|'));
if (app.active) {
if (app.groups.length) {
- OC.Settings.Apps.setupGroupsSelect(page.find('#group_select'));
+ OC.Settings.Apps.setupGroupsSelect(page.find('.group_select'));
page.find(".groups-enable__checkbox").prop('checked', true);
} else {
page.find(".groups-enable__checkbox").prop('checked', false);
@@ -390,7 +390,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
elements.forEach(function(element) {
element.val(t('settings', 'Enable'));
element.parent().find(".groups-enable").hide();
- element.parent().find('#group_select').hide().val(null);
+ element.parent().find('.group_select').hide().val(null);
});
OC.Settings.Apps.State.apps[appId].active = false;
}
@@ -458,7 +458,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
elements.forEach(function(element) {
element.parent().find(".groups-enable").prop('checked', true);
element.parent().find(".groups-enable").hide();
- element.parent().find('#group_select').hide().val(null);
+ element.parent().find('.group_select').hide().val(null);
});
} else {
elements.forEach(function(element) {
@@ -905,8 +905,8 @@ OC.Settings.Apps = OC.Settings.Apps || {
OC.Settings.Apps.updateApp(appId, element);
});
- $(document).on('change', '#group_select', function() {
- var element = $(this).parent().find('input.enable');
+ $(document).on('change', '.group_select', function() {
+ var element = $(this).closest('.section').find('input.enable');
var groups = $(this).val();
if (groups && groups !== '') {
groups = groups.split('|');
@@ -922,7 +922,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
});
$(document).on('change', ".groups-enable__checkbox", function() {
- var $select = $(this).closest('.section').find('#group_select');
+ var $select = $(this).closest('.section').find('.group_select');
$select.val('');
if (this.checked) {