mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +00:00
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:
parent
4c3cdc5bf7
commit
f8cebb8f51
|
@ -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
|
||||
$()
|
||||
);
|
||||
|
|
|
@ -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
|
||||
$()
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue