add updateParam
This commit is contained in:
parent
8819e6124f
commit
d39f5921be
@ -99,7 +99,7 @@ function closeButton(){
|
|||||||
|
|
||||||
function getQuery(param){
|
function getQuery(param){
|
||||||
var result = "";
|
var result = "";
|
||||||
if(location.search.length >0){
|
if(location.search.length > 0){
|
||||||
query = location.search.split("?")[1];
|
query = location.search.split("?")[1];
|
||||||
var variables = query.split("&")
|
var variables = query.split("&")
|
||||||
for (var i=0; i<variables.length; i++){
|
for (var i=0; i<variables.length; i++){
|
||||||
@ -109,4 +109,20 @@ function getQuery(param){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateParam(param, value){
|
||||||
|
var result = "";
|
||||||
|
if(location.search.length > 0){
|
||||||
|
query = location.search.split("?")[1];
|
||||||
|
var variables = query.split("&");
|
||||||
|
for (var i=0; i<variables.length; i++){
|
||||||
|
var data = variabes[i];
|
||||||
|
if(variables[i].split("=")[0] == param){
|
||||||
|
data = param+"="+value;
|
||||||
|
}
|
||||||
|
result = result + "&" + data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
@ -93,9 +93,9 @@ instance.get("users", {withCredentials: true, params :param}).then(function(resp
|
|||||||
var trAll = document.querySelectorAll("#users tbody tr")
|
var trAll = document.querySelectorAll("#users tbody tr")
|
||||||
td = trAll[i].querySelectorAll("td");
|
td = trAll[i].querySelectorAll("td");
|
||||||
td[0].textContent = listData[i].id;
|
td[0].textContent = listData[i].id;
|
||||||
td[1].textContent = listData[i].pseudo
|
td[1].textContent = listData[i].pseudo;
|
||||||
td[2].textContent = listData[i].email
|
td[2].textContent = listData[i].email;
|
||||||
td[3].textContent = listData[i].roles
|
td[3].textContent = listData[i].roles;
|
||||||
var classTd = "";
|
var classTd = "";
|
||||||
switch(listData[i].status){
|
switch(listData[i].status){
|
||||||
case 1:
|
case 1:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user