From: Matthias Schmidt Date: Mon, 21 Dec 2015 13:58:53 +0000 (+0100) Subject: Fix clipboard without markAll element X-Git-Tag: 3.0.0_Beta_1~2086 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=15e2790428b9dfdb697d4b045c6e47110c7fc882;p=GitHub%2FWoltLab%2FWCF.git Fix clipboard without markAll element --- 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; + } } };