jenkins-bot has submitted this change and it was merged.

Change subject: Return watch list star to search results
......................................................................


Return watch list star to search results

Change-Id: Ia4cf3b74694f6e0f43dc80fcfc30cac197827478
---
M includes/Resources.php
M javascripts/modules/mf-watchstar.js
M javascripts/modules/search-2.js
M templates/overlays/search/results.html
4 files changed, 6 insertions(+), 5 deletions(-)

Approvals:
  Jdlrobson: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Resources.php b/includes/Resources.php
index 61fce7a..39028b9 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -420,10 +420,10 @@
                        'javascripts/modules/mf-toggle.js',
                        'javascripts/modules/mf-cleanuptemplates.js',
                        'javascripts/modules/mf-last-modified.js',
-                       'javascripts/modules/mf-watchstar.js',
                        'javascripts/modules/mf-photo.js',
                        'javascripts/modules/mainmenutweaks.js',
                        'javascripts/modules/search-2.js',
+                       'javascripts/modules/mf-watchstar.js',
                        'javascripts/modules/mf-references.js'
                ),
                'messages' => array(
diff --git a/javascripts/modules/mf-watchstar.js 
b/javascripts/modules/mf-watchstar.js
index bb5c1e0..538a12c 100644
--- a/javascripts/modules/mf-watchstar.js
+++ b/javascripts/modules/mf-watchstar.js
@@ -2,6 +2,7 @@
 
 var api = M.require( 'api' ), w = ( function() {
        var popup = M.require( 'notifications' ),
+               searchOverlay = M.require( 'search' ).overlay,
                CtaDrawer = M.require( 'CtaDrawer' ),
                drawer = new CtaDrawer( {
                        content: mw.msg( 'mobile-frontend-watchlist-cta' ),
@@ -219,8 +220,8 @@
        }
 
        function upgradeUI() {
-               M.on( 'search-results', function( $ul ) {
-                       initWatchListIconList( $ul );
+               searchOverlay.on( 'write-results', function() {
+                       initWatchListIconList( searchOverlay.$( 'ul' ) );
                } );
        }
 
diff --git a/javascripts/modules/search-2.js b/javascripts/modules/search-2.js
index 5d0c2c6..4c57b31 100644
--- a/javascripts/modules/search-2.js
+++ b/javascripts/modules/search-2.js
@@ -76,7 +76,7 @@
                } else {
                        this.$( '.no-results' ).remove();
                }
-               this.emit( 'write-results', this );
+               this.emit( 'write-results' );
        },
        performSearch: function() {
                var self = this,
diff --git a/templates/overlays/search/results.html 
b/templates/overlays/search/results.html
index 71e241f..ddef183 100644
--- a/templates/overlays/search/results.html
+++ b/templates/overlays/search/results.html
@@ -1,6 +1,6 @@
 <li class="no-results">{{noresults}}</li>
 {{#results}}
-       <li>
+       <li title="{{title}}">
                <a href="{{url}}" title="{{title}}">{{{label}}}</a>
        </li>
 {{/results}}

-- 
To view, visit https://gerrit.wikimedia.org/r/67340
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia4cf3b74694f6e0f43dc80fcfc30cac197827478
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: JGonera <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to