[BUGFIX] recycler ignored recursive flag 27/55027/2
authorBenjamin Kluge <b.kluge@neusta.de>
Mon, 11 Dec 2017 11:16:37 +0000 (12:16 +0100)
committerSusanne Moog <susanne.moog@typo3.org>
Tue, 12 Dec 2017 10:29:32 +0000 (11:29 +0100)
The recycler checkbox "Recover content and subpages recursively" has no functionality.

Resolves: #81214
Releases: master
Change-Id: I45129dd0ff91fc339f520e8e5d9a65ece4a701a8
Reviewed-on: https://review.typo3.org/55027
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/recycler/Resources/Public/JavaScript/Recycler.js

index be6021c..7d3336a 100644 (file)
@@ -438,7 +438,7 @@ define(['jquery',
                                text: TYPO3.lang['button.undo'],
                                btnClass: 'btn-success',
                                trigger: function() {
-                                       Recycler.callAjaxAction('undo', typeof records === 'object' ? records : [records], isMassUndo);
+                                       Recycler.callAjaxAction('undo', typeof records === 'object' ? records : [records], isMassUndo, $message.find('#undo-recursive').prop('checked') ? 1 : 0);
                                }
                        }
                ]);
@@ -449,8 +449,9 @@ define(['jquery',
         * @param {String} action
         * @param {Object} records
         * @param {Boolean} isMassAction
+        * @param {Boolean} recursive
         */
-       Recycler.callAjaxAction = function(action, records, isMassAction) {
+       Recycler.callAjaxAction = function(action, records, isMassAction, recursive) {
                var data = {
                                records: records,
                                action: ''
@@ -458,7 +459,7 @@ define(['jquery',
                        reloadPageTree = false;
                if (action === 'undo') {
                        data.action = 'undoRecords';
-                       data.recursive = $('#undo-recursive').prop('checked')  ? 1 : 0;
+                       data.recursive = recursive ? 1 : 0;
                        reloadPageTree = true;
                } else if (action === 'delete') {
                        data.action = 'deleteRecords';