diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-08-05 12:48:42 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-08-10 14:12:34 +0200 |
commit | 9454e9043a7b18108f14a00d6ab8afa62fb894af (patch) | |
tree | 8458931b8d187f1378baf65058679f7993943011 /apps/files/js/fileactions.js | |
parent | dd4e0a8253d108e8b9cf9444990164d66b3d75f0 (diff) | |
download | nextcloud-server-9454e9043a7b18108f14a00d6ab8afa62fb894af.tar.gz nextcloud-server-9454e9043a7b18108f14a00d6ab8afa62fb894af.zip |
Updated unit tests for file actions and actions menu
Diffstat (limited to 'apps/files/js/fileactions.js')
-rw-r--r-- | apps/files/js/fileactions.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 6b95e3ee6cd..0d9161c6eb4 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -332,10 +332,8 @@ * @param {OCA.Files.FileActionContext} context rendering context */ _showMenu: function(fileName, context) { - var $actionEl = context.$file.find('.action-menu'); - this._menu = new OCA.Files.FileActionsMenu(); - this._menu.showAt($actionEl, context); + this._menu.showAt(context); }, /** @@ -433,7 +431,7 @@ nameLinks = parent.children('a.name'); nameLinks.find('.fileactions, .nametext .action').remove(); nameLinks.append('<span class="fileactions" />'); - var defaultAction = this.getDefault( + var defaultAction = this.getDefaultFileAction( this.getCurrentMimeType(), this.getCurrentType(), this.getCurrentPermissions() @@ -449,7 +447,7 @@ if (actionSpec.type === FileActions.TYPE_INLINE) { self._renderInlineAction( actionSpec, - actionSpec.action === defaultAction, + defaultAction && actionSpec.name === defaultAction.name, context ); } |