Follow-up Ib7e769e: Fix typos in static method calls

Also move desktop-only methods to DesktopArticleTarget.

Bug: T193217
Change-Id: Icc2bb6602a62057da9f841793d8fe06d9814230e
This commit is contained in:
Ed Sanders 2018-04-30 11:05:43 +01:00
parent 4c3cdc5bf7
commit f8cebb8f51
2 changed files with 13 additions and 24 deletions

View file

@ -1673,12 +1673,24 @@ ve.init.mw.DesktopArticleTarget.prototype.resetDocumentOpacity = function () {
this.getSurface().getView().getDocument().getDocumentNode().$element.css( 'opacity', 1 );
};
/**
* Set temporary redirect interface to match the current state of redirection in the editor.
*
* @param {string|null} title Current redirect target, or null if none
*/
ve.init.mw.DesktopArticleTarget.prototype.setFakeRedirectInterface = function ( title ) {
this.updateRedirectInterface(
title ? this.constructor.static.buildRedirectSub() : $(),
title ? this.constructor.static.buildRedirectMsg( title ) : $()
);
};
/**
* Set the redirect interface to match the page's redirect state.
*/
ve.init.mw.DesktopArticleTarget.prototype.setRealRedirectInterface = function () {
this.updateRedirectInterface(
mw.config.get( 'wgIsRedirect' ) ? this.buildRedirectSub() : $(),
mw.config.get( 'wgIsRedirect' ) ? this.constructor.static.buildRedirectSub() : $(),
// Remove our custom content header - the original one in #mw-content-text will be shown
$()
);

View file

@ -2581,26 +2581,3 @@ ve.init.mw.ArticleTarget.prototype.updateRedirectInterface = function ( $sub, $m
$( '#mw-content-text' ).before( $msg );
}
};
/**
* Set temporary redirect interface to match the current state of redirection in the editor.
*
* @param {string|null} title Current redirect target, or null if none
*/
ve.init.mw.ArticleTarget.prototype.setFakeRedirectInterface = function ( title ) {
this.updateRedirectInterface(
title ? this.constructor.static.buildRedirectSub() : $(),
title ? this.constructor.static.buildRedirectMsg( title ) : $()
);
};
/**
* Set the redirect interface to match the page's redirect state.
*/
ve.init.mw.ArticleTarget.prototype.setRealRedirectInterface = function () {
this.updateRedirectInterface(
mw.config.get( 'wgIsRedirect' ) ? this.buildRedirectSub() : $(),
// Remove our custom content header - the original one in #mw-content-text will be shown
$()
);
};