:HTML/embed_music_list_7c
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
<link rel="stylesheet" type="text/css" media="screen" hr...
<style type="text/css">
tbody tr th {
padding: 0 5px;
}
tbody tr td.number {
text-align: center;
}
tbody tr td.mark {
text-align: center;
}
tbody tr td.text {
text-align: left;
}
</style>
<script type="text/javascript" src="https://marines.saku...
<script type="text/javascript" src="https://marines.saku...
<script type="text/javascript">
var musics;
var table;
var level_min = 1;
var level_max = 12;
var level_delta = 1;
var notes_min = 0;
var notes_max = 1499;
var notes_delta = 100;
$(document).ready(function() {
$.getJSON('https://library.maplia.jp/json/musics_sev...
musics = data;
table = $('#table_musics');
// レベルフィルタ
select_level = $('#select_level');
select_level.append($('<option/>', {
value: -1, text: 'すべて'
}));
for (var i = level_min; i <= level_max; i += level...
select_level.append($('<option/>', {
value: i, text: i + (level_delta == 1 ? '' : '...
}));
}
// ノート数フィルタ
select_notes = $('#select_notes');
select_notes.append($('<option/>', {
value: -1, text: 'すべて'
}));
for (var i = notes_min; i <= notes_max; i += notes...
select_notes.append($('<option/>', {
value: i, text: i + '~' + (i + notes_delta - 1)
}));
}
createMusicTable();
filterMusicTable();
});
});
function createMusicTable() {
var table_data = {};
table_data.thead_column_classes = [
'style_th', 'style_th', 'style_th', 'style_th', 's...
];
table_data.tbody_column_classes = [
'style_th', 'text', 'mark', 'number', 'number'
];
table_data.thead = [];
table_data.tbody = [];
table_data.thead[0] = {
values: ['#', 'タイトル', '難易度', 'レベル', 'ノ...
};
$.each(musics, function(i, music) {
if (music.music_deleted) {
return true;
}
const charts = {
's_nor': music.simple_normal, 's_hrd': music.sim...
's_mas': music.simple_master, 's_cha': music.sim...
'c_nor': music.chaos_normal, 'c_hrd': music.cha...
'c_mas': music.chaos_master, 'c_cha': music.cha...
};
const full_title = music.title
+ (typeof music.subtitle === "undefined" ? '' : ...
$.each(charts, function(key, chart) {
if (typeof chart === 'undefined') {
return true;
}
if (chart.level) {
const number = (key.indexOf('_cha') == -1 ? mu...
table_data.tbody[table_data.tbody.length] = {
id: music.id + '_' + key,
class_name: 'chart_7c_' + key,
values: [
number, full_title, key.toUpperCase().repl...
]
};
}
});
});
table.json2table(table_data);
table.tablesorter({sortList: [[3, 1]]});
}
function filterMusicTable() {
const mode = parseInt($(':radio[name="mode"]:checked...
const diff = parseInt($(':radio[name="diff"]:checked...
const level = parseInt($('select[name="level"]').val...
const notes = parseInt($('select[name="notes"]').val...
let count = 0;
$('#table_musics tbody tr').each(function (i, item) {
const item_level = parseInt($(item).find('td')[2]....
const item_notes = parseInt($(item).find('td')[3]....
$(item).show();
// 譜面タイプフィルタ
if (item.id.indexOf('_s_') > -1 && ![0, 1].include...
$(item).hide(); return true;
}
if (item.id.indexOf('_c_') > -1 && ![0, 2].include...
$(item).hide(); return true;
}
// 難易度フィルタ
if (item.id.indexOf('_nor') > -1 && ![0, 1, 5].inc...
$(item).hide(); return true;
}
if (item.id.indexOf('_hrd') > -1 && ![0, 2, 5].inc...
$(item).hide(); return true;
}
if (item.id.indexOf('_mas') > -1 && ![0, 3, 5].inc...
$(item).hide(); return true;
}
if (item.id.indexOf('_cha') > -1 && ![0, 4].includ...
$(item).hide(); return true;
}
// レベルフィルタ
if ((level != -1) && (item_level < level || (item_...
$(item).hide(); return true;
}
// ノート数フィルタ
if ((notes != -1) && (item_notes < notes || (item_...
$(item).hide(); return true;
}
count++;
});
if (count <= 0) {
$('#table_rows').text('フィルター条件に該当する譜...
} else {
$('#table_rows').text(count + '譜面が該当しました');
}
}
</script>
<div>
<p>
譜面タイプフィルター:
<label><input type="radio" name="mode" value="0" onc...
<label><input type="radio" name="mode" value="1" onc...
<label><input type="radio" name="mode" value="2" onc...
<br/>
難易度フィルター:
<label><input type="radio" name="diff" value="0" onc...
<label><input type="radio" name="diff" value="1" onc...
<label><input type="radio" name="diff" value="2" onc...
<label><input type="radio" name="diff" value="3" onc...
<label><input type="radio" name="diff" value="4" onc...
<label><input type="radio" name="diff" value="5" onc...
</p>
<p>
レベルフィルター: <select id="select_level" name="le...
/
ノート数フィルター: <select id="select_notes" name="...
</p>
<p id="table_rows"></p>
<table id="table_musics" class="tablesorter style_tabl...
</div>
終了行:
<link rel="stylesheet" type="text/css" media="screen" hr...
<style type="text/css">
tbody tr th {
padding: 0 5px;
}
tbody tr td.number {
text-align: center;
}
tbody tr td.mark {
text-align: center;
}
tbody tr td.text {
text-align: left;
}
</style>
<script type="text/javascript" src="https://marines.saku...
<script type="text/javascript" src="https://marines.saku...
<script type="text/javascript">
var musics;
var table;
var level_min = 1;
var level_max = 12;
var level_delta = 1;
var notes_min = 0;
var notes_max = 1499;
var notes_delta = 100;
$(document).ready(function() {
$.getJSON('https://library.maplia.jp/json/musics_sev...
musics = data;
table = $('#table_musics');
// レベルフィルタ
select_level = $('#select_level');
select_level.append($('<option/>', {
value: -1, text: 'すべて'
}));
for (var i = level_min; i <= level_max; i += level...
select_level.append($('<option/>', {
value: i, text: i + (level_delta == 1 ? '' : '...
}));
}
// ノート数フィルタ
select_notes = $('#select_notes');
select_notes.append($('<option/>', {
value: -1, text: 'すべて'
}));
for (var i = notes_min; i <= notes_max; i += notes...
select_notes.append($('<option/>', {
value: i, text: i + '~' + (i + notes_delta - 1)
}));
}
createMusicTable();
filterMusicTable();
});
});
function createMusicTable() {
var table_data = {};
table_data.thead_column_classes = [
'style_th', 'style_th', 'style_th', 'style_th', 's...
];
table_data.tbody_column_classes = [
'style_th', 'text', 'mark', 'number', 'number'
];
table_data.thead = [];
table_data.tbody = [];
table_data.thead[0] = {
values: ['#', 'タイトル', '難易度', 'レベル', 'ノ...
};
$.each(musics, function(i, music) {
if (music.music_deleted) {
return true;
}
const charts = {
's_nor': music.simple_normal, 's_hrd': music.sim...
's_mas': music.simple_master, 's_cha': music.sim...
'c_nor': music.chaos_normal, 'c_hrd': music.cha...
'c_mas': music.chaos_master, 'c_cha': music.cha...
};
const full_title = music.title
+ (typeof music.subtitle === "undefined" ? '' : ...
$.each(charts, function(key, chart) {
if (typeof chart === 'undefined') {
return true;
}
if (chart.level) {
const number = (key.indexOf('_cha') == -1 ? mu...
table_data.tbody[table_data.tbody.length] = {
id: music.id + '_' + key,
class_name: 'chart_7c_' + key,
values: [
number, full_title, key.toUpperCase().repl...
]
};
}
});
});
table.json2table(table_data);
table.tablesorter({sortList: [[3, 1]]});
}
function filterMusicTable() {
const mode = parseInt($(':radio[name="mode"]:checked...
const diff = parseInt($(':radio[name="diff"]:checked...
const level = parseInt($('select[name="level"]').val...
const notes = parseInt($('select[name="notes"]').val...
let count = 0;
$('#table_musics tbody tr').each(function (i, item) {
const item_level = parseInt($(item).find('td')[2]....
const item_notes = parseInt($(item).find('td')[3]....
$(item).show();
// 譜面タイプフィルタ
if (item.id.indexOf('_s_') > -1 && ![0, 1].include...
$(item).hide(); return true;
}
if (item.id.indexOf('_c_') > -1 && ![0, 2].include...
$(item).hide(); return true;
}
// 難易度フィルタ
if (item.id.indexOf('_nor') > -1 && ![0, 1, 5].inc...
$(item).hide(); return true;
}
if (item.id.indexOf('_hrd') > -1 && ![0, 2, 5].inc...
$(item).hide(); return true;
}
if (item.id.indexOf('_mas') > -1 && ![0, 3, 5].inc...
$(item).hide(); return true;
}
if (item.id.indexOf('_cha') > -1 && ![0, 4].includ...
$(item).hide(); return true;
}
// レベルフィルタ
if ((level != -1) && (item_level < level || (item_...
$(item).hide(); return true;
}
// ノート数フィルタ
if ((notes != -1) && (item_notes < notes || (item_...
$(item).hide(); return true;
}
count++;
});
if (count <= 0) {
$('#table_rows').text('フィルター条件に該当する譜...
} else {
$('#table_rows').text(count + '譜面が該当しました');
}
}
</script>
<div>
<p>
譜面タイプフィルター:
<label><input type="radio" name="mode" value="0" onc...
<label><input type="radio" name="mode" value="1" onc...
<label><input type="radio" name="mode" value="2" onc...
<br/>
難易度フィルター:
<label><input type="radio" name="diff" value="0" onc...
<label><input type="radio" name="diff" value="1" onc...
<label><input type="radio" name="diff" value="2" onc...
<label><input type="radio" name="diff" value="3" onc...
<label><input type="radio" name="diff" value="4" onc...
<label><input type="radio" name="diff" value="5" onc...
</p>
<p>
レベルフィルター: <select id="select_level" name="le...
/
ノート数フィルター: <select id="select_notes" name="...
</p>
<p id="table_rows"></p>
<table id="table_musics" class="tablesorter style_tabl...
</div>
ページ名: