Give search results a consistent css class to select
authorErik Bernhardson <ebernhardson@wikimedia.org>
Thu, 13 Sep 2018 18:49:59 +0000 (11:49 -0700)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Thu, 13 Sep 2018 18:54:48 +0000 (11:54 -0700)
Results with and without thumbnails only share an li, and that li
cannot be specifically targeted. Add a class to the li so anything
that wants to deal with individual results can target them.

Bug: T189242
Change-Id: I9b19c5e3d7d72d4be3a5ffdf280bf07b870ff3c0

includes/widget/search/FullSearchResultWidget.php

index af1e027..66fc030 100644 (file)
@@ -107,7 +107,7 @@ class FullSearchResultWidget implements SearchResultWidget {
                                "</table>";
                }
 
-               return "<li>{$html}</li>";
+               return "<li class='mw-search-result'>{$html}</li>";
        }
 
        /**