From 0ff6f6df6f829f416f901518ef0e46fe618daf48 Mon Sep 17 00:00:00 2001
From: Tymoteusz Motylewski <t.motylewski@gmail.com>
Date: Mon, 20 Feb 2017 12:15:13 +0100
Subject: [PATCH] [BUGFIX] Fix deleting file from context menu

Since context menu refactoring the file deletion
did not work.
This patch fixes the issue, by adding missing line in JS.

Resolves: #79916
Releases: master
Change-Id: I939f153aa1d5eae22f821ede98329774e63a3757
Reviewed-on: https://review.typo3.org/51768
Reviewed-by: Malte Koitka <malte@cytrus.de>
Tested-by: Malte Koitka <malte@cytrus.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
---
 .../Resources/Public/JavaScript/ContextMenuActions.js    | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/typo3/sysext/filelist/Resources/Public/JavaScript/ContextMenuActions.js b/typo3/sysext/filelist/Resources/Public/JavaScript/ContextMenuActions.js
index 785cc3b65e9d..1cf258657ba8 100644
--- a/typo3/sysext/filelist/Resources/Public/JavaScript/ContextMenuActions.js
+++ b/typo3/sysext/filelist/Resources/Public/JavaScript/ContextMenuActions.js
@@ -68,13 +68,7 @@ define(['jquery', 'TYPO3/CMS/Backend/Modal', 'TYPO3/CMS/Backend/Severity'], func
     };
 
     ContextMenuActions.deleteFile = function (table, uid) {
-        top.TYPO3.Backend.ContentContainer.setUrl(
-            top.TYPO3.settings.FileCommit.moduleUrl + '&file[delete][0][data]=' + top.rawurlencode(uid) + '&redirect=' + ContextMenuActions.getReturnUrl()
-        );
-    };
-
-    ContextMenuActions.deleteFile = function (table, uid) {
-        var title = $anchorElement.data('title');
+        var $anchorElement = $(this);
         var performDelete = function () {
             top.TYPO3.Backend.ContentContainer.setUrl(
                 top.TYPO3.settings.FileCommit.moduleUrl + '&file[delete][0][data]=' + top.rawurlencode(uid) + '&redirect=' + ContextMenuActions.getReturnUrl()
@@ -85,7 +79,6 @@ define(['jquery', 'TYPO3/CMS/Backend/Modal', 'TYPO3/CMS/Backend/Severity'], func
             return;
         }
 
-        var $anchorElement = $(this);
         var $modal = Modal.confirm(
             $anchorElement.data('title'),
             $anchorElement.data('message'),
-- 
GitLab