diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-08-01 09:19:52 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-08-01 09:41:08 +0200 |
commit | 635575f271d2c481cbe0da9fa4b4d7d3179c024b (patch) | |
tree | 1e2a580e4f43dff19bf78fe92c5a62b91e0a6bf1 /apps/files_external/js | |
parent | 9b46814320e1b62c860a9b241cfbf0d0ddc13b91 (diff) | |
download | nextcloud-server-635575f271d2c481cbe0da9fa4b4d7d3179c024b.tar.gz nextcloud-server-635575f271d2c481cbe0da9fa4b4d7d3179c024b.zip |
files_external: Move delete option to 3-dots menu
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/files_external/js')
-rw-r--r-- | apps/files_external/js/settings.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index 38a77b59a14..b871fe2f743 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -54,6 +54,11 @@ var MOUNT_OPTIONS_DROPDOWN_TEMPLATE = ' <label for="mountOptionsReadOnly">{{t "files_external" "Read only"}}</label>' + ' </span>' + ' </li>' + + ' <li class="optionRow persistent">' + + ' <a href="#" class="menuitem remove icon-delete">' + + ' <span>{{t "files_external" "Delete"}}</span>' + + ' </a>' + + ' </li>' + ' </ul>'+ '</div>'; @@ -584,7 +589,7 @@ MountOptionsDropdown.prototype = { $el.find('.optionRow').each(function(i, row){ var $row = $(row); var optionId = $row.find('input, select').attr('name'); - if (visibleOptions.indexOf(optionId) === -1) { + if (visibleOptions.indexOf(optionId) === -1 && !$row.hasClass('persistent')) { $row.hide(); } else { $row.show(); @@ -734,7 +739,7 @@ MountConfigListView.prototype = _.extend({ self.recheckStorageConfig($(this).closest('tr')); }); - this.$el.on('click', 'td.remove>.icon-delete', function() { + this.$el.on('click', 'td.mountOptionsToggle .icon-delete', function() { self.deleteStorageConfig($(this).closest('tr')); }); @@ -742,7 +747,7 @@ MountConfigListView.prototype = _.extend({ self.saveStorageConfig($(this).closest('tr')); }); - this.$el.on('click', 'td.mountOptionsToggle>.icon-settings-dark', function() { + this.$el.on('click', 'td.mountOptionsToggle>.icon-more', function() { self._showMountOptionsDropdown($(this).closest('tr')); }); @@ -1311,7 +1316,8 @@ MountConfigListView.prototype = _.extend({ 'filesystem_check_changes', 'enable_sharing', 'encoding_compatibility', - 'readonly' + 'readonly', + 'delete' ]; if (this._encryptionEnabled) { visibleOptions.push('encrypt'); |