mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 00:00:49 +00:00
Merge "Remove unused getCurrentPageName method from two-pane layout"
This commit is contained in:
commit
c2d867d348
|
@ -117,15 +117,14 @@ ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.onStackLayoutFocus = function
|
||||||
/**
|
/**
|
||||||
* Focus the input field for the current page.
|
* Focus the input field for the current page.
|
||||||
*
|
*
|
||||||
* If no page is selected, the first selectable page will be selected.
|
|
||||||
* If the focus is already in an element on the current page, nothing will happen.
|
* If the focus is already in an element on the current page, nothing will happen.
|
||||||
*/
|
*/
|
||||||
ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.focus = function () {
|
ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.focus = function () {
|
||||||
var page = this.pages[ this.currentPageName ];
|
var page = this.pages[ this.currentPageName ];
|
||||||
|
|
||||||
if ( !page ) {
|
if ( !page ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only change the focus if it's visible and is not already the current page
|
// Only change the focus if it's visible and is not already the current page
|
||||||
if ( page.$element[ 0 ].offsetParent !== null &&
|
if ( page.$element[ 0 ].offsetParent !== null &&
|
||||||
!OO.ui.contains( page.$element[ 0 ], this.getElementDocument().activeElement, true )
|
!OO.ui.contains( page.$element[ 0 ], this.getElementDocument().activeElement, true )
|
||||||
|
@ -226,15 +225,7 @@ ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.getPage = function ( name ) {
|
||||||
* @return {OO.ui.PageLayout|undefined} Current page, if found
|
* @return {OO.ui.PageLayout|undefined} Current page, if found
|
||||||
*/
|
*/
|
||||||
ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.getCurrentPage = function () {
|
ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.getCurrentPage = function () {
|
||||||
var name = this.getCurrentPageName();
|
return this.pages[ this.currentPageName ];
|
||||||
return name ? this.getPage( name ) : undefined;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return {string|null} Symbolic name of the current page
|
|
||||||
*/
|
|
||||||
ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.getCurrentPageName = function () {
|
|
||||||
return this.currentPageName;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue