diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2016-05-09 09:43:06 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2016-05-24 11:26:52 +0200 |
commit | c34788918d83ff3f10c44d2c8cb7dfde09b326a5 (patch) | |
tree | d23c75730244913a7a372495c8dde1d6c2acc819 /apps/updatenotification/js | |
parent | d2553a4f6e14181d7788e42d1c70285ebb40f736 (diff) | |
download | nextcloud-server-c34788918d83ff3f10c44d2c8cb7dfde09b326a5.tar.gz nextcloud-server-c34788918d83ff3f10c44d2c8cb7dfde09b326a5.zip |
Make the group selectable
Diffstat (limited to 'apps/updatenotification/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); + }); }); |