mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-28 17:30:40 +00:00
Merge "Use TabPanelLayout instead of the deprecated CardLayout"
This commit is contained in:
commit
91fa3002a5
|
@ -55,34 +55,34 @@ ve.ui.MWLatexDialog.static.setSymbols = function ( symbols ) {
|
|||
*/
|
||||
ve.ui.MWLatexDialog.prototype.initialize = function () {
|
||||
var formulaPanel, inputField, displayField, idField, category,
|
||||
formulaCard, optionsCard,
|
||||
formulaTabPanel, optionsTabPanel,
|
||||
dialog = this;
|
||||
|
||||
// Parent method
|
||||
ve.ui.MWLatexDialog.super.prototype.initialize.call( this );
|
||||
|
||||
// Layout for the formula inserter (formula card) and options form (options card)
|
||||
// Layout for the formula inserter (formula tab panel) and options form (options tab panel)
|
||||
this.indexLayout = new OO.ui.IndexLayout( {
|
||||
scrollable: false,
|
||||
expanded: true
|
||||
} );
|
||||
|
||||
formulaCard = new OO.ui.CardLayout( 'formula', {
|
||||
formulaTabPanel = new OO.ui.TabPanelLayout( 'formula', {
|
||||
label: ve.msg( 'math-visualeditor-mwlatexdialog-card-formula' ),
|
||||
expandable: false,
|
||||
scrollable: false,
|
||||
padded: true
|
||||
} );
|
||||
optionsCard = new OO.ui.CardLayout( 'options', {
|
||||
optionsTabPanel = new OO.ui.TabPanelLayout( 'options', {
|
||||
label: ve.msg( 'math-visualeditor-mwlatexdialog-card-options' ),
|
||||
expandable: false,
|
||||
scrollable: false,
|
||||
padded: true
|
||||
} );
|
||||
|
||||
this.indexLayout.addCards( [
|
||||
formulaCard,
|
||||
optionsCard
|
||||
this.indexLayout.addTabPanels( [
|
||||
formulaTabPanel,
|
||||
optionsTabPanel
|
||||
] );
|
||||
|
||||
// Layout for symbol picker (menu) and input and preview (content)
|
||||
|
@ -180,10 +180,10 @@ ve.ui.MWLatexDialog.prototype.initialize = function () {
|
|||
)
|
||||
);
|
||||
|
||||
formulaCard.$element.append(
|
||||
formulaTabPanel.$element.append(
|
||||
dialog.menuLayout.$element
|
||||
);
|
||||
optionsCard.$element.append(
|
||||
optionsTabPanel.$element.append(
|
||||
displayField.$element,
|
||||
idField.$element
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue