PortableInfoboxBuilder: add support for format (#125)

This commit is contained in:
CosmicAlpha 2024-11-25 14:31:49 -07:00 committed by GitHub
parent 48c4ccdde1
commit ae3099d674
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 0 deletions

View file

@ -96,6 +96,7 @@
"infoboxbuilder-nodeerror-invalidsource",
"infoboxbuilder-nodeerror-nosourceordefault",
"infoboxbuilder-nodeparam-default",
"infoboxbuilder-nodeparam-format",
"infoboxbuilder-nodeparam-label",
"infoboxbuilder-nodeparam-source",
"infoboxbuilder-nodeparam-value",

View file

@ -46,6 +46,7 @@
"infoboxbuilder-nodeerror-invalidsource": "Source parameter is invalid.",
"infoboxbuilder-nodeerror-nosourceordefault": "Element without source parameter or default value won't be displayed.",
"infoboxbuilder-nodeparam-default": "Default value",
"infoboxbuilder-nodeparam-format": "Format",
"infoboxbuilder-nodeparam-label": "Label",
"infoboxbuilder-nodeparam-source": "Source parameter",
"infoboxbuilder-nodeparam-value": "Value",

View file

@ -127,6 +127,10 @@
placeholder: this.msg( 'nodeparam-label' ),
disabled: true
} );
this.nodeInputFormat = new OO.ui.TextInputWidget( {
placeholder: this.msg( 'nodeparam-format' ),
disabled: true
} );
this.nodeInputDefault = new OO.ui.TextInputWidget( {
placeholder: this.msg( 'nodeparam-default' ),
disabled: true
@ -154,6 +158,12 @@
help: this.msg( 'nodeparamhelp-label', [], true ),
disabled: true
} ).$element,
new OO.ui.FieldLayout( this.nodeInputFormat, {
label: this.msg( 'nodeparam-format' ),
align: 'top',
help: this.msg( 'nodeparamhelp-format', [], true ),
disabled: true
} ).$element,
new OO.ui.FieldLayout( this.nodeInputDefault, {
label: this.msg( 'nodeparam-default' ),
align: 'top',
@ -180,6 +190,7 @@
this.toggleNodeMenuWidget( this.nodeInputSource, supports.source, 'source' );
this.toggleNodeMenuWidget( this.nodeInputLabel, supports.label, 'label' );
this.toggleNodeMenuWidget( this.nodeInputFormat, supports.format, 'format' );
this.toggleNodeMenuWidget( this.nodeInputDefault, supports.default, 'default' );
this.toggleNodeMenuWidget( this.nodeInputValue, supports.value, 'value' );
}