Merge "Give redirects a sort index in title widget"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 2 May 2016 15:26:54 +0000 (15:26 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 2 May 2016 15:26:54 +0000 (15:26 +0000)
resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js

index 3d97711..fdd4a8a 100644 (file)
                                disambiguation: OO.getProp( suggestionPage, 'pageprops', 'disambiguation' ) !== undefined,
                                imageUrl: OO.getProp( suggestionPage, 'thumbnail', 'source' ),
                                description: OO.getProp( suggestionPage, 'terms', 'description' ),
-                               // sort index
+                               // Sort index
                                index: suggestionPage.index
                        };
 
                                        missing: false,
                                        redirect: true,
                                        disambiguation: false,
-                                       description: mw.msg( 'mw-widgets-titleinput-description-redirect', suggestionPage.title )
+                                       description: mw.msg( 'mw-widgets-titleinput-description-redirect', suggestionPage.title ),
+                                       // Sort index, just below its target
+                                       index: suggestionPage.index + 0.5
                                };
                                titles.push( redirects[ i ] );
                        }