Commit 70906f43 authored by Josef Glatz's avatar Josef Glatz Committed by Christian Kuhn
Browse files

[BUGFIX] Recycler: disable mass delete/recover if no record is selected

This patch really disables the mass delete/recover button
functionality of the recycler.

Resolves: #85680
Releases: master, 8.7
Change-Id: I5a6ba4f555cc06b017f3d9ff8deef7d7deac03db
Reviewed-on: https://review.typo3.org/57721


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarJan Stockfisch <jan.stockfisch@googlemail.com>
Tested-by: default avatarJan Stockfisch <jan.stockfisch@googlemail.com>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 8c4abd65
......@@ -45,14 +45,14 @@
</table>
</div>
<div>
<button class="btn btn-default disabled" data-action="massundo">
<button class="btn btn-default disabled" data-action="massundo" disabled>
<core:icon identifier="actions-edit-undo" />
<span class="text">
<f:translate key="button.undo" />
</span>
</button>
<f:if condition="{allowDelete}">
<button class="btn btn-default disabled" data-action="massdelete">
<button class="btn btn-default disabled" data-action="massdelete" disabled>
<core:icon identifier="actions-edit-delete" />
<span class="text">
<f:translate key="button.delete" />
......
......@@ -240,10 +240,10 @@ define(['jquery',
if (Recycler.markedRecordsForMassAction.length > 0) {
if (Recycler.elements.$massUndo.hasClass('disabled')) {
Recycler.elements.$massUndo.removeClass('disabled');
Recycler.elements.$massUndo.removeClass('disabled').removeAttr('disabled');
}
if (Recycler.elements.$massDelete.hasClass('disabled')) {
Recycler.elements.$massDelete.removeClass('disabled');
Recycler.elements.$massDelete.removeClass('disabled').removeAttr('disabled');
}
var btnTextUndo = Recycler.createMessage(TYPO3.lang['button.undoselected'], [Recycler.markedRecordsForMassAction.length]),
......@@ -262,9 +262,9 @@ define(['jquery',
*/
Recycler.resetMassActionButtons = function() {
Recycler.markedRecordsForMassAction = [];
Recycler.elements.$massUndo.addClass('disabled');
Recycler.elements.$massUndo.addClass('disabled').attr('disabled', true);
Recycler.elements.$massUndo.find('span.text').text(TYPO3.lang['button.undo']);
Recycler.elements.$massDelete.addClass('disabled');
Recycler.elements.$massDelete.addClass('disabled').attr('disabled', true);
Recycler.elements.$massDelete.find('span.text').text(TYPO3.lang['button.delete']);
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment