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

No edit summary
No edit summary
 
(4 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 150: Line 145:
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,