Skip to content
Snippets Groups Projects
Commit 18df5905 authored by Maximilian Giller's avatar Maximilian Giller :squid:
Browse files

Adjusted for different space format

parent 24e4cf0f
No related branches found
No related tags found
No related merge requests found
Pipeline #54680 passed
...@@ -20,14 +20,13 @@ function loadSpacesList() { ...@@ -20,14 +20,13 @@ function loadSpacesList() {
var selectContainer = jQuery("#space-id-select"); var selectContainer = jQuery("#space-id-select");
selectContainer.empty(); selectContainer.empty();
listAllSpaces().then((spaces) => { listAllSpaces().then((spaces) => {
Object.keys(spaces).forEach(space_id => { spaces.forEach(space => {
var selectedTxt = ""; var selectedTxt = "";
var space = spaces[space_id]; if (space.space_id === SPACE) {
if (space_id === SPACE) {
selectedTxt = "selected "; selectedTxt = "selected ";
} }
var child = "<option " + selectedTxt + "value=\"" + space_id + "\" title=\"" + space.description + "\">" + space.name + "</option>"; var child = "<option " + selectedTxt + "value=\"" + space.space_id + "\" title=\"" + space.description + "\">" + space.name + "</option>";
selectContainer.append(child); selectContainer.append(child);
}); });
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment