Content added Content deleted
mNo edit summary |
(added selectables for song combo) |
||
Line 74: | Line 74: | ||
} ), |
} ), |
||
{ |
{ |
||
label: 'Average song rank', |
label: 'Average song score rank', |
||
align: 'inline' |
align: 'inline' |
||
} |
} |
||
Line 83: | Line 83: | ||
var songComboHardWidget = new OO.ui.FieldLayout( |
var songComboHardWidget = new OO.ui.FieldLayout( |
||
new OO.ui.ButtonSelectWidget( { |
new OO.ui.ButtonSelectWidget( { |
||
items: songComboOptions.map( function( combo ) { |
|||
items: [], |
|||
return new OO.ui.ButtonOptionWidget( { |
|||
data: combo, |
|||
label: combo |
|||
} ); |
|||
} ) |
|||
} ), |
} ), |
||
{ |
{ |
||
label: 'Average song combo (on hard)', |
label: 'Average song combo milestone (on hard)', |
||
align: 'inline' |
align: 'inline' |
||
} |
} |
||
Line 93: | Line 98: | ||
var songComboExpertWidget = new OO.ui.FieldLayout( |
var songComboExpertWidget = new OO.ui.FieldLayout( |
||
new OO.ui.ButtonSelectWidget( { |
new OO.ui.ButtonSelectWidget( { |
||
items: songComboOptions.map( function( combo ) { |
|||
items: [], |
|||
return new OO.ui.ButtonOptionWidget( { |
|||
data: combo, |
|||
label: combo |
|||
} ); |
|||
} ) |
|||
} ), |
} ), |
||
{ |
{ |
||
label: 'Average song combo (on expert)', |
label: 'Average song combo milestone (on expert)', |
||
align: 'inline' |
align: 'inline' |
||
} |
} |
||
Line 103: | Line 113: | ||
var songComboMasterWidget = new OO.ui.FieldLayout( |
var songComboMasterWidget = new OO.ui.FieldLayout( |
||
new OO.ui.ButtonSelectWidget( { |
new OO.ui.ButtonSelectWidget( { |
||
items: songComboOptions.map( function( combo ) { |
|||
items: [], |
|||
return new OO.ui.ButtonOptionWidget( { |
|||
data: combo, |
|||
label: combo |
|||
} ); |
|||
} ) |
|||
} ), |
} ), |
||
{ |
{ |
||
label: 'Average song combo (on master)', |
label: 'Average song combo milestone (on master)', |
||
align: 'inline' |
align: 'inline' |
||
} |
} |
Revision as of 13:30, 24 August 2022
( function ( $, mw ) {
/*
* Date range
*/
var startDateWidget = new OO.ui.FieldLayout(
new mw.widgets.DateInputWidget( {
type: 'date'
} ),
{
label: 'Start date',
align: 'inline',
help: 'test'
}
);
var endDateWidget = new OO.ui.FieldLayout(
new mw.widgets.DateInputWidget( {
type: 'date'
} ),
{
label: 'End date',
align: 'inline'
}
);
var dateFieldset = new OO.ui.FieldsetLayout( {
label: 'Date range',
items: [
startDateWidget,
endDateWidget
]
} );
/*
* Event
*/
var eventTierOptions = [ 'T1-10', 'T20-100', 'T200-500', 'T1000',
'T2000-5000', 'T10000-50000', 'T100000', 'T200000', 'T300000',
'T500000', 'T1000000' ];
var eventTierWidget = new OO.ui.FieldLayout(
new OO.ui.ButtonSelectWidget( {
items: eventTierOptions.map( function( tier ) {
return new OO.ui.ButtonOptionWidget( {
data: tier,
label: tier
} );
} ),
} ),
{
label: 'Average tier',
align: 'inline'
}
);
var eventFieldset = new OO.ui.FieldsetLayout( {
label: 'Events',
items: [
eventTierWidget
]
} );
/*
* Song
*/
var songRankOptions = [ 'S', 'A', 'B', 'C' ];
var songRankWidget = new OO.ui.FieldLayout(
new OO.ui.ButtonSelectWidget( {
items: songRankOptions.map( function( rank ) {
return new OO.ui.ButtonOptionWidget( {
data: rank,
label: rank
} );
} ),
} ),
{
label: 'Average song score rank',
align: 'inline'
}
);
var songComboOptions = [ 'Combo 4 (full combo)', 'Combo 3', 'Combo 2',
'Combo 1' ];
var songComboHardWidget = new OO.ui.FieldLayout(
new OO.ui.ButtonSelectWidget( {
items: songComboOptions.map( function( combo ) {
return new OO.ui.ButtonOptionWidget( {
data: combo,
label: combo
} );
} )
} ),
{
label: 'Average song combo milestone (on hard)',
align: 'inline'
}
);
var songComboExpertWidget = new OO.ui.FieldLayout(
new OO.ui.ButtonSelectWidget( {
items: songComboOptions.map( function( combo ) {
return new OO.ui.ButtonOptionWidget( {
data: combo,
label: combo
} );
} )
} ),
{
label: 'Average song combo milestone (on expert)',
align: 'inline'
}
);
var songComboMasterWidget = new OO.ui.FieldLayout(
new OO.ui.ButtonSelectWidget( {
items: songComboOptions.map( function( combo ) {
return new OO.ui.ButtonOptionWidget( {
data: combo,
label: combo
} );
} )
} ),
{
label: 'Average song combo milestone (on master)',
align: 'inline'
}
);
var songFieldset = new OO.ui.FieldsetLayout( {
label: 'Songs',
items: [
songRankWidget,
songComboHardWidget,
songComboExpertWidget,
songComboMasterWidget
]
} );
/*
* Challenge Stamp
*/
var clStampWidget = new OO.ui.RadioSelectInputWidget( {
options: [
{ data: 'true', label: 'Yes' },
{ data: 'false', label: 'No' }
],
value: 'true'
} );
var clFieldset = new OO.ui.FieldsetLayout( {
label: 'Crystals selected as Challenge Stamp reward?',
items: [
clStampWidget
]
} );
/*
* Everything
*/
var submitButton = new OO.ui.FieldLayout(
new OO.ui.ButtonInputWidget( {
label: 'Calculate',
flags: [ 'primary', 'progressive' ],
align: 'left',
icon: 'mathematics'
} )
);
var fieldset = new OO.ui.FieldsetLayout( {
items: [
dateFieldset,
eventFieldset,
songFieldset,
clFieldset,
submitButton
]
} );
$( '#calculator' ).append( fieldset.$element );
} )( jQuery, mediaWiki );