moved from textbot to select
This commit is contained in:
parent
5613187d98
commit
b5de01386a
2 changed files with 8 additions and 1 deletions
|
@ -47,7 +47,9 @@
|
|||
<input type="file" id="fileToUpload" name="fileToUpload">
|
||||
<span id="_jmtoken"> <input type="text" id="jmtoken" placeholder="JM Token">
|
||||
</span>
|
||||
<input type="text" id="jmcat" placeholder="JM Category id">
|
||||
<select id="jmcat">
|
||||
|
||||
</select>
|
||||
<input type="button" id="submitUpload" onclick="uploadFile()" value="Hochladen">
|
||||
<span id="output"></span>
|
||||
</div>
|
||||
|
|
|
@ -5,6 +5,7 @@ let offsetLoadNext = 200;
|
|||
let memes;
|
||||
let categories = [];
|
||||
let categorySelect = document.querySelector("#categorySelect");
|
||||
let categorySelectUpload = document.querySelector("#jmcat");
|
||||
let imagesDiv = document.querySelector(".images");
|
||||
let docElem = document.documentElement;
|
||||
let docBody = document.body;
|
||||
|
@ -44,7 +45,11 @@ function addCategory(category){
|
|||
let optionItem = document.createElement("option");
|
||||
optionItem.setAttribute("value", category["id"]);
|
||||
optionItem.innerText = category["name"];
|
||||
let optionItemUpload = document.createElement("option");
|
||||
optionItemUpload.setAttribute("value", category["id"]);
|
||||
optionItemUpload.innerText = category["name"];
|
||||
categorySelect.appendChild(optionItem);
|
||||
categorySelectUpload.appendChild(optionItemUpload);
|
||||
}
|
||||
|
||||
function updateImages(clear = false){
|
||||
|
|
Loading…
Reference in a new issue