MediaWiki:Gadget-armory-core.js: Difference between revisions

mNo edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 9: Line 9:
restriction: 'surface',
restriction: 'surface',
augmented: 'any',
augmented: 'any',
hiderecolour: true,
tier_min: 100,
tier_min: 100,
tier_max: 500,
tier_max: 500,
Line 23: Line 22:
restriction: [ 'any', 'surface', 'stories', 'missions', 'encounters', 'outlands', 'events', 'removed' ],
restriction: [ 'any', 'surface', 'stories', 'missions', 'encounters', 'outlands', 'events', 'removed' ],
augmented: [ 'any', 'able', 'yes' ],
augmented: [ 'any', 'able', 'yes' ],
hiderecolour: [ false, true ],
},
},
currentQuery,
currentQuery,
Line 29: Line 27:
loadingGif;
loadingGif;


var form, fieldset, slotDropdown, supporterSelect, tradeableSelect, classSelect, restrictionSelect, augmentedSelect, recolourCheck, tierMinCheck, tierMaxCheck, tierMinSelect, tierMaxSelect, submitButton, resetButton, toggleAdvButton, copyPermalinkButton, pageButtons, pageFirstButton, pagePrevButton, pageNextButton, resultsLabel;
var form, fieldset, slotDropdown, supporterSelect, tradeableSelect, classSelect, restrictionSelect, augmentedSelect, tierMinCheck, tierMaxCheck, tierMinSelect, tierMaxSelect, submitButton, resetButton, toggleAdvButton, copyPermalinkButton, pageButtons, pageFirstButton, pagePrevButton, pageNextButton, resultsLabel;


var $messages, $results, $selector;
var $messages, $results, $selector;
Line 51: Line 49:
//query.push(Math.max(0,queryMap.augmented.indexOf(q.augmented)));
//query.push(Math.max(0,queryMap.augmented.indexOf(q.augmented)));
query.push('o');
query.push('o');
query.push(Math.max(0,queryMap.hiderecolour.indexOf(q.hiderecolour)));
if (q.tier_min_enabled) {
if (q.tier_min_enabled) {
query.push('l');
query.push('l');
Line 84: Line 81:
items: [
items: [
new OO.ui.ButtonOptionWidget({ data: 'any', label: 'Any'}),
new OO.ui.ButtonOptionWidget({ data: 'any', label: 'Any'}),
new OO.ui.ButtonOptionWidget({ data: 'yes', label: 'Supporter\'s only' }),
new OO.ui.ButtonOptionWidget({ data: 'no', label: 'Not Supporter\'s only' }),
],
],
align: 'left'
align: 'left'
Line 141: Line 136:
new OO.ui.ButtonOptionWidget({ data: 'any', label: 'Any', title: 'Everything' }),
new OO.ui.ButtonOptionWidget({ data: 'any', label: 'Any', title: 'Everything' }),
new OO.ui.ButtonOptionWidget({ data: 'surface', label: 'Unrestricted', title: 'Items that are not restricted' }),
new OO.ui.ButtonOptionWidget({ data: 'surface', label: 'Unrestricted', title: 'Items that are not restricted' }),
new OO.ui.ButtonOptionWidget({ data: 'dungeoneering', label: 'Dungeoneering', title: 'Items only available in Daemonheim' }),
new OO.ui.ButtonOptionWidget({ data: 'stories', label: 'Stories', title: 'Items only available from Story completions' }),
new OO.ui.ButtonOptionWidget({ data: 'quest', label: 'Quest', title: 'Items only available during quests' }),
new OO.ui.ButtonOptionWidget({ data: 'missions', label: 'Missions', title: 'Items only available from Mission completions' }),
new OO.ui.ButtonOptionWidget({ data: 'minigame', label: 'Minigame', title: 'Items only available during minigames' }),
new OO.ui.ButtonOptionWidget({ data: 'encounters', label: 'Encounters', title: 'Items only available from Encounter completions' }),
new OO.ui.ButtonOptionWidget({ data: 'limited', label: 'Limited', title: 'Items only available for a limited amount of time' }),
new OO.ui.ButtonOptionWidget({ data: 'outlands', label: 'Outlands', title: 'Items only available from Outlands' }),
new OO.ui.ButtonOptionWidget({ data: 'microtransaction', label: 'MTX', title: 'Items only (reasonably) obtainable via Treasure Hunter, Squeal of Fortune, or Solomon\' General Store' }),
new OO.ui.ButtonOptionWidget({ data: 'events', label: 'Events', title: 'Items only available from Gemini Station Events' }),
]
]
});
});
restrictionSelect.selectItemByData(params.restriction);
restrictionSelect.selectItemByData(params.restriction);


recolourCheck = new OO.ui.CheckboxInputWidget({
selected: params.hiderecolour
});
//Augmentation
//Augmentation
/*
/*
Line 313: Line 305:
new OO.ui.FieldLayout(restrictionSelect, { label: 'Restriction', align: 'left' }),
new OO.ui.FieldLayout(restrictionSelect, { label: 'Restriction', align: 'left' }),
//new OO.ui.FieldLayout(augmentedSelect, { label: 'Augmentation', align: 'left' }),
//new OO.ui.FieldLayout(augmentedSelect, { label: 'Augmentation', align: 'left' }),
new OO.ui.FieldLayout(recolourCheck, { label: 'Hide recolours and dyes?', align: 'left' }),
new OO.ui.LabelWidget({label: 'Tier filters', classes: ['armory-tier-label']}),
new OO.ui.LabelWidget({label: 'Tier filters', classes: ['armory-tier-label']}),
new OO.ui.HorizontalLayout({
new OO.ui.HorizontalLayout({
Line 368: Line 359:
values.augmented = val.getData();
values.augmented = val.getData();
}*/
}*/
values.hiderecolour = recolourCheck.isSelected();
values.tier_min_enabled = tierMinCheck.isSelected();
values.tier_min_enabled = tierMinCheck.isSelected();
Line 438: Line 428:
'|restriction='+params.restriction,
'|restriction='+params.restriction,
//'|augmented='+params.augmented,
//'|augmented='+params.augmented,
'|hiderecolour='+params.hiderecolour,
'|tier_min='+tierMin,
'|tier_min='+tierMin,
'|tier_max='+tierMax,
'|tier_max='+tierMax,