MediaWiki

Difference between revisions of "LexemeQueriesGenerator.js"

Line 1: Line 1:
 
alert("OOUI is on!")
 
alert("OOUI is on!")
 +
console.log("User:Yug/MediaWiki:OOUI.js script loaded/ran");
 
// An example of a fieldset with horizontal layout.
 
// An example of a fieldset with horizontal layout.
 
var fieldset = new OO.ui.FieldsetLayout( {
 
var fieldset = new OO.ui.FieldsetLayout( {

Revision as of 10:10, 14 December 2021

alert("OOUI is on!")
console.log("User:Yug/MediaWiki:OOUI.js script loaded/ran");
// An example of a fieldset with horizontal layout.
var fieldset = new OO.ui.FieldsetLayout( {
		label: 'HorizontalLayout'
	} );

// Add an horizontal field layout
fieldset.addItems( [ 
	new OO.ui.FieldLayout(
		new OO.ui.Widget( {
			content: [ new OO.ui.HorizontalLayout( {
				items: [
					new OO.ui.ButtonWidget( { label: 'Button' } ),
					new OO.ui.ButtonGroupWidget( { items: [
						new OO.ui.ToggleButtonWidget( { label: 'A' } ),
						new OO.ui.ToggleButtonWidget( { label: 'B' } )
					] } ),
					new OO.ui.ButtonInputWidget( { label: 'ButtonInput' } ),
					new OO.ui.TextInputWidget( { value: 'TextInput' } ),
					new OO.ui.CheckboxInputWidget( { selected: true } ),
					new OO.ui.RadioInputWidget( { selected: true } ),
					new OO.ui.LabelWidget( { label: 'Label' } )
				]
			} ) ]
		} ),
		{
			label: 'Multiple widgets shown as a single line, ' +
				'as used in compact forms or in parts of a bigger widget.',
			align: 'top'
		}
	)
] );

$( "#qglexems" ).append( fieldset.$element );