Commit 79489190 authored by olavhdi's avatar olavhdi
Browse files

fixed the paging menu creation

parent 15c0b232
Pipeline #115430 passed with stage
in 33 seconds
......@@ -49,16 +49,16 @@ function getPagingMenu(count, nextLink, prevLink){
menu += getPagingItem(nextLink.split("page=")[1],"Next");
menu += getPagingItem(Math.ceil(count/5), '»');
}
return wrapElement(wrapElement(menu,"ul","pagination"),"div");
let elem = document.createElement('div');
elem.innerHTML = wrapElement(menu,'ul','pagination');
return elem;
}
function wrapElement(element, tag, className=""){
let newElement = document.createElement(tag);
newElement.innerHTML = element;
if(className.length > 0){
newElement.className = className;
className = ' class="'+className+'"'
}
return newElement;
return '<'+tag +className+'>'+element+'</'+tag+'>';
}
function getPagingItem(parameter, inner){
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment