User:FlyingRagnar/timeless.js: Difference between revisions
Jump to navigation
Jump to search
FlyingRagnar (talk | contribs) No edit summary |
FlyingRagnar (talk | contribs) No edit summary |
||
| Line 9: | Line 9: | ||
$( '#mw-content-text' ).append( button.$element ); | $( '#mw-content-text' ).append( button.$element ); | ||
} ); | } ); | ||
new OO.ui.FieldLayout( new OO.ui.Widget( { | |||
content: [ | |||
new OO.ui.PanelLayout( { | |||
expanded: false, | |||
framed: true, | |||
content: [ | |||
new OO.ui.IndexLayout( { | |||
expanded: false | |||
} ) | |||
] | |||
} ) | |||
] | |||
} ), { | |||
align: 'top', | |||
label: 'IndexLayout (framed)' | |||
} ) | |||
} ); | } ); | ||
Revision as of 19:23, 28 May 2020
mw.loader.using( 'oojs-ui-core','oojs-ui-widgets' ).done( function () {
$( function () {
var button = new OO.ui.ButtonWidget( {
label: 'Click me!'
} );
button.on( 'click', function () {
alert( 'You clicked the button!' );
} );
$( '#mw-content-text' ).append( button.$element );
} );
new OO.ui.FieldLayout( new OO.ui.Widget( {
content: [
new OO.ui.PanelLayout( {
expanded: false,
framed: true,
content: [
new OO.ui.IndexLayout( {
expanded: false
} )
]
} )
]
} ), {
align: 'top',
label: 'IndexLayout (framed)'
} )
} );