Clipboard now marks 'mark all' as active
authorAlexander Ebert <ebert@woltlab.com>
Thu, 14 Jul 2016 15:00:28 +0000 (17:00 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 14 Jul 2016 15:00:28 +0000 (17:00 +0200)
wcfsetup/install/files/js/WoltLab/WCF/Controller/Clipboard.js

index 290ae7a13ef4b94628715cf39a2e5909f2f83984..41d2073727f671694ec64e1fbc05cf49a61fc224 100644 (file)
@@ -537,6 +537,18 @@ define(
                        
                        if (data.markAll !== null) {
                                data.markAll.checked = markAll;
+                               
+                               var parent = data.markAll;
+                               while (parent = parent.parentNode) {
+                                       if (parent.classList.contains('columnMark')) {
+                                               parent = parent.parentNode;
+                                               break;
+                                       }
+                               }
+                               
+                               if (parent) {
+                                       parent.classList[(markAll ? 'add' : 'remove')]('jsMarked');
+                               }
                        }
                }
        };