Rebuild scripts and css

This commit is contained in:
Timothy Warren 2018-09-20 16:12:28 -04:00
parent e7dc1e8e53
commit 5a607db93e
3 changed files with 13 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -365,6 +365,15 @@
});
}
// Wire up mal checkbox
AnimeClient.on('main', 'change', '.big-check', (e) => {
const id = e.target.id;
AnimeClient.$('.mal-check').forEach(el => {
el.checked = false;
});
document.getElementById(`mal_${id}`).checked = true;
});
function renderAnimeSearchResults (data) {
const results = [];
@ -377,6 +386,7 @@
results.push(`
<article class="media search">
<div class="name">
<input type="checkbox" class="mal-check" id="mal_${item.slug}" name="mal_id" value="${x.mal_id}" />
<input type="radio" class="big-check" id="${item.slug}" name="id" value="${x.id}" />
<label for="${item.slug}">
<img src="/public/images/anime/${x.id}.jpg" alt="" width="220" />
@ -412,6 +422,7 @@
results.push(`
<article class="media search">
<div class="name">
<input type="checkbox" id="mal_${item.slug}" name="mal_id" value="${x.mal_id}" />
<input type="radio" class="big-check" id="${item.slug}" name="id" value="${x.id}" />
<label for="${item.slug}">
<img src="/public/images/manga/${x.id}.jpg" alt="" width="220" />

File diff suppressed because one or more lines are too long