Unified behavior of the notification list and the corresponding menu drop-down
authorAlexander Ebert <ebert@woltlab.com>
Sun, 6 Dec 2020 19:35:08 +0000 (20:35 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 6 Dec 2020 19:35:08 +0000 (20:35 +0100)
wcfsetup/install/files/js/WCF.User.js

index 45c596478796d69f199f7b4772e0ccdabee95b72..c11f7726990981a6b990a08cec9ade673a363a77 100644 (file)
@@ -1795,11 +1795,11 @@ if (COMPILER_TARGET_DEFAULT) {
                                }
                                
                                // work-around for legacy notifications
-                               if (!$item.find('a:not(.notificationItemMarkAsConfirmed)').length) {
-                                       $item.find('.details > p:eq(0)').html(function (index, oldHTML) {
-                                               return '<a href="' + $item.data('link') + '">' + oldHTML + '</a>';
-                                       });
-                               }
+                               var details = item.querySelector('.details > p:first-child');
+                               details.classList.add("pointer");
+                               details.addEventListener('click', function(event) {
+                                       window.location.href = $item.data('link');
+                               });
                        }).bind(this));
                        
                        WCF.DOMNodeInsertedHandler.execute();