diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-10-14 19:19:16 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-10-14 19:19:16 +0200 |
commit | 5e4eda1ae0ea0ee7e690fee1017dae873a1a7512 (patch) | |
tree | 82da6da8c61c74922451ff23e93f8b398cb1cbc6 /apps/files/js/fileactions.js | |
parent | b076e3a17da1bb3f418af366f78e397fe3cc9b79 (diff) | |
download | nextcloud-server-5e4eda1ae0ea0ee7e690fee1017dae873a1a7512.tar.gz nextcloud-server-5e4eda1ae0ea0ee7e690fee1017dae873a1a7512.zip |
Remove deprecated legacy file actions
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/files/js/fileactions.js')
-rw-r--r-- | apps/files/js/fileactions.js | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 1399f24a3cc..d800f2b8eb5 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -409,8 +409,6 @@ var fileName = $file.attr('data-file'); context.fileActions.currentFile = currentFile; - // also set on global object for legacy apps - window.FileActions.currentFile = currentFile; var callContext = _.extend({}, context); @@ -480,8 +478,6 @@ var fileName = fileInfoModel.get('name'); this.currentFile = fileName; - // also set on global object for legacy apps - window.FileActions.currentFile = fileName; if (fileList) { // compatibility with action handlers that expect these @@ -659,7 +655,7 @@ if (type === OC.dialogs.FILEPICKER_TYPE_MOVE) { context.fileList.move(filename, targetPath, false, context.dir); } - context.fileList.dirInfo.dirLastCopiedTo = targetPath; + context.fileList.dirInfo.dirLastCopiedTo = targetPath; }, false, "httpd/unix-directory", true, actions, dialogDir); } }); @@ -814,25 +810,4 @@ // global file actions to be used by all lists OCA.Files.fileActions = new OCA.Files.FileActions(); - OCA.Files.legacyFileActions = new OCA.Files.FileActions(); - - // for backward compatibility - // - // legacy apps are expecting a stateful global FileActions object to register - // their actions on. Since legacy apps are very likely to break with other - // FileList views than the main one ("All files"), actions registered - // through window.FileActions will be limited to the main file list. - // @deprecated use OCA.Files.FileActions instead - window.FileActions = OCA.Files.legacyFileActions; - window.FileActions.register = function (mime, name, permissions, icon, action, displayName) { - console.warn('FileActions.register() is deprecated, please use OCA.Files.fileActions.register() instead', arguments); - OCA.Files.FileActions.prototype.register.call( - window.FileActions, mime, name, permissions, icon, action, displayName - ); - }; - window.FileActions.display = function (parent, triggerEvent, fileList) { - fileList = fileList || OCA.Files.App.fileList; - console.warn('FileActions.display() is deprecated, please use OCA.Files.fileActions.register() which automatically redisplays actions', mime, name); - OCA.Files.FileActions.prototype.display.call(window.FileActions, parent, triggerEvent, fileList); - }; })(); |