diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-08-15 09:39:12 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-08-15 09:39:12 +0200 |
commit | b082278f0404efc65b72d7cf0516d2de52f1393b (patch) | |
tree | aa59517f9bc91dd03f65ce9a5079fabf9b5ab1b3 /apps/files/js/fileactions.js | |
parent | 62a9ec12bc1b2114f8566b1f2fc89d01d40b5e66 (diff) | |
download | nextcloud-server-b082278f0404efc65b72d7cf0516d2de52f1393b.tar.gz nextcloud-server-b082278f0404efc65b72d7cf0516d2de52f1393b.zip |
Do not show action menu if no actions are available
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/js/fileactions.js')
-rw-r--r-- | apps/files/js/fileactions.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 3623663ed6c..ac3afba038d 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -558,7 +558,13 @@ } }); - this._renderMenuTrigger($tr, context); + var menuActions = Object.values(this.actions.all).filter(function (action) { + return action.type !== OCA.Files.FileActions.TYPE_INLINE; + }); + // do not render the menu if nothing is in it + if (menuActions.length > 0) { + this._renderMenuTrigger($tr, context); + } if (triggerEvent){ fileList.$fileList.trigger(jQuery.Event("fileActionsReady", {fileList: fileList, $files: $tr})); |