Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Gadget-database-cards-core.js: Difference between revisions

MediaWiki interface page
Content added Content deleted
(Created page with "( function ( $, mw, psw ) { 'use strict'; var qOptions = new psw.db.QueryOptions(); qOptions.addButtonMulti( 'units', { label: 'Unit' }, { multiselect: true, items: [ { label: 'VIRTUAL SINGER' }, { label: 'Leo/need' }, { label: 'MORE MORE JUMP!' }, { label: 'Vivid BAD SQUAD' }, { label: 'Wonderlands×Showtime' }, { label: '25-ji, Nightcord de.' }, ] } ); qOptions.addButtonMulti( 'support units', { label: 'Support uni...")
 
(add option to select characters)
Line 3: Line 3:


var qOptions = new psw.db.QueryOptions();
var qOptions = new psw.db.QueryOptions();
qOptions.addButtonMulti(
'characters',
{ label: 'Character' },
{
multiselect: true,
items: [
// Leo/need
{ label: 'Hoshino Ichika' },
{ label: 'Tenma Saki' },
{ label: 'Mochizuki Honami' },
{ label: 'Hinomori Shiho' },
// MORE MORE JUMP!
{ label: 'Hanasato Minori' },
{ label: 'Kiritani Haruka' },
{ label: 'Momoi Airi' },
{ label: 'Hinomori Shizuku' },
// Vivid BAD SQUAD
{ label: 'Azusawa Kohane' },
{ label: 'Shirashi An' },
{ label: 'Shinonome Akito' },
{ label: 'Aoyagi Toya' },
// Wonderlands×Showtime
{ label: 'Tenma Tsukasa' },
{ label: 'Otori Emu' },
{ label: 'Kusanagi Nene' },
{ label: 'Kamishiro Rui' },
// 25-ji, Nightcord de.
{ label: 'Yoisaki Kanade' },
{ label: 'Asahina Mafuyu' },
{ label: 'Shinonome Ena' },
{ label: 'Akiyama Mizuki' },
// VIRTUAL SINGER
{ label: 'Hatsune Miku' },
{ label: 'Kagamine Rin' },
{ label: 'Kagamine Len' },
{ label: 'Megurine Luka' },
{ label: 'MEIKO' },
{ label: 'KAITO' },
]
}
);
qOptions.addButtonMulti(
qOptions.addButtonMulti(

Revision as of 02:00, 28 March 2022

( function ( $, mw, psw ) {
	'use strict';

	var qOptions = new psw.db.QueryOptions();
	
	qOptions.addButtonMulti(
		'characters',
		{ label: 'Character' },
		{
			multiselect: true,
			items: [
				// Leo/need
				{ label: 'Hoshino Ichika' },
				{ label: 'Tenma Saki' },
				{ label: 'Mochizuki Honami' },
				{ label: 'Hinomori Shiho' },
				// MORE MORE JUMP!
				{ label: 'Hanasato Minori' },
				{ label: 'Kiritani Haruka' },
				{ label: 'Momoi Airi' },
				{ label: 'Hinomori Shizuku' },
				// Vivid BAD SQUAD
				{ label: 'Azusawa Kohane' },
				{ label: 'Shirashi An' },
				{ label: 'Shinonome Akito' },
				{ label: 'Aoyagi Toya' },
				// Wonderlands×Showtime
				{ label: 'Tenma Tsukasa' },
				{ label: 'Otori Emu' },
				{ label: 'Kusanagi Nene' },
				{ label: 'Kamishiro Rui' },
				// 25-ji, Nightcord de.
				{ label: 'Yoisaki Kanade' },
				{ label: 'Asahina Mafuyu' },
				{ label: 'Shinonome Ena' },
				{ label: 'Akiyama Mizuki' },
				// VIRTUAL SINGER
				{ label: 'Hatsune Miku' },
				{ label: 'Kagamine Rin' },
				{ label: 'Kagamine Len' },
				{ label: 'Megurine Luka' },
				{ label: 'MEIKO' },
				{ label: 'KAITO' },
			]
		}
	);
	
	qOptions.addButtonMulti(
		'units',
		{ label: 'Unit' },
		{
			multiselect: true,
			items: [
				{ label: 'VIRTUAL SINGER' },
				{ label: 'Leo/need' },
				{ label: 'MORE MORE JUMP!' },
				{ label: 'Vivid BAD SQUAD' },
				{ label: 'Wonderlands×Showtime' },
				{ label: '25-ji, Nightcord de.' },
			]
		}
	);
	
	qOptions.addButtonMulti(
		'support units',
		{ label: 'Support unit' },
		{
			multiselect: true,
			items: [
				{ label: 'Leo/need' },
				{ label: 'MORE MORE JUMP!' },
				{ label: 'Vivid BAD SQUAD' },
				{ label: 'Wonderlands×Showtime' },
				{ label: '25-ji, Nightcord de.' },
			]
		}
	);
	
	qOptions.addButtonMulti(
		'attributes',
		{ label: 'Attribute' },
		{
			multiselect: true,
			items: [
				{ label: 'Cool' },
				{ label: 'Cute' },
				{ label: 'Happy' },
				{ label: 'Mysterious' },
				{ label: 'Pure' },
			]
		}
	);
	
	qOptions.addButtonMulti(
		'rarities',
		{ label: 'Rarity' },
		{
			multiselect: true,
			items: [
				{ label: '1' },
				{ label: '2' },
				{ label: '3' },
				{ label: '4' },
				{ label: 'Birthday' },
			]
		}
	);

	qOptions.addButtonMulti(
		'statuses',
		{ label: 'Status' },
		{
			multiselect: true,
			items: [
				{ label: 'Permanent' },
				{ label: 'Limited' },
				{ label: 'Colorful Festival limited' },
				{ label: 'Birthday limited' },
			]
		}
	);
	
	qOptions.addButtonMulti(
		'acquire',
		{ label: 'Acquisition method' },
		{
			multiselect: true,
			items: [
				{ label: 'Initial' },
				{ label: 'Main Story' },
				{ label: 'Gacha' },
				{ label: 'Ticket Exchange Shop' },
				{ label: 'Member Exchange Shop' },
				{ label: 'Kakera Exchange Shop' },
				{ label: 'Event Shop' },
				{ label: 'Gacha Seal Exchange Shop' },
				{ label: 'Present Box' }
			]
		}
	);
	
	qOptions.addButtonMulti(
		'skills',
		{ label: 'Skill' },
		{
			multiselect: true,
			items: [
				{ label: 'Scorer' },
				{ label: 'Perfect locker' },
				{ label: 'Healer' },
				{ label: 'Perfect scorer' },
				{ label: 'Life scorer' },
				{ label: 'Accuracy scorer' },
				{ label: 'Birthday scorer' }
			]
		}
	);
	
	qOptions.addDate(
		'released after',
		{ label: 'Released after' }
	);
	qOptions.addDate(
		'released before',
		{ label: 'Released before' }
	);
	
	$( function () {
		var search = new psw.db.SearchWidget(
			{ queryOptions: qOptions },
			{ selector: '#card-results', template: 'Card datatable' }
		);
		
		$( '#card-query' ).append( search.fieldset.$element );
	});
	
} )( jQuery, mediaWiki, pswiki );
Cookies help us deliver our services. By using our services, you agree to our use of cookies.