diff options
author | Robin McCorkell <rmccorkell@owncloud.com> | 2015-09-17 17:00:15 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-09-23 12:10:02 +0200 |
commit | 2bef3ef34bc81737c1667187aa3b21ecf1442e03 (patch) | |
tree | 249a1945b90c224444c1b3a5490a32f9d94b10c3 /apps/files_external/js | |
parent | 060d16961596b24a2d0cf9e30408482ce33cefe6 (diff) | |
download | nextcloud-server-2bef3ef34bc81737c1667187aa3b21ecf1442e03.tar.gz nextcloud-server-2bef3ef34bc81737c1667187aa3b21ecf1442e03.zip |
Hide deprecated backends in external storage GUI
Selecting/deselecting the deprecate-to backends in the user mountable
storages selection will also change the corresponding deprecated
backend.
Diffstat (limited to 'apps/files_external/js')
-rw-r--r-- | apps/files_external/js/settings.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index 4319677f4f4..5da34c52193 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -1113,7 +1113,18 @@ $(document).ready(function() { $('input[name="allowUserMountingBackends\\[\\]"]').bind('change', function() { OC.msg.startSaving('#userMountingMsg'); - var userMountingBackends = $('input[name="allowUserMountingBackends\\[\\]"]:checked').map(function(){return $(this).val();}).get(); + + var userMountingBackends = $('input[name="allowUserMountingBackends\\[\\]"]:checked').map(function(){ + return $(this).val(); + }).get(); + var deprecatedBackends = $('input[name="allowUserMountingBackends\\[\\]"][data-deprecate-to]').map(function(){ + if ($.inArray($(this).data('deprecate-to'), userMountingBackends) !== -1) { + return $(this).val(); + } + return null; + }).get(); + userMountingBackends = userMountingBackends.concat(deprecatedBackends); + OC.AppConfig.setValue('files_external', 'user_mounting_backends', userMountingBackends.join()); OC.msg.finishedSaving('#userMountingMsg', {status: 'success', data: {message: t('files_external', 'Saved')}}); |