0.0.176 routes
This commit is contained in:
31
static/v2/js/blocks/b_my_routes.js
Normal file
31
static/v2/js/blocks/b_my_routes.js
Normal file
@@ -0,0 +1,31 @@
|
||||
function loadMoreMyRoutesRoutes (el){
|
||||
if (!el) return;
|
||||
let formData = new FormData();
|
||||
let from_el = parseInt(el.dataset.from_el);
|
||||
let to_el = from_el + parseInt(el.dataset.more_count);
|
||||
formData.append('from_el', from_el);
|
||||
formData.append('to_el', to_el);
|
||||
|
||||
let request = new api({
|
||||
url: '/routes/get_routes/',
|
||||
data: formData,
|
||||
data_type: 'formData',
|
||||
success: (res) => {
|
||||
if (!res.html) return;
|
||||
let $parent = $('.info_profile')[0];
|
||||
let $next_page_btn = $parent.querySelector('.container_btns[data-next_page_btn]')
|
||||
$next_page_btn.remove();
|
||||
|
||||
appendNodes($parent, templateStrToNode(`
|
||||
<div class="next_page" style="
|
||||
margin: 50px 0;
|
||||
width: 100%;
|
||||
background: #212121;
|
||||
height: 1px;"></div>
|
||||
`));
|
||||
appendNodes($parent, templateStrToNode(res.html));
|
||||
}
|
||||
});
|
||||
|
||||
request.ajaxRequest()
|
||||
}
|
||||
Reference in New Issue
Block a user