Fixed bug with category not bein remembered
This commit is contained in:
@@ -87,8 +87,18 @@ function changeActiveTools(activeCategoryButton) {
|
|||||||
function changeTool(tool) {
|
function changeTool(tool) {
|
||||||
const url = tools.get(tool);
|
const url = tools.get(tool);
|
||||||
localStorage.setItem("lastPage", tool);
|
localStorage.setItem("lastPage", tool);
|
||||||
document.getElementById("iframe").src = url;
|
|
||||||
|
switch (tool) { // XML category is default.
|
||||||
|
case "jsonform":
|
||||||
|
changeActiveTools('JSON');
|
||||||
|
break;
|
||||||
|
case "mock":
|
||||||
|
changeActiveTools('REST');
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
document.location.search = tool;
|
document.location.search = tool;
|
||||||
|
document.getElementById("iframe").src = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -104,15 +114,5 @@ function loadLastPage() {
|
|||||||
if (lastPage == null) {
|
if (lastPage == null) {
|
||||||
lastPage = "xpath";
|
lastPage = "xpath";
|
||||||
}
|
}
|
||||||
|
changeTool(lastPage);
|
||||||
switch (lastPage) { // XML category is default.
|
|
||||||
case "jsonform":
|
|
||||||
changeActiveTools('JSON');
|
|
||||||
break;
|
|
||||||
case "mock":
|
|
||||||
changeActiveTools('REST');
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
document.getElementById("iframe").src = tools.get(lastPage);
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user