From 15e2790428b9dfdb697d4b045c6e47110c7fc882 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Mon, 21 Dec 2015 14:58:53 +0100 Subject: [PATCH] Fix clipboard without markAll element --- .../js/WoltLab/WCF/Controller/Clipboard.js | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Controller/Clipboard.js b/wcfsetup/install/files/js/WoltLab/WCF/Controller/Clipboard.js index 3e9782b55d..24117fef65 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Controller/Clipboard.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Controller/Clipboard.js @@ -216,17 +216,19 @@ define( data.markedObjectIds[(isMarked ? 'add' : 'delete')](objectId); clipboardObject.classList[(isMarked) ? 'add' : 'remove']('jsMarked'); - var markedAll = true; - for (var i = 0, length = data.checkboxes.length; i < length; i++) { - if (!data.checkboxes[i].checked) { - markedAll = false; - - break; + if (data.markAll !== null) { + var markedAll = true; + for (var i = 0, length = data.checkboxes.length; i < length; i++) { + if (!data.checkboxes[i].checked) { + markedAll = false; + + break; + } } + + data.markAll.checked = markedAll; } - data.markAll.checked = markedAll; - this._saveState(type, [ objectId ], isMarked); }, @@ -545,7 +547,9 @@ define( clipboardObject.classList[(isMarked ? 'add' : 'remove')]('jsMarked'); } - data.markAll.checked = markAll; + if (data.markAll !== null) { + data.markAll.checked = markAll; + } } }; -- 2.20.1