add updateParam
This commit is contained in:
parent
d39f5921be
commit
5fa6dff909
@ -4,9 +4,12 @@ var param = {}
|
||||
|
||||
param["nbPages"] = 20;
|
||||
|
||||
var search = getQuery("search");
|
||||
if(search.length > 0){
|
||||
document.getElementById("searchUser").value=search;
|
||||
var listSearch = [ "email", "uuid", "search"];
|
||||
for(var i=0; i<listSearch.length; i++){
|
||||
var search = getQuery(listSearch[i]);
|
||||
if(search.length > 0){
|
||||
document.getElementById("searchUser").value=search;
|
||||
}
|
||||
}
|
||||
|
||||
var listQuery = [{"query": "roles", "id":"inputRoles"}, {"query":"status", "id":"inputStatus"}]
|
||||
@ -50,7 +53,8 @@ instance.get("users/count", { withCredentials: true }).then(function(response){
|
||||
var newPage = i + 2;
|
||||
var aPage = document.querySelectorAll(".page-item")[newPage].querySelector("a");
|
||||
aPage.text=newPage;
|
||||
aPage.href="/html/users.html?page="+newPage;
|
||||
var newPage = updateParam("page", newpage);
|
||||
aPage.href="/html/users.html?"+newPage;
|
||||
}
|
||||
document.querySelectorAll(".page-item")[page].classList.add("active");
|
||||
if(page != 1){
|
||||
@ -132,7 +136,7 @@ document.getElementById("addUser").addEventListener("click", function(){
|
||||
|
||||
document.getElementById("searchUser").addEventListener("keydown", function(ev){
|
||||
if(ev.key === "Enter"){
|
||||
var param = buildParam(e, "");
|
||||
var param = buildParam("", "");
|
||||
location.href="/html/users.html?"+param;
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user