mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 06:46:08 -06:00
#2663 [advs-module] Too many requests on profile ads page
This commit is contained in:
parent
2376a98603
commit
7deba2ab1a
@ -44,6 +44,8 @@ function changePage(page) {
|
|||||||
objJson[i].cat2_name, objJson[i].status));
|
objJson[i].cat2_name, objJson[i].status));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
addDropdownBlock()
|
||||||
|
|
||||||
page_span.html(page + "/" + numPages());
|
page_span.html(page + "/" + numPages());
|
||||||
|
|
||||||
if (numPages() === 1) {
|
if (numPages() === 1) {
|
||||||
@ -166,10 +168,15 @@ function dropdownRow(id, type) {
|
|||||||
|
|
||||||
dropdown += "</div></div>";
|
dropdown += "</div></div>";
|
||||||
|
|
||||||
getBlock('profile/dropdown-ad', {'id': id}, function (r) {
|
|
||||||
$(`.my-ads-dropdown[data-id=${id}] .dropdown-menu`).append(r.html)
|
|
||||||
})
|
|
||||||
|
|
||||||
return dropdown;
|
return dropdown;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
const dropdownBlock = getBlock('profile/dropdown-ad', {'id': ':id'})
|
||||||
|
function addDropdownBlock () {
|
||||||
|
const dropdowns = $('.my-ads-dropdown')
|
||||||
|
for (let i = 0; i < dropdowns.length; i++) {
|
||||||
|
console.log()
|
||||||
|
const currentDropdown = $(dropdowns[i])
|
||||||
|
$('.dropdown-menu', currentDropdown).append(dropdownBlock.replace(':id', currentDropdown.data('id')))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user