diff options
author | Björn Schießle <schiessle@owncloud.com> | 2014-07-14 11:50:19 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2014-07-14 11:50:19 +0200 |
commit | 45c3a948b9754e18634eef0c9682c145c124c650 (patch) | |
tree | 1a04c4f127d62661263b7d12485ad24fc00d47c3 /apps/files/js | |
parent | 8cad574379c6c5a1127f7f540b5cf5b4aec06600 (diff) | |
parent | dd7529da9853dff43b8e81685f3a1c7151bc9e24 (diff) | |
download | nextcloud-server-45c3a948b9754e18634eef0c9682c145c124c650.tar.gz nextcloud-server-45c3a948b9754e18634eef0c9682c145c124c650.zip |
Merge pull request #9572 from owncloud/deleteunsharetooltip
mountType attribute + delete hint fix
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/fileactions.js | 16 | ||||
-rw-r--r-- | apps/files/js/filelist.js | 4 |
2 files changed, 15 insertions, 5 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index fd038765ea5..4aefd61a19a 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -291,14 +291,20 @@ if (actions['Delete']) { var img = self.icons['Delete']; var html; + var mountType = $tr.attr('data-mounttype'); + var deleteTitle = t('files', 'Delete'); + if (mountType === 'external-root') { + deleteTitle = t('files', 'Disconnect storage'); + } else if (mountType === 'shared-root') { + deleteTitle = t('files', 'Unshare'); + } else if (fileList.id === 'trashbin') { + deleteTitle = t('files', 'Delete permanently'); + } + if (img.call) { img = img(file); } - if (typeof trashBinApp !== 'undefined' && trashBinApp) { - html = '<a href="#" original-title="' + t('files', 'Delete permanently') + '" class="action delete delete-icon" />'; - } else { - html = '<a href="#" original-title="' + t('files', 'Delete') + '" class="action delete delete-icon" />'; - } + html = '<a href="#" original-title="' + escapeHTML(deleteTitle) + '" class="action delete delete-icon" />'; var element = $(html); element.data('action', actions['Delete']); element.on('click', {a: null, elem: parent, actionFunc: actions['Delete'].action}, actionHandler); diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 96436d33a2c..61e73b7bebc 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -600,6 +600,10 @@ "data-permissions": fileData.permissions || this.getDirectoryPermissions() }); + if (fileData.mountType) { + tr.attr('data-mounttype', fileData.mountType); + } + if (!_.isUndefined(path)) { tr.attr('data-path', path); } |