add updateParam
This commit is contained in:
parent
8819e6124f
commit
d39f5921be
@ -99,7 +99,7 @@ function closeButton(){
|
||||
|
||||
function getQuery(param){
|
||||
var result = "";
|
||||
if(location.search.length >0){
|
||||
if(location.search.length > 0){
|
||||
query = location.search.split("?")[1];
|
||||
var variables = query.split("&")
|
||||
for (var i=0; i<variables.length; i++){
|
||||
@ -110,3 +110,19 @@ function getQuery(param){
|
||||
}
|
||||
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")
|
||||
td = trAll[i].querySelectorAll("td");
|
||||
td[0].textContent = listData[i].id;
|
||||
td[1].textContent = listData[i].pseudo
|
||||
td[2].textContent = listData[i].email
|
||||
td[3].textContent = listData[i].roles
|
||||
td[1].textContent = listData[i].pseudo;
|
||||
td[2].textContent = listData[i].email;
|
||||
td[3].textContent = listData[i].roles;
|
||||
var classTd = "";
|
||||
switch(listData[i].status){
|
||||
case 1:
|
||||
|
Loading…
x
Reference in New Issue
Block a user