Skip to content

Commit 141c04a

Browse files
committed
Fix share admin page
arrow function don't work that well with jquery Signed-off-by: Carl Schwan <carl@carlschwan.eu>
1 parent b414f5e commit 141c04a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

apps/settings/src/admin.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
window.addEventListener('DOMContentLoaded', () => {
22
$('#excludedGroups,#linksExcludedGroups,#passwordsExcludedGroups').each(function(index, element) {
33
OC.Settings.setupGroupsSelect($(element))
4-
$(element).change((ev) => {
4+
$(element).change(function(ev) {
55
let groups = ev.val || []
66
groups = JSON.stringify(groups)
77
OCP.AppConfig.setValue('core', $(this).attr('name'), groups)
88
})
99
})
1010

11-
$('#loglevel').change(() => {
11+
$('#loglevel').change(function() {
1212
$.post(OC.generateUrl('/settings/admin/log/level'), { level: $(this).val() }, () => {
1313
OC.Log.reload()
1414
})
1515
})
1616

17-
$('#shareAPIEnabled').change(() => {
17+
$('#shareAPIEnabled').change(function() {
1818
$('#shareAPI p:not(#enable)').toggleClass('hidden', !this.checked)
1919
})
2020

@@ -206,11 +206,12 @@ window.addEventListener('DOMContentLoaded', () => {
206206
})
207207
})
208208

209-
$('#allowGroupSharing').change(() => {
209+
$('#allowGroupSharing').change(function() {
210210
$('#allowGroupSharing').toggleClass('hidden', !this.checked)
211211
})
212212

213-
$('#shareapiExcludeGroups').change(() => {
213+
console.error("loaded")
214+
$('#shareapiExcludeGroups').change(function() {
214215
$('#selectExcludedGroups').toggleClass('hidden', !this.checked)
215216
})
216217

0 commit comments

Comments
 (0)