fix pagination of card detail sections
This commit is contained in:
parent
725061e151
commit
843b2b6e55
2 changed files with 60 additions and 49 deletions
|
|
@ -22,12 +22,13 @@
|
|||
.then(response => response.text())
|
||||
.then(html => {
|
||||
this.$refs.offerList.innerHTML = html;
|
||||
Alpine.initTree(this.$refs.offerList); // reinitialize Alpine on the injected content
|
||||
window.processMarqueeElements && window.processMarqueeElements();
|
||||
});
|
||||
}
|
||||
}"
|
||||
x-init="loadOffers()"
|
||||
x-on:change-page-have.window="page = $event.detail.page; loadOffers()"
|
||||
x-on:change-page="page = $event.detail.page; loadOffers()"
|
||||
class="p-4">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<h2 class="text-xl font-semibold">Have this Card ({{ trade_offer_have_count }})</h2>
|
||||
|
|
@ -56,22 +57,23 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Trade Offers: Want -->
|
||||
<div x-data="{
|
||||
order: 'newest',
|
||||
page: 1,
|
||||
loadOffers() {
|
||||
fetch(`{% url 'cards:card_trade_offer_want_list' card.pk %}?order=` + this.order + '&page=' + this.page)
|
||||
.then(response => response.text())
|
||||
.then(html => {
|
||||
this.$refs.offerList.innerHTML = html;
|
||||
window.processMarqueeElements && window.processMarqueeElements();
|
||||
});
|
||||
}
|
||||
}"
|
||||
x-init="loadOffers()"
|
||||
x-on:change-page.window="page = $event.detail.page; loadOffers()"
|
||||
class="p-4">
|
||||
<!-- Trade Offers: Want -->
|
||||
<div x-data="{
|
||||
order: 'newest',
|
||||
page: 1,
|
||||
loadOffers() {
|
||||
fetch(`{% url 'cards:card_trade_offer_want_list' card.pk %}?order=` + this.order + '&page=' + this.page)
|
||||
.then(response => response.text())
|
||||
.then(html => {
|
||||
this.$refs.offerList.innerHTML = html;
|
||||
Alpine.initTree(this.$refs.offerList); // reinitialize Alpine on the injected content
|
||||
window.processMarqueeElements && window.processMarqueeElements();
|
||||
});
|
||||
}
|
||||
}"
|
||||
x-init="loadOffers()"
|
||||
x-on:change-page="page = $event.detail.page; loadOffers()"
|
||||
class="p-4">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<h2 class="text-xl font-semibold">Want this Card ({{ trade_offer_want_count }})</h2>
|
||||
<!-- DaisyUI dropdown replacing the select -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue