Fix share admin page

arrow function don't work that well with jquery

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
pull/35687/head
Carl Schwan 2 years ago committed by nextcloud-command
parent 888ffa498d
commit a51c3b3651

@ -1,14 +1,14 @@
window.addEventListener('DOMContentLoaded', () => {
$('#excludedGroups,#linksExcludedGroups,#passwordsExcludedGroups').each(function(index, element) {
OC.Settings.setupGroupsSelect($(element))
$(element).change((ev) => {
$(element).change(function(ev) {
let groups = ev.val || []
groups = JSON.stringify(groups)
OCP.AppConfig.setValue('core', $(this).attr('name'), groups)
})
})
$('#loglevel').change(() => {
$('#loglevel').change(function() {
$.post(OC.generateUrl('/settings/admin/log/level'), { level: $(this).val() }, () => {
OC.Log.reload()
})
@ -253,11 +253,11 @@ window.addEventListener('DOMContentLoaded', () => {
})
})
$('#allowGroupSharing').change(() => {
$('#allowGroupSharing').change(function() {
$('#allowGroupSharing').toggleClass('hidden', !this.checked)
})
$('#shareapiExcludeGroups').change(() => {
$('#shareapiExcludeGroups').change(function() {
$('#selectExcludedGroups').toggleClass('hidden', !this.checked)
})

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save