Don't strip namespace from text that we replace firstHeading with

wgTitle is basically just $title->getText()
wgPageName is $title->getPrefixedDBkey()

So we need to take wgPageName and run getPrefixedText (difference is underscores
get replaced by spaces)

Change-Id: Ib99f0d20f1ba99338f80bbbf39cffd544887c3fa
This commit is contained in:
Alex Monk 2016-03-25 04:43:41 +00:00
parent 3028f4f2d6
commit b1aebf0b48

View file

@ -297,7 +297,9 @@ ve.init.mw.DesktopArticleTarget.prototype.loadSuccess = function ( response ) {
this.checkboxesByName = {};
this.$otherFields = $( [] );
if ( [ 'edit', 'submit' ].indexOf( mw.util.getParamValue( 'action' ) ) !== -1 ) {
$( '#content #firstHeading' ).text( mw.config.get( 'wgTitle' ) );
$( '#content #firstHeading' ).text(
mw.Title.newFromText( mw.config.get( 'wgPageName' ) ).getPrefixedText()
);
}
if ( data.checkboxes ) {