diff options
Diffstat (limited to 'apps/updatenotification/js/admin.js')
-rw-r--r-- | apps/updatenotification/js/admin.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/updatenotification/js/admin.js b/apps/updatenotification/js/admin.js index 3bc5dd21527..e5c942fbdab 100644 --- a/apps/updatenotification/js/admin.js +++ b/apps/updatenotification/js/admin.js @@ -39,8 +39,16 @@ $(document).ready(function(){ }); }); }); + $('#release-channel').change(function() { var newChannel = $('#release-channel').find(":selected").val(); + + if (newChannel === 'git' || newChannel === 'daily') { + $('#oca_updatenotification_groups').addClass('hidden'); + } else { + $('#oca_updatenotification_groups').removeClass('hidden'); + } + $.post( OC.generateUrl('/apps/updatenotification/channel'), { @@ -51,4 +59,12 @@ $(document).ready(function(){ } ); }); + + var $notificationTargetGroups = $('#oca_updatenotification_groups_list'); + OC.Settings.setupGroupsSelect($notificationTargetGroups); + $notificationTargetGroups.change(function(ev) { + var groups = ev.val || []; + groups = JSON.stringify(groups); + OC.AppConfig.setValue('updatenotification', 'notify_groups', groups); + }); }); |