[BUGFIX] Respect "recursive" flag when restoring records in recycler 47/55947/2
authorBenjamin Kluge <b.kluge@neusta.de>
Wed, 28 Feb 2018 19:00:29 +0000 (20:00 +0100)
committerFrank Naegler <frank.naegler@typo3.org>
Thu, 1 Mar 2018 11:24:39 +0000 (12:24 +0100)
Resolves: #81214
Releases: master, 8.7
Change-Id: I45129dd0ff91fc339f520e8e5d9a65ece4a701a8
Reviewed-on: https://review.typo3.org/55947
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/recycler/Resources/Public/JavaScript/Recycler.js

index 73b5788..1128c58 100644 (file)
@@ -441,7 +441,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);
         }
       }
     ]);
@@ -452,8 +452,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: ''
@@ -461,7 +462,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';