diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-05-20 16:01:34 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-05-30 10:06:29 +0200 |
commit | ef59c69dc822c9ff69c564c41e0dfdce142b9cdf (patch) | |
tree | a99667ab22daba65cbbd77ac591fccac234f06eb /apps/files/tests/js/fileactionsSpec.js | |
parent | fa32243d84e1801c379a5e8956ba2f3de236c718 (diff) | |
download | nextcloud-server-ef59c69dc822c9ff69c564c41e0dfdce142b9cdf.tar.gz nextcloud-server-ef59c69dc822c9ff69c564c41e0dfdce142b9cdf.zip |
Distinguish legacy file actions from regular file actions
Legacy file actions are registered by legacy apps through
window.FileActions.register(). These actions can only be used by the
main file list ("all files") because legacy apps can only deal with a
single list / container.
New file actions of compatible apps must be registered through
OCA.Files.fileActions. These will be used for other lists like the
sharing overview.
Fixed versions and sharing actions to use OCA.Files.fileActions, which
makes them available in the sharing overview list.
Diffstat (limited to 'apps/files/tests/js/fileactionsSpec.js')
-rw-r--r-- | apps/files/tests/js/fileactionsSpec.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files/tests/js/fileactionsSpec.js b/apps/files/tests/js/fileactionsSpec.js index edd7e343884..fa634da08a2 100644 --- a/apps/files/tests/js/fileactionsSpec.js +++ b/apps/files/tests/js/fileactionsSpec.js @@ -21,7 +21,7 @@ describe('OCA.Files.FileActions tests', function() { var $filesTable, fileList; - var FileActions = OCA.Files.FileActions; + var FileActions; beforeEach(function() { // init horrible parameters @@ -31,10 +31,11 @@ describe('OCA.Files.FileActions tests', function() { // dummy files table $filesTable = $body.append('<table id="filestable"></table>'); fileList = new OCA.Files.FileList($('#testArea')); - FileActions.registerDefaultActions(fileList); + FileActions = new OCA.Files.FileActions(); + FileActions.registerDefaultActions(); }); afterEach(function() { - FileActions.clear(); + FileActions = null; fileList = undefined; $('#dir, #permissions, #filestable').remove(); }); |