[BUGFIX] Fix deleting file from context menu 68/51768/2
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Mon, 20 Feb 2017 11:15:13 +0000 (12:15 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 20 Feb 2017 14:02:37 +0000 (15:02 +0100)
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>
typo3/sysext/filelist/Resources/Public/JavaScript/ContextMenuActions.js

index 785cc3b..1cf2586 100644 (file)
@@ -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'),