MediaWiki

Difference between revisions of "LexemeQueriesGenerator.js"

(Created page with "// An example of a fieldset with horizontal layout. var fieldset = new OO.ui.FieldsetLayout( { label: 'HorizontalLayout' } ); // Add an horizontal field layout fieldset.ad...")
 
Line 1: Line 1:
 +
alert("OOUI is on!")
 
// 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:06, 14 December 2021

alert("OOUI is on!")
// 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 );